Skip to content

Instantly share code, notes, and snippets.

View kramarama's full-sized avatar
sand of time

Vladimir K kramarama

sand of time
  • /milkyway/solar/3
View GitHub Profile
@kramarama
kramarama / wifi
Last active August 29, 2015 14:10
linux wifi
lspci
iwconfig wlan0
watch -n 1 cat /proc/net/wireless
wavemon
sudo iwlist wlan0 scan
sudo iwconfig wlan0 essid network-essid
sudo iwconfig wlan0 freq 2.422G
sudo iwconfig wlan0 channel 3
sudo iwconfig wlan0 retry 16
@kramarama
kramarama / ldd
Created November 17, 2014 21:08
ldd check
ldd `which proftd`|grep -i "not found"
@kramarama
kramarama / win_chown
Created November 17, 2014 20:57
windows scripting
For Files:
takeown /f file_name /d y
icacls file_name /grant administrators:F
For Folders or Directories (will perform action recursively):
takeown /f directory_name /r /d y
icacls directory_name /grant administrators:F /t
@kramarama
kramarama / php_tzdata.php
Last active August 29, 2015 14:08
PHP time zone fix
sudo apt-get install php-pear
sudo apt-get install php5-dev
sudo pecl install timezonedb
sudo su -c 'echo extension=timezonedb.so > /etc/php5/conf.d/timezone.ini'
sudo service apache2 reload
sudo sed -i -r 's~^;date\.timezone =$~date.timezone = "Europe/Moscow"~' /etc/php5/cli/php.ini
sudo sed -i -r 's~^;date\.timezone =$~date.timezone = "Europe/Moscow"~' /etc/php5/apache2/php.ini
@kramarama
kramarama / DNS.txt
Last active August 29, 2015 14:08
Ubuntu DNS options
nmcli dev list iface eth0 | grep IP4
nm-tool | tail -n 8
@kramarama
kramarama / chrome.txt
Last active August 29, 2015 14:08
Chrome Flags
chrome://net-internals/#dns
chrome://flags/
chrome://settings/
chrome://gpu/
chrome://memory-redirect/
chrome://downloads/
@kramarama
kramarama / mc.ext
Created September 27, 2014 13:10
mc extension file
# html
regex/i/\.html?$
Open=/usr/lib/mc/ext.d/web.sh open html
View=%view{ascii} /usr/lib/mc/ext.d/misc.sh view cat
@kramarama
kramarama / dns
Last active August 29, 2015 14:06
DNS servers
http://pcsupport.about.com/od/tipstricks/a/free-public-dns-servers.htm
The Google Public DNS IP addresses (IPv4):
8.8.8.8
8.8.4.4
The Google Public DNS IPv6 addresses:
2001:4860:4860::8888
2001:4860:4860::8844
@kramarama
kramarama / ini
Created September 14, 2014 18:49
mc ini
[Midnight-Commander]
verbose=1
pause_after_run=1
shell_patterns=1
auto_save_setup=1
preallocate_space=0
auto_menu=0
use_internal_view=1
use_internal_edit=0
clear_before_exec=1
@kramarama
kramarama / tar
Last active August 29, 2015 14:06
tar
# Possible options to exclude files/directories from backup using tar:
# Exclude files using multiple patterns
tar -czf backup.tar.gz --exclude=PATTERN1 --exclude=PATTERN2 ... /path/to/backup
# Exclude files using an exclude file filled with a list of patterns
tar -czf backup.tar.gz -X /path/to/exclude.txt /path/to/backup
# Exclude files using tags by placing a tag file in any directory that should be skipped
tar -czf backup.tar.gz --exclude-tag-all=exclude.tag /path/to/backup