This file contains 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
/** | |
* Auto generated acf-json from Advanced Custom Fields JSON export | |
* How to use: | |
* | |
* 1. Export ACF fields to JSON. | |
* 2. Rename file "acf-export.json". | |
* 3. Place in theme root. | |
* 4. Add this script to functions.php, run once. Check scripts are added to acf-json folder (needs write permissions). | |
* 5. Remove after successful use! | |
*/ |
This file contains 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
# see for info: https://kindlevsmac.wordpress.com/2011/10/14/how-to-run-windows-7-bootcamp-in-virtualbox/ | |
# view available disk partitions | |
diskutil list | |
# unmount bootcamp | |
diskutil unmount /dev/disk0s4 | |
# make bootcamp writeable | |
sudo chmod 777 /dev/disk0s4 |
This file contains 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
<?php | |
// http://en.wikipedia.org/wiki/ISO_4217 | |
return array( | |
'AFA' => array('Afghan Afghani', '971'), | |
'AWG' => array('Aruban Florin', '533'), | |
'AUD' => array('Australian Dollars', '036'), | |
'ARS' => array('Argentine Pes', '032'), | |
'AZN' => array('Azerbaijanian Manat', '944'), |
This file contains 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
<?php | |
return array( | |
'aa' => 'Afar', | |
'ab' => 'Abkhaz', | |
'ae' => 'Avestan', | |
'af' => 'Afrikaans', | |
'ak' => 'Akan', | |
'am' => 'Amharic', | |
'an' => 'Aragonese', |
This file contains 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
DELETE FROM `_table_1` | |
WHERE `_key` NOT IN (SELECT `key` FROM `_table_2`) |
This file contains 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
lsof -P | grep ':3000' | awk '{print $2}' | |
sudo kill -9 [process_id] |
This file contains 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
/** | |
* Simple jQuery Image Preloader Extension | |
* | |
* @param images = array source images to preload | |
* @param callback = optional function to execute when loaded | |
*/ | |
$.fn.imagePreloader = function (images, callback) { | |
var deferreds = []; | |
$.each(images, function(i, src) { | |
deferreds.push(new $.Deferred(function (dfd) { |
This file contains 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
<?php | |
/** | |
* May 2012 Web Services Technical Guide v1.8_EN 21 | |
* | |
* Note: information must be encoded with utf8_encode function | |
* | |
* Library used: PHP5 SOAP library | |
* http://php.net/soap | |
*/ |
This file contains 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
<?php | |
/** | |
* addRowspan | |
* | |
* from an array of assoc mysql results, appends a column 'rowspan' by looking ahead | |
* for keys with the same value. | |
* | |
* @param string $span_key - key to base span on | |
* @param array $rows - 2d array of rows | |
*/ |
This file contains 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
<?php | |
/** | |
* PDO Query Builder | |
* | |
* A basic query builder class that provides wrappers for building PDO queries. | |
* | |
* @author Ben Wallis | |
*/ | |
class pdo_query_builder { | |
NewerOlder