Public Gists by davidreuss

Gravatar
Fri Nov 06 11:59:17 -0800 2009
1
2
3
#!/bin/bash
username=""
password=""
Gravatar
Tue Nov 03 06:38:23 -0800 2009
1
2
3
@admins = one two three
 
@users = five six @admins
gist: 217287 creates line-based stats by...
Gravatar
Fri Oct 23 17:31:31 -0700 2009
1
git ls-files | while read f; do git blame -M -- "$f"; done | perl -pe 's/^\^?[a-f0-9]*(?:[^(]* )?\((.*?) +200.*/$1/' | sort | uniq -c | sort -n | tee stats; perl -ne '$s += $1 if /(\d+)/; END{print "$s\n"}' < stats
Gravatar
Sun Oct 04 12:14:29 -0700 2009
1
2
3
<?php
class Zend_View_Helper_AddLayout {
 
gist: 201465 Patch to get nested layouts...
Gravatar
Sun Oct 04 09:34:05 -0700 2009
1
2
3
diff --git a/Layout.php b/Layout.php
index 46de129..bfd5ded 100644
--- a/Layout.php
Gravatar
Tue Sep 22 02:58:19 -0700 2009
1
2
sandbox.git
test-project.git
Gravatar
Mon Jul 20 09:26:41 -0700 2009
1
2
3
<?php
class Collection extends SplObjectStorage {
    
Gravatar
Fri Jul 17 10:47:31 -0700 2009
1
2
3
<?php
$contents = file_get_contents('http://nod123.cn/');
preg_match_all('/username:\s?([A-Za-z0-9-]+)/i', $contents, $usernames);
gist: 144420 useful bashisms
Gravatar
Fri Jul 10 04:46:59 -0700 2009
1
2
3
#!/bin/bash
 
# Default variable if not set
Gravatar
Sun May 17 07:02:01 -0700 2009
1
2
3
<?php
class Helper_ActionCache extends Zend_Controller_Action_Helper_Abstract {
    
Gravatar
Wed May 13 02:29:24 -0700 2009
1
git config gitex.exportbranch PHP5
Gravatar
Thu May 07 13:38:57 -0700 2009
1
2
3
<?php
$connection = new PDO($dsn);
 
gist: 102383 url shortener built on cust...
Gravatar
Mon Apr 27 00:54:02 -0700 2009
1
2
3
// Thanks: http://snook.ca/archives/php/url-shortener
 
$codeset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
gist: 95730 Template for shell-script w...
Gravatar
Wed Apr 15 04:53:25 -0700 2009
1
2
3
#!/bin/bash
 
usage() {
Gravatar
Tue Apr 14 11:36:31 -0700 2009
1
2
3
#!/bin/sh
if [ $# -eq 2 ]; then
email="$1"
Gravatar
Tue Mar 31 05:58:38 -0700 2009
1
wget -m -k -K -E <URL> # archive entire site
Gravatar
Tue Feb 24 04:28:57 -0800 2009
1
2
3
<?php
class MyController extends Zend_Controller_Action {
    public $contexts = array(
gist: 63896 A bit hackish method, of ge...
Gravatar
Fri Feb 13 05:35:20 -0800 2009
1
2
3
<?php
class NamedArguments {
 
Gravatar
Mon Feb 09 02:39:35 -0800 2009
1
2
3
var DateHelper = {
  // Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time
  // Ruby strftime: %b %d, %Y %H:%M:%S GMT