most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
// Find wp-config.php | |
for ( $i = 0; $i < $depth = 10; $i++ ) { | |
$path = str_repeat( '../', $i ); | |
if ( file_exists( $path . 'wp-config.php' ) ) { | |
require_once( $path . 'wp-config.php' ); | |
break; | |
} | |
} |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
# Option defaults | |
OPT="value" | |
# getopts string | |
# This string needs to be updated with the single character options (e.g. -f) | |
opts="fvo:" | |
# Gets the command name without path | |
cmd(){ echo `basename $0`; } |
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
# A list of available STUN server. | |
stun.l.google.com:19302 | |
stun1.l.google.com:19302 | |
stun2.l.google.com:19302 | |
stun3.l.google.com:19302 | |
stun4.l.google.com:19302 | |
stun01.sipphone.com | |
stun.ekiga.net |
delimiter ;; | |
drop procedure if exists build_catalog;; | |
create procedure build_catalog(IN categories INT, IN products INT) | |
begin | |
SET @category_count = 1; | |
SET @CATNAMEPREFIX = "Category "; | |
SET @CATURLKEYPREFIX = "cat-"; | |
SET @CATURLPATHPREFIX = "catpath-"; | |
SET @ROOTCATEGORY = 2; | |
SET @INCLUDEINMENU = 1; |
# Install `dnsmasq` and configure for *.test domains | |
$ brew install dnsmasq | |
$ vim /usr/local/etc/dnsmasq.conf | |
# Reload configuration and clear cache | |
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ dscacheutil -flushcache |
--- | |
- name: Deploy new site release | |
user: deployer | |
hosts: all | |
tasks: | |
- name: Fetch repo updates | |
git: > | |
[email protected]:my/repo.git |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.