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
switch ($a) | |
case 1: | |
#this runs if case 1 is true | |
case 2: | |
case 3: | |
#this runs if case 1, 2 or 3 are true | |
break; | |
case 4: | |
#this runs if case 4 is true |
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
function consistent_hash($path, $servers){ | |
$hash = hexdec(substr(md5($path), 0, 5)); | |
return $cache[$hash % count($servers)]; | |
} | |
$server = consistent_hash($path_to_asset, array('cache1', 'cache2')); |
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
$ git remote add parent git://github.com/shiflett/testmore.git | |
$ git fetch parent | |
$ git branch parent-master parent/master | |
$ git checkout parent-master | |
$ git checkout master | |
$ git merge parent-master | |
$ git push origin master | |
$ git branch -d parent-master |
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://mirror.centos.org/centos-5/5/os/i386/CentOS/python-elementtree-1.2.6-5.i386.rpm | |
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-sqlite-1.1.7-1.2.1.i386.rpm | |
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/nspr-4.8.6-1.el5.i386.rpm | |
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/nspr-devel-4.8.6-1.el5.i386.rpm | |
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/nss-3.12.8-1.el5.centos.i386.rpm | |
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/nss-devel-3.12.8-1.el5.centos.i386.rpm | |
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/cpio-2.6-23.el5_4.1.i386.rpm | |
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/nss-3.12.8-1.el5.centos.i386.rpm | |
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/nss-devel-3.12.8-1.el5.centos.i386.rpm | |
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/popt-1.10.2.3-22.el5.i386.rpm |
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
<?php | |
mysql_connect('localhost', 'root', 'root'); | |
mysql_select_db('porn'); | |
$result = mysql_query("SELECT * FROM images WHERE has_goats=1 AND has_nuns=1"); | |
while ($row = mysql_fetch_array($result)){ | |
echo "<img src=\"$row[image]\" />\n"; | |
} |
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
function joinBuffers(b1, b2){ | |
// if one arg is null, be smart | |
if (!b1) return b2; | |
if (!b2) return b1; | |
var l1 = b1.length; | |
var l2 = b2.length; | |
var b3 = new Buffer(l1 + l2); |
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
GNU nano 2.0.6 File: /etc/my.cnf | |
[mysqld] | |
datadir=/var/lib/mysql | |
socket=/var/lib/mysql/mysql.sock | |
user=mysql | |
# Default to using old password format for compatibility with mysql 3.x | |
# clients (those using the mysqlclient10 compatibility package). | |
old_passwords=1 | |
bind-address=10.210.215.67 |
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
# npm publish | |
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. | |
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. | |
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. | |
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. | |
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. | |
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. | |
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursiv |
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
{ "SERVERUSED" : "LIGHTHOUSE.5.MONGOLAYER.COM/54.70.204.247:10001" , "LASTOP" : { "$TS" : 0 , "$INC" : 0} , "CONNECTIONID" : 7940 , "ERR" : "MULTI UPDATE ONLY WORKS WITH $ OPERATORS" , "CODE" : 9 , "N" : 0 , "OK" : 1.0} |
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
<?php | |
# | |
# scoreboard stuff | |
# | |
echo file_get_contents('http://localhost/server-status?auto'); | |
echo "\n"; | |
# |