This file contains hidden or 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
KEY=ABC123456 | |
gpg --keyserver subkeys.pgp.net --recv $KEY | |
gpg --export --armor $KEY | sudo apt-key add - |
This file contains hidden or 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 src/ -type f -name *.php -exec sed -i 's/ *$//' '{}' ';' |
This file contains hidden or 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
git push branch HEAD:master |
This file contains hidden or 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
<?php | |
$mem = new Memcached("pool"); | |
$mem->setOption(Memcached::OPT_BINARY_PROTOCOL, true); | |
$mem->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT); | |
$mem->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true); | |
$mem->setOption(Memcached::OPT_NO_BLOCK, true); | |
$mem->setOption(Memcached::OPT_SERVER_FAILURE_LIMIT, 1); | |
$mem->setOption(Memcached::OPT_RETRY_TIMEOUT, 30); | |
$mem->setOption(29, 2); |
This file contains hidden or 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
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.io.OutputStreamWriter; | |
import java.net.URLConnection; | |
import java.net.URLEncoder; | |
import java.net.URL; | |
import java.util.Hashtable; | |
import java.util.Map; | |
import java.util.Iterator; |
This file contains hidden or 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
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; | |
select * from big_data_table; | |
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; |
This file contains hidden or 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
$ apt-get source nginx | |
$ cd nginx* | |
$ patch -p1 < /patch | |
$ ... | |
$ dpkg-buildpackage -rfakeroot -uc -b |
This file contains hidden or 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
<?php | |
function bash_color($string, $color='white', $background='black') { | |
$colored_string = ""; | |
$_color['black'] = '0;30'; | |
$_color['dark_gray'] = '1;30'; | |
$_color['blue'] = '0;34'; | |
$_color['light_blue'] = '1;34'; |
This file contains hidden or 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
<?php | |
function ticks_counter ($return = null) | |
{ | |
static $ticks; | |
if ($return) { | |
return $ticks; | |
} |
This file contains hidden or 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
$ git push `remote name` `local branch`:`remote_branch` |
OlderNewer