An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
To install, you need to have the WordPress i18n library on your computer. Check it out using SVN:
sudo svn co http://i18n.svn.wordpress.org/tools/trunk/ /usr/lib/wpi18n
You don't have to put the library in /usr/lib/wpi18n, but if you don't put it there, make sure to set the $WP_I18N_LIB environment variable in your .bashrc file (with no trailing slash):
export WP_I18N_LIB="/path/to/i18n/lib"
| # Alias ST2's command line tool for a shorter (easier-to-remember) name | |
| alias st="/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl" | |
| # Search for and open WordPress hooks | |
| function action() { | |
| ack "do_action\(\s*('|\")$1('|\")" | awk {'print $1'} | sed 's/:$//g' | xargs st | |
| } | |
| function filter() { | |
| ack "apply_filters\(\s*('|\")$1('|\")" | awk {'print $1'} | sed 's/:$//g' | xargs st | |
| } |
To install, you need to have the WordPress i18n library on your computer. Check it out using SVN:
sudo svn co http://i18n.svn.wordpress.org/tools/trunk/ /usr/lib/wpi18n
You don't have to put the library in /usr/lib/wpi18n, but if you don't put it there, make sure to set the $WP_I18N_LIB environment variable in your .bashrc or .bash_profile file (with no trailing slash):
export WP_I18N_LIB="/path/to/i18n/lib"
| <?php | |
| /** | |
| * GitHub webhook handler template. | |
| * | |
| * @see https://docs.github.com/webhooks/ | |
| * @author Miloslav Hůla (https://github.com/milo) | |
| */ | |
| $hookSecret = 's.e.c.r.e.t'; # set NULL to disable check |
| <?php | |
| class My_Custom_My_Account_Endpoint { | |
| /** | |
| * Custom endpoint name. | |
| * | |
| * @var string | |
| */ | |
| public static $endpoint = 'my-custom-endpoint'; |
This simple script is for logging all of the awesome things you do every day, using Terminal, and syncing them all to Dropbox. Nifty, right?
idid.sh file to a directory on your computer (tested with OS X).idid.sh, run the following commands:mv idid.sh /usr/local/bin/idid.sh| /** | |
| * Configure PHPMailer to send via PHP's mail() | |
| * | |
| * @param PHPMailer $phpmailer | |
| */ | |
| function phpmailer_send_via_mail( $phpmailer ) { | |
| $phpmailer->IsMail(); | |
| } | |
| add_action( 'phpmailer_init', 'phpmailer_send_via_mail', 999 ); |
| <?php | |
| /** | |
| * Buy BTC & ETH daily on Luno.com | |
| * @author Gerhard Potgieter <potgieterg@gmail.com> | |
| * @since 2017-12-07 | |
| * https://www.luno.com/invite/JN5Z4 | |
| * | |
| * This script will do a daily purchase of BTC and ETH on Luno.com based on rand value (ZAR) set. Default to R100 each. Why daily? https://en.wikipedia.org/wiki/Dollar_cost_averaging | |
| * | |
| * Installation Instructions |