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
### Keybase proof | |
I hereby claim: | |
* I am philkershaw on github. | |
* I am philkershaw (https://keybase.io/philkershaw) on keybase. | |
* I have a public key ASAuiFSnxj0tQ5m06aa4W1LveaSzv7yOxMcn3aGXDLhPtgo | |
To claim this, I am signing this object: |
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 | |
/** | |
* Simple tool for deleting Sales Rules | |
* | |
* @TODO add function to delete by ID | |
* | |
* @author Phil Kershaw | |
*/ | |
require_once '../app/Mage.php'; |
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 | |
require_once ("app/Mage.php"); | |
class TradeOrders | |
{ | |
private static $headers = array('ORDER_ID', 'EMAIL', 'LAST_NAME', 'FIRST_NAME', 'PRODUCT_ID', 'PRODUCT_NAME'); | |
public static function get($from, $to) { | |
// Fetch all UK Trade orders within specified date range |
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
http { | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
proxy_temp_path /var/tmp; | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_comp_level 6; |
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
var string1 = 'ARNFH-U-5728'; | |
var string2 = 'SO06DNV'; | |
var array1 = string1.split(''); | |
var array2 = string2.split('').reverse(); | |
var obfuscated = ''; | |
array1.every(function(e, i, a) { | |
if (typeof array2[i] === 'undefined') { |
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 | |
/** | |
* Twitter status class | |
* | |
* Provides the ability to fetch status' for a Twitter account. | |
* | |
* @package Twitter | |
* @subpackage Twitter_Status | |
* @author Phil Kershaw | |
*/ |
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 | |
/** | |
* Twitter status class | |
* | |
* Helper Class to fetch status' for a Twitter account via Zend Service. | |
* | |
* @package PKLib | |
* @subpackage Twitter | |
* @author Phil Kershaw | |
*/ |
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 | |
$available_times = array( | |
"09:00:00" => '<option value="%s 09:00:00">%s 9.00am - 10.00am</option>', | |
"10:00:00" => '<option value="%s 10:00:00">%s 10.00am - 11.00am</option>', | |
"11:00:00" => '<option value="%s 11:00:00">%s 11.00am - 12.00pm</option>', | |
"12:00:00" => '<option value="%s 12:00:00">%s 12.00pm - 1.00pm</option>', | |
"13:00:00" => '<option value="%s 13:00:00">%s 1.00pm - 2.00pm</option>', | |
"14:00:00" => '<option value="%s 14:00:00">%s 2.00pm - 3.00pm</option>', | |
"15:00:00" => '<option value="%s 15:00:00">%s 3.00pm - 4.00pm</option>', | |
"16:00:00" => '<option value="%s 16:00:00">%s 4.00pm - 5.00pm</option>', |
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 | |
private static function _applyEntities(&$feed) | |
{ | |
if (null !== $feed) { | |
foreach($feed as &$item) { | |
if (null !== $item['entities']['urls']) { | |
$urls = array_reverse($item['entities']['urls']); | |
$content = &$item['text']; | |
foreach ($urls as $url) { | |
$content = substr_replace($content, '</a>', $url['indices'][1], 0); |
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
var str_title = document.querySelector('#category_box_title').value; | |
var str_url = document.querySelector('#category_box_url').value; | |
var arr_image = document.querySelector('#category_box_image').files[0]; | |
var int_id = document.querySelector('#category_box_id').value; | |
var formData = new FormData(); | |
formData.append('title', str_title); | |
formData.append('url', str_url); | |
formData.append('image', arr_image); | |
formData.append('web_page_content_widget_id', int_selected_content_widget_id); |
NewerOlder