This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
$ gunzip GeoLiteCity.dat.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd / | |
# ls -lrt | awk '/^d/ {print $9}' | |
for dir in `ls -d */` | |
do | |
# check those dir which are under / | |
CHECK_DIR=$(df $dir | awk '( $6 == "/" ) ') | |
# if dir under / then run du | |
[[ -z $CHECK_DIR ]] || du -sh $dir | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove local tag | |
git tag -d tagname-123 | |
# remove remote tag | |
git push origin :refs/tags/tagname-123 | |
# delete multiple tags by patterns | |
for tag in $(git tag -l '[production|tusur]*'); do git tag -d $tag; git push origin :refs/tags/$tag; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="description" content="Большинство поисковых серверов отображают содержимое поля description при выводе результатов поиска. Если этого тега нет на странице, то поисковый движок просто перечислит первые встречающиеся слова на странице, которые, как правило, оказываются не очень-то и в тему." /> | |
<meta name="Keywords" content="HTML, META, метатег, тег, поисковая система" /> | |
<!-- The Open Graph protocol --> | |
<!-- description: http://ogp.me/#metadata --> | |
<meta property="og:title" content="The Rock" /> | |
<meta property="og:type" content="website" /> | |
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" /> | |
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" /> | |
<!-- array: http://ogp.me/#array --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find * -type f -exec perl -p -i -e 's/([^:]):(\w+)\s*=>/\1\2:/g' {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in monitrc or in conf.d/some.conf | |
set alert recepients@domain.com but not on { pid, ppid } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle config --global path ~/.bundle | |
$ bundle config --global bin bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget --recursive --convert-links --page-requisites --adjust-extension --continue --timestamping --no-parent --no-verbose http://site.ru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.9.1 :001 > ActiveRecord::Base.logger.level = 4 | |
1.9.1 :002 > Sunspot::Rails::LogSubscriber.logger.level = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.vim/vimrc | |
imap <Ins> <Esc>i | |
autocmd BufWritePre * :%s/\s\+$//e | |
"Bubble single lines | |
nmap <C-Up> ddkP | |
nmap <C-Down> ddp |
NewerOlder