student {
name
}
select now()
<?php | |
// usage | |
withSetting::ini('display_errors', 'off', function() { | |
//.. do things | |
}); | |
withSetting::timezone('America/New_York', function() { | |
//.. do things |
student {
name
}
select now()
#!/usr/bin/env python | |
""" | |
Use this to kill hanging processes that don't have a specific name, | |
greps for the name in the process name, and kills -9 by PID | |
""" | |
import subprocess | |
import re | |
import optparse |
<?php | |
/** | |
* Higher order functions in PHP | |
* | |
* Please let me know of any differences in the the uses and actual definitions of partial v. curry. | |
*/ | |
/** | |
* Returns a partially applied function. |
var fizzbuzz = function(n) { | |
return [ { m: 3, word: 'Fizz'}, { m: 5, word: 'Buzz'} ] | |
.map(function(c) { return !(n % c.m) ? c.word : ''; }) | |
.join('') || n; | |
}; | |
for (var i = 1; i < 101; i++) { | |
console.log(fizzbuzz(i)); | |
} |
<?php | |
class ct_staff extends Model | |
{ | |
/** | |
* Staffing types | |
* [ db_value => display_value ] | |
* @var array | |
*/ |
/* | |
given an HTML element that corresponds to the selector '#el' | |
with "data-" attributes ['model', 'token', 'ide'] | |
*/ | |
var module = new Module($('#el'), options); | |
// or |
/* | |
Placehoder Plugin for jQuery By Stan Rozenraukh | |
Usage: | |
$('input').placeholder(); | |
or | |
$('input').placeholder({ | |
active: 'red', | |
blurred: 'green' | |
}); | |
*/ |