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
# Usage: | |
# | |
# Rails | |
# Step 1: write a gist with a file named __script__.rb | |
# Step 2: copy and paste the function def below into Rails console | |
# Step 3: run `eval_gist("the-gist-id-from-the-url")` | |
# Step 4: GOTO Step 3 | |
# | |
# Ruby | |
# Start an IRB session and load this file |
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
puts "[#{Time.now}] Hello from GitHub!" |
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
# Basic commands | |
:Git [args] # does what you'd expect | |
all of your `~/.gitconfig` aliases are available. | |
:Git! [args] # same as before, dumping output to a tmp file | |
Moving inside a repo. |
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
sed -i '/pattern/d' file |
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
sed -i.bak 's/pattern1/pattern2/g' file |
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
" Set leader to be spacebar | |
let mapleader=" " | |
set hlsearch | |
set incsearch | |
set laststatus=2 | |
set ruler | |
set history=100 | |
set autoindent | |
set backspace=indent,eol,start |
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
import json | |
if input['desc'] == 'MP Test': | |
membership = 14 | |
elif input['desc'] == 'MP Example': | |
membership = 99 | |
else: | |
return {'status': 'Invalid button'} | |
# Get member_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
<?php | |
add_action('supstr-process-signup', 'bnfs_webhook_process_signup', 10, 1); | |
function bnfs_webhook_process_signup($atts) { | |
$webhook_url = 'https://zapier.com/hooks/catch/1170913/2pv4l9/'; | |
$args = array( | |
'method' => 'POST', | |
'timeout' => 30, | |
'redirection' => 5, | |
'httpversion' => '1.1', |
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
curl 'http://www.mapmyrun.com/vxproxy/v7.0/workout/782830271/?field_set=time_series&callback=success' \ | |
-H 'Referer: http://www.mapmyrun.com/workout/782830271' |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
ENV['VAGRANT_DEFAULT_PROVIDER'] ||= 'virtualbox' | |
# Install Docker.io | |
# Adapted from https://docs.docker.com/installation/debian/ | |
$script = <<SCRIPT | |
echo "[SCRIPT] Running as: `whoami`" |
NewerOlder