Skip to content

Instantly share code, notes, and snippets.

Avatar

jasonsee jasonsee

View GitHub Profile
@wesbos
wesbos / you-are-welcome.sh
Last active Mar 28, 2017
Listen to all the voices inside your Mac computer
View you-are-welcome.sh
# 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
@drwrchrds
drwrchrds / meetupMassUnsubscribe
Last active Jul 11, 2016
Unsubscribe from all group notifications on Meetup.com
View meetupMassUnsubscribe
// Tired of getting Meetup.com notifications? Me too.
// 1. Navigate to: http://www.meetup.com/account/comm/ (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
bendyorke / setup.md
Last active Mar 12, 2021
Setting up a new mac
View setup.md
@whichlight
whichlight / art-demo-links.md
Last active Aug 29, 2015
materials for jsconf talk
View art-demo-links.md
View setup github issues labels.sh
#!/bin/bash
echo -n "GitHub User: "
read USER
echo -n "GitHub Password: "
read -s PASS
echo ""
echo -n "GitHub Repo (e.g. foo/bar): "
@benlumley
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
<?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
mvsantos / remove-image-background.sh
Created May 10, 2013
Remove/strip image background - rough mode - requires ImageMagick
View remove-image-background.sh
# 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.
e.preventDefault();
}
/************$~I**************************Z*********************************
***********O,7.++O$+********************O,..ZI******************************
***********$..$.78.$******************$...7+. ~Z*******************+********
***********.Z.~.7D.O****************O,...,+. ....+Z*************7O+77I*+****