An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
<?php | |
class My_Custom_My_Account_Endpoint { | |
/** | |
* Custom endpoint name. | |
* | |
* @var string | |
*/ | |
public static $endpoint = 'my-custom-endpoint'; |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
<?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 |
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 | |
/** | |
* 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 |
#!/bin/sh | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
# Determine if a file list is passed | |
if [ "$#" -eq 1 ] | |
then | |
oIFS=$IFS | |
IFS=' |
<?xml version="1.0"?> | |
<ruleset name="WordPress Coding Standards"> | |
<description>WooCommerce extension PHP_CodeSniffer ruleset.</description> | |
<!-- Exclude paths --> | |
<exclude-pattern>tests/</exclude-pattern> | |
<exclude-pattern>woo-includes/woo-functions.php</exclude-pattern> | |
<exclude-pattern>woo-includes/class-wc-dependencies.php</exclude-pattern> | |
<exclude-pattern>*/node_modules/*</exclude-pattern> | |
<exclude-pattern>*/vendor/*</exclude-pattern> |
<?php | |
// credentials.json is gotten from https://developers.google.com/calendar/quickstart/php | |
define( 'EVENT_CALENDAR_ID', '' ); | |
define( 'BLOCKER_CALENDAR_ID', '' ); | |
define( 'WEEKS_TO_CHECK', 6 ); | |
define( 'WEEKLY_LIMIT', 3 ); | |
define( 'WEEK_IN_SECONDS', 7*24*60*60 ); | |
define( 'TZ_P', substr_replace( trim( shell_exec( 'date +"%z"' ) ), ':', 3, 0 ) ); |
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"