Kategori: Genel
-
MySQL Database Backup shell script
!/bin/bash now=$(date +"%d-%m-%Y") path="/path/to/folder" muser="username" mpassword="password" mysqlfolder="mysqlbackup" mysqlfile="mysqldumpall.$now.sql.gz" echo "Dumping MySQL Databases to $path/$mysqlfolder" mkdir -p $path/$mysqlfolder mysqldump -u $muser -p$mpassword –all-databases | gzip -9 > $path/$mysqlfolder/$mysqlfile echo "MySQL Database Backup Completed, size of the file is $(stat -c%s "$path/$mysqlfolder/$mysqlfile")" This will backup your all databases in one dump sql file and compress it.Fill your…
-
Gargoyle router firmware using hardware buttons to control qos
config button ‘qos_button’ option button ‘wps’ option action ‘pressed’ option handler ‘logger qos ; sed -i ‘s/2940/25000/’ /etc/config/qos_gargoyle ; /etc/init.d/qos_gargoyle restart ;’ config button ‘qos2_button’ option button ‘wps’ option action ‘released’ option handler ‘logger qos ; sed -i ‘s/25000/2940/’ /etc/config/qos_gargoyle ; /etc/init.d/qos_gargoyle restart ;’ option min ‘3’ option max ’90’ This two line are from…
-
Shell script to activate wlan0 access point mode when eth0 is offline
#!/bin/bash ifup=’/sbin/ifup’ ifdown=’/sbin/ifdown’ ifconfig=’/sbin/ifconfig’ hostapd=’/usr/sbin/hostapd’ x=`ping -c1 google.com 2>&1 | grep unknown` if [ ! “$x” = “” ]; then $ifup wlan0 $hostapd -B /etc/hostapd/hostapd.conf fi x2=`ping -c1 google.com 2>&1 | grep received` if [ ! “$x2” = “” ]; then $ifdown wlan0 killall hostapd fi I’m using this script on bananapipro to activate ap…
-
Debian için Squid 3.4.x ssl destekli proxy ve interceptor kurulumu
Kaynaktan Oluşturma Squid kaynaklarından SSL destekli kaynak dosyasını çekip, build ayarlarını da ekledikten sonra squid’i kaynağından oluşturacağız. apt-get source squid3 wget http://www.squid-cache.org/Versions/v3/3.4/squid-3.4.9.tar.gz cp squid-3.4.9.tar.gz squid3_3.4.9.orig.tar.gz tar -zxf squid-3.4.9.tar.gz Debian/rules altında rules dosyasına aşağıdaki ssl desteği için gerekli değerleri ekliyoruz. –enable-ssl and –enable-ssl-crtd and –disable-arch-native Daha sonra aşağıda ki komut ile paketleri oluşturuyoruz. dpkg-buildpackage Kurulum ve…
-
Debian Jessie son version nginx derleme
Debian Jessie için nginx kaynaklarından mainline sürümü çekip, derleyip, kuracağız. curl http://nginx.org/keys/nginx_signing.key | apt-key add – nano /etc/apt/sources.list dosyaya eklenecek satır deb-src http://nginx.org/packages/mainline/debian/ jessie nginx Ctrl+X apt-get -y update apt-get -y build-dep nginx apt-get -y source nginx cd nginx-* export DEB_BUILD_MAINT_OPTIONS=hardening=+pie dpkg-buildpackage -uc -b cd ../ dpkg -i nginx_*~jessie_armhf.deb nginx -v
-
Windows 10 disable memory compression
Open a PowerShell with Administrator privilages then , run the command Disable-MMAgent -mc and reboot. This disables the compression. To enable it later again, run again powershell as admin and run the Enable-MMAgent -mc command.
-
TA ITH EDICT MECAB pack ready to unsolve the mysteries
Recently, i started to read some visual novels while overall the reading something is good for mind but reading Japannese definitely not if you don’t know many kanji and language pretty good.So i search a way to read Japannese while computer assisting it.There are few brilliant software to extacting texts from game memory while other…
-
padoka PPA amdgpu and mesa drivers
sudo apt-add-repository ppa:paulo-miguel-dias/mesa sudo apt update adding the padoka PPA to get the newest amdgpu and mesa drivers.
-
RPi-Monitor Installation
Installation using the repositoryRPi-Monitor is using github as debian repository. This repository will make installation and update of RPi-Monitor accessible with the command apt-get or aptitude. To use this repository follow the instruction bellow: Execute the following command to add RPi-Monitor into your list of repository: wget http://goo.gl/vewCLL -O /etc/apt/sources.list.d/rpimonitor.list Install my public key to…
-
Check cpu frequency every second at cli
watch -n 1 cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq Check cpu frequency at every second.