Skip to content

Instantly share code, notes, and snippets.

@btoone
btoone / .vimrc
Last active Apr 9, 2019
Vimrc for use with iVim on iOS
View .vimrc
" 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
@btoone
btoone / mp-zap.py
Created May 12, 2016
Script to pull data from MemberPress using the WordPress Rest API
View mp-zap.py
import json
if input['desc'] == 'MP Test':
membership = 14
elif input['desc'] == 'MP Example':
membership = 99
else:
return {'status': 'Invalid button'}
# Get member_id
View bnfs_webhook.php
<?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',
@btoone
btoone / curl.sh
Last active Aug 29, 2015
Attempt to get $resource and $http to hit mapmyrun api
View curl.sh
curl 'http://www.mapmyrun.com/vxproxy/v7.0/workout/782830271/?field_set=time_series&callback=success' \
-H 'Referer: http://www.mapmyrun.com/workout/782830271'
@btoone
btoone / Vagrantfile
Last active Aug 29, 2015
Setup VM and Install Docker
View Vagrantfile
# -*- 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`"
View keybase.md

Keybase proof

I hereby claim:

  • I am caspyin on github.
  • I am caspyin (https://keybase.io/caspyin) on keybase.
  • I have a public key whose fingerprint is 5708 1010 8836 C17B 7159 B919 F9DC 5371 F98B C2C9

To claim this, I am signing this object:

@btoone
btoone / ng-demo.html
Created Mar 28, 2014
Demo of Angular all in a single file.
View ng-demo.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>AngularJS Routing example</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
padding-top: 10px;
background-color: #F5F5F5;
}
View index.html.erb
<ul>
<% @images.each do |image| %>
<li><%= link_to product_image_url(image) %></li>
<% end %>
</ul>
You can’t perform that action at this time.