-
Install Homebrew:
- Follow the install instructions found on this page.
-
Tap the wonderful homebrew-php from https://github.com/Homebrew/homebrew-php
$ brew tap homebrew-php
<?php | |
/** | |
* Text Field | |
* | |
* A simple text field callback to use with the Settings API. Don't forget to pass in | |
* the arguments array. Here's an example call to add_settings_field() : | |
* | |
* add_settings_field( 'my_option', __( 'My Option' ), 'foo_field_text', 'theme_options', 'general', array( | |
* 'name' => 'my_theme_options[my_option]', | |
* 'value' => $options['my_option'], // assuming $options is declared |
Usage: diskutil coreStorage list | |
Usage: diskutil coreStorage info[rmation] [-plist] | |
Usage: diskutil coreStorage convert | |
Usage: diskutil coreStorage revert | |
Usage: diskutil coreStorage create lvgName | |
Usage: diskutil coreStorage delete lvgUUID | |
Usage: diskutil coreStorage addDisk lvgUUID NewMemberDeviceName | |
Usage: diskutil coreStorage removeDisk pvUUID | |
Usage: diskutil coreStorage deleteVolume lvUUID | |
Usage: diskutil coreStorage resizeVolume lvUUID size |
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
#------------------------------------------------------------------------------- | |
# NOTES: | |
#------------------------------------------------------------------------------- | |
# * Under the heading "CONFIG" below you'll find a number of configuration | |
# parameters that must be personalized for your GitHub account and org. | |
# Replace the `<CHANGE-ME>` strings with the value described in the comments | |
# (or overwrite those values at run-time by providing environment variables). |
<?php | |
require 'vendor/autoload.php'; | |
class Cgi | |
{ | |
public $app, $public_folder; | |
public function __construct($app, $public_folder) | |
{ |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
/* | |
Slightly strict regex check for validly formatted Canadian postal code | |
http://jsfiddle.net/7mBFf/ | |
*/ | |
var postal = new RegExp(/^\s*[a-ceghj-npr-tvxy]\d[a-ceghj-npr-tv-z](\s)?\d[a-ceghj-npr-tv-z]\d\s*$/i); | |
console.log(postal.test('m6k1s4')); // returns true | |
console.log(postal.test('M6K1S4')); // returns true | |
console.log(postal.test('90210')); // returns false |
<?php namespace GM\WWWPostThumbnail; | |
/** | |
* Plugin Name: WWW Post Thumbnail | |
* Description: Allow to use an external image url as featured image. | |
* Plugin URI: https://gist.github.com/Giuseppe-Mazzapica/928bc22e5f49a654cf7c | |
* Author: Giuseppe Mazzapica | |
* Author URI: https://github.com/Giuseppe-Mazzapica | |
* License: MIT | |
* Version: 0.1.0 | |
* |
#!/bin/bash | |
# | |
# This script will mount /Users in the boot2docker VM using NFS (instead of the | |
# default vboxsf). It's probably not a good idea to run it while there are | |
# Docker containers running in boot2docker. | |
# | |
# Usage: sudo ./boot2docker-use-nfs.sh | |
# |
These are instructions for properly setting up unbound as a local caching dns recursor on OS X Yosemite. There's probably some additional stuff that can be done to secure unbound, but I'm still getting into the OS X launchd stuff. Also,
Bootstrap pkgsrc from joyent as soon as you can. I used to use homebrew, but I'm not a huge fan of ruby. You can of course avoid using the binary package set from joyent if you like, and instead install pkgsrc manually and build unbound yourself. Pkgsrc is also available on a wide array of platforms, so it's nice to have consistency across os x, linux, and illumos.