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 watch = require('watch'), | |
spawn = require('child_process').spawn, | |
queue = [], | |
proc; | |
function run(path) { | |
if (proc) { | |
return queue.push(path); | |
} |
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
:-) | |
:) | |
:-) | |
:o | |
:$ | |
:/ | |
:( | |
:-* | |
:# | |
:'( |
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
#!/usr/bin/env php | |
<?php | |
// This is incredibly ugly... but a quick script for fun | |
exec("git remote -v", $data); | |
$remotes = array(); | |
foreach ($data as $line) { | |
if (preg_match('~^(\w+)\t(.+?(?:\.git)+)~', $line, $match)) { |
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'), | |
exec = require('child_process').exec, | |
modules = {}, | |
// what to strip off the pathname (/my/dir/web becomes /web) | |
docroot = __dirname+'/webroot', | |
// where to search for YUI.add in files | |
path = __dirname+'/webroot/bundles', | |
file, | |
child; |
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
YUI.add('sk-gallery-model-router', function (Y) { | |
/* Any frequently used shortcuts, strings and constants */ | |
var Lang = Y.Lang; | |
function ModelRouter(config) { | |
} | |
ModelRouter.prototype = { | |
getUrl: function (action) { |
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
#!/usr/bin/perl | |
# | |
# Nathanial Hendler | |
# http://retards.org/ | |
# | |
# 2001-06-26 v1.0 | |
# | |
# This perl script parses a MySQL slow_queries log file | |
# ignoring all queries less than $min_time and prints | |
# out how many times a query was greater than $min_time |
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
# test for the git ps1 script | |
declare -f __git_ps1 >/dev/null | |
if (( $? )) | |
then | |
PS1='[\[\033[34m\w\033[0m]\n[\t \u]\$ ' | |
else | |
PS1='[\[\033[34m\w\033[0m$(__git_ps1 " (\033[0;32m%s\033[0m)")]\n[\t \u]\$ ' | |
fi |
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 | |
# compl1.php - Redis autocomplete example | |
# download female-names.txt from http://antirez.com/misc/female-names.txt | |
$redis = new Redis(); | |
$redis->connect('127.0.0.1'); | |
# Create the completion sorted set | |
if (!$redis->exists('compl')) { | |
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 | |
$dir = new RecursiveDirectoryIterator(dirname(__FILE__)); | |
$iterator = new RecursiveIteratorIterator($dir); | |
$pattern = '~\{(.+?)\}~im'; | |
$start_char = '{'; | |
$end_char = '}'; |
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 | |
class YuiMethod | |
{ | |
protected $selector; | |
protected $helpers; | |
protected $code; | |
public function __construct($selector, $helper = null) | |
{ |