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
$this->colorcache = new cache('favoritecolors', 'memcached', 'file'); | |
if ( !isset($this->colorcache->tristan) ) { | |
$this->colorcache->tristan = 'blue'; | |
} | |
echo $this->colorcache->tristan; |
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
$upload = $this->input->files->avatar; | |
if ($upload && $upload->ext == 'png' && $upload->width <= 100 && $upload->height <= 100) { | |
$upload->move(DIR_PUBLIC.'avatars/'); | |
} |
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
curl http://dumps.wikimedia.org/enwiki/20120502/enwiki-20120502-pages-articles-multistream.xml.bz2 | bzcat | ./import.pl | mysql -f -uuser -ppass --default-character-set=utf8 wikipedia |
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
function(rpkt, depth){ | |
try { | |
rpkt = rpkt.toString(); | |
depth = depth || 0; | |
var i; | |
var ppkt = { | |
cmd: null, | |
param: null, | |
args: {}, | |
body: null, |
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
&b\t \x1b[1m | |
&/b\t \x1b[22m | |
&i\t \x1b[3m | |
&/i\t \x1b[23m | |
&u\t \x1b[4m | |
&/u\t \x1b[24m | |
&s\t \x1b[9m | |
&/s\t \x1b[29m |
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
g++ `pkg-config --cflags --libs gtkmm-3.0` -o ./thing ./thing.cpp |
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
Sending: ["multiply",4,7,{"__type":"callback","id":"dHx9"}] | |
Recieved: ["callback","dHx9",[28]] |
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
var events = require('events'); | |
var stream = require('stream'); | |
var util = require('util'); | |
var runner = function(template, output) { | |
stream.call(this); | |
this.readable = true; | |
this.writable = true; | |
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
var ws = require('websocket.io'); | |
var net = require('net'); | |
var server = ws.listen(3456); | |
server.on('connection', function(socket){ | |
var google = net.connect({ | |
host: 'google.com', | |
port: 80 | |
}); |
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
// ==UserScript== | |
// @name dAmn.ws | |
// @namespace botdom.com | |
// @description Make the official client use WebSockets | |
// @author Henry Rapley <[email protected]> | |
// @version 1.0.3 | |
// @include http://chat.deviantart.com/chat/* | |
// @include http://chat.deviantart.lan/chat/* | |
// ==/UserScript== |
OlderNewer