Skip to content

Instantly share code, notes, and snippets.

View timeshifting's full-sized avatar

Matt Gifford timeshifting

  • Hamilton, New Zealand
View GitHub Profile
@tommyshellberg
tommyshellberg / woocommerce-xero-account-code-override-snippet.php
Last active January 12, 2024 11:36
WooCommerce Xero Override Line Item Account Code By SKU
add_filter('woocommerce_xero_line_item_account_code', 'wc_custom_xero_account_code', 10, 2);
function wc_custom_xero_account_code($account_code, $line_item) {
// $line_item->get_item_code() returns the SKU of the line item.
if( $line_item->get_item_code() == 'ACME') {
return '460';
}
return $account_code;
}
@TheZoc
TheZoc / mp3-to-m4r.bat
Created June 25, 2015 02:51
Convert a MP3 file to an Apple iPhone's ringtone file (M4R), using FFMPEG.
@echo off
rem =====================================================
rem Converts a MP3 file to a M4R file using ffmpeg.
rem Usage: Drop a MP3 file at the top of this batch file.
rem =====================================================
set ffmpeg_exe="C:\ffmpeg\ffmpeg-20150619-git-bb3703a-win64-static\bin\ffmpeg.exe"
rem %~f1 = Full File Path, with drive letter
rem %~p1 = Drive Letter
rem %~p1 = Path Only
@tomjn
tomjn / typekit.editor.php
Created September 10, 2012 10:22
Typekit fonts for TinyMCE editor plugin
add_filter("mce_external_plugins", "tomjn_mce_external_plugins");
function tomjn_mce_external_plugins($plugin_array){
$plugin_array['typekit'] = get_template_directory_uri().'/typekit.tinymce.js';
return $plugin_array;
}
@moluapple
moluapple / gist:2719021
Created May 17, 2012 13:44
AI CS6 Application.executeMenuCommand(menuCommandString: string ) 方法参数列表
menuCommandString,UI MenuString zh_CN
-------------------------------------
new,新建
newFromTemplate,从模板新建
open,打开
saveacopy,存储副本
Adobe AI Save For Web,存储为 Web 所用格式(W)
Adobe AI Save Selected Slices,存储选中的切片
revert,恢复
AI Place,置入(L)
@davidalexander
davidalexander / gist:1086455
Last active January 21, 2025 14:21
Magento Snippets

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex