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
public function parentFn($argVar) { | |
$decVar = 0.00; | |
$callback = function ($anonVar) use ($argVar, &$decVar) { | |
$result += ($decVar * $anonVar) * ($argVar); | |
}; | |
return round($result, 2); | |
} |
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
MacBook-Pro:~ emjayess$ crontab -l | |
42 08-18 * * 1-6 osascript -e "beep 5"; say -v Victoria -r 200 are you working on your most important item? | |
// see also: multiple ways to make a mac go 'beep'... | |
// http://stackoverflow.com/questions/3127977/how-to-make-the-hardware-beep-sound-in-mac-os-x-10-6 |
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
forfiles /P C:\path\to\files /M *.* /S /D +"01/01/2012" /C "cmd /c if @fsize gtr 200200200 echo @path @fsize @fdate @ftime" |
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
CACHE MANIFEST | |
# cache pages as they're visited | |
# display '/offline' when offline and hitting a page not yet cached... | |
FALLBACK: | |
/ /offline | |
NETWORK: | |
* |
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
<!-- what tha f*ck --> | |
<a id="ctl00_MasterBody_DownloadDetail_ctl02_DownloadFileLink" href="javascript:__doPostBack('ctl00$MasterBody$DownloadDetail$ctl02$DownloadFileLink','')"> |
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
### via http://blog.stealth35.com/2011/07/27/install-pear-on-osx-lion.html | |
# sudo cp /private/etc/php.ini.default /private/etc/php.ini | |
sudo php /usr/lib/php/install-pear-nozlib.phar | |
pear config-set php_ini /private/etc/php.ini | |
pecl config-set php_ini /private/etc/php.ini | |
sudo pear upgrade-all | |
# what about when using MAMP's php? |
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
/** | |
* AMD module loading patterns: 2 possible approaches | |
*/ | |
define(['dojo/query', 'dojo/on'], function(query, on){ | |
// my module code | |
}); | |
// oft-favored for maintaining modules per line of code | |
define(function(require) { |
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
# grant the following perms to 'w1zk1d' on all localhost db's with a name prefix of 'drupal_' ... | |
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON `drupal_%`.* TO 'w1zk1d'@'localhost' IDENTIFIED BY 'kick@ss'; |
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
:~# nginx -V | |
nginx version: nginx/1.2.1 | |
TLS SNI support enabled | |
configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-pcre-jit --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-auth-pam --add-module=/build/buildd/nginx-1. |
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
#!/bin/bash | |
# original source here: http://drupal.org/files/issues/pushkey.txt | |
# | |
# pushkey | |
# | |
# usage: | |
# | |
# pushkey [email protected] |