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
javascript:$('.stream,.stream-items').css({display:'-webkit-box',webkitBoxOrient:'vertical',webkitBoxDirection:'reverse'});document.onscroll=function(e){e.stopPropagation()} |
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
demian@demian-notebook:~/www/projects/test/application/scripts$ npm ls | |
npm WARN Logger.js * Unmet dependency in /home/demian/www/projects/test/application/scripts | |
npm WARN LogsAlert.js * Unmet dependency in /home/demian/www/projects/test/application/scripts | |
npm WARN Queue.js * Unmet dependency in /home/demian/www/projects/test/application/scripts | |
npm WARN TStream.js * Unmet dependency in /home/demian/www/projects/test/application/scripts | |
npm WARN colored.js * Unmet dependency in /home/demian/www/projects/test/application/scripts | |
npm WARN crawler.js * Unmet dependency in /home/demian/www/projects/test/application/scripts | |
npm WARN extensions.js * Unmet dependency in /home/demian/www/projects/test/application/scripts | |
npm WARN mootools-core-1.3.js * Unmet dependency in /home/demian/www/projects/test/application/scripts | |
npm WARN parser.js * Unmet dependency in /home/demian/www/projects/test/application/scripts |
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
process.env.TZ = 'UTC'; | |
var util = require('util'), | |
fs = require('fs'), | |
request = require('request'), | |
args = require('argsparser').parse(); | |
for (var count = 0; count < 10; count++) { | |
(function(i) { | |
var uri = 'http://www.google.com/?i=' + i; |
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
var util = require('util'), | |
http = require('http'), | |
connect = require('connect'), | |
express = require('express'); | |
var app = express.createServer(); | |
app.configure(function(){ | |
app.use(express.bodyParser()); | |
app.use(express.errorHandler({ dumpExceptions: true, showStack: 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
var util = require('util'), | |
fs = require('fs'); | |
// textos... | |
var txta = fs.readFileSync('a.txt', 'utf8'); | |
var txtb = fs.readFileSync('b.txt', 'utf8'); | |
var words = txtb.trim().split(/\s+/); | |
var uniq = []; | |
words.forEach(function(w) { |
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
var httpProxy = require('http-proxy'), | |
http = require('http'); | |
var options = { | |
router: { | |
'.*?\.demian.magic.com': '127.0.0.1:8000' | |
} | |
}; | |
var proxyServer = httpProxy.createServer(options); | |
proxyServer.listen(80); |
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
/** | |
* Create HTML anchor tags replacing URL's | |
* | |
* @param string $input | |
* @param string $target anchor target attribute | |
* @return string | |
*/ | |
function parseLinks($input, $target = '_blank') { | |
return preg_replace('#(^|\s)((?:http|https|ftp)://.+?\.[a-z]{2,3}.*?)(\s|$)#i', '$1<a href="$2" target="' . $target . '">$2</a>$3', $input); | |
} |
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 numberFormat(number, dec, dsep, tsep) { | |
if (isNaN(number)) return ""; | |
number = number.toFixed(dec || 0); | |
var pindex = number.indexOf('.'), fnums, decimals, parts = []; | |
if (pindex > -1) { | |
fnums = number.substring(0, pindex).split(''); | |
decimals = (dsep || '.') + number.substr(pindex+1); | |
} | |
else { | |
fnums = number.split(''); |
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
<? | |
$db = DB::getConnection(); | |
$sql = "SELECT * FROM Projects ORDER BY name"; | |
$data = $db->query($sql)->fetchAll(); | |
array_walk($data, function(&$v) { | |
$v['enabled'] = (int)$v['enabled']; | |
$v['visible'] = (int)$v['visible']; | |
}); | |
Response::json($data); | |
?> |
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
// ==UserScript== | |
// @name Colorful Teg | |
// @version 1.0 | |
// @match *teg.avature.net* | |
// @run-at document-end | |
// ==/UserScript== | |
[ | |
'.analysis_functional > td {background-color: rgba(255, 80, 168, 0.45) !important; }', | |
'.testing > td { background-color: rgba(255, 255, 176, 0.45) !important; }', |
OlderNewer