Skip to content

Instantly share code, notes, and snippets.


jasonsee jasonsee

View GitHub Profile
wesbos /
Last active Mar 28, 2017
Listen to all the voices inside your Mac computer
# paste this into your console and hit enter
for voice in Agnes Kathy Princess Vicki Victoria Alex Bruce Fred Junior Ralph Albert Bad News Bahh Bells Boing Bubbles Cellos Deranged Good News Hysterical Pipe Organ Trinoids Whisper Zarvox; do say "Hi `whoami` my name is ${voice}" -v ${voice}; done
View functions.php
add_action( 'template_redirect', 'wc_custom_redirect_after_purchase' );
function wc_custom_redirect_after_purchase() {
global $wp;
if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) {
$order_id = absint( $wp->query_vars['order-received'] );
$order_key = wc_clean( $_GET['key'] );
$redirect = get_permalink( {PAGE_ID} );
$redirect .= get_option( 'permalink_structure' ) === '' ? '&' : '?';
View President Food Puns
aaron burrger
Abraham Lincorn
abraHAM lincornbread
abraham finger-lincoln good
ale-brr-ham (sausage link)-corn
all-beef frankslin delano roosevelt
George W Bushes Baked Beans
milkshake fillmore
George Washmeeatthispie
John Eggams
macabreb0b / meetupMassUnsubscribe
Last active Jul 11, 2016
Unsubscribe from all group notifications on
View meetupMassUnsubscribe
// Tired of getting notifications? Me too.
// 1. Navigate to: (you must be logged in!)
// 2. Open your browser's console, and paste in the script below:
$('.commSettings').each(function(idx, item) {var $item = $(item);var boardId = $item.attr("id").split('_')[1];var url = $item.children('form').attr('action');var params = {evRemind:1,mailing_list_status:0, submitButton:'Save Settings', submit:'submit'};params['board_' + boardId] = boardId;$.ajax({data: params, url: url, type: 'post'});});$('.generalEmailSettings').find('input[type="checkbox"]').prop('checked', false);$('.generalEmailSettings').find('input[type="submit"]').click();
bendyorke /
Last active Mar 12, 2021
Setting up a new mac
whichlight /
Last active Aug 29, 2015
materials for jsconf talk
View setup github issues
echo -n "GitHub User: "
read USER
echo -n "GitHub Password: "
read -s PASS
echo ""
echo -n "GitHub Repo (e.g. foo/bar): "
benlumley / migrateorders.php
Created Dec 5, 2013
Script to migrate woocommerce orders from one wordpress database into another, along with associated data.
View migrateorders.php
// Copies woocommerce orders and users over from source to target.
// I use this on my local machine - loading both db's up there side by side
// could easily adjust the connect strings to connect elsewhere if needed.
// will change order ids
// My use case for this is when I've got a staging/test version of a site with new posts/products/pages etc, that needs
// to go live without the loss of any orders placed on the site site since we copied it to the staging site.
mvsantos /
Created May 10, 2013
Remove/strip image background - rough mode - requires ImageMagick
# Requires ImageMagick
# Converting the source from JPEG to PNG - if necessary
convert my_src_image.jpg my_src_image.png
# Option A
# - Requires a temporary intermediate file
# - Drill more than 10 might result in poor results
View friday.js
function friday(e) {
if(e) {
// Not doin' nothin', it's Friday.
***********$..$.78.$******************$...7+. ~Z*******************+********
***********.Z.~.7D.O****************O,...,+. ....+Z*************7O+77I*+****