Skip to content

Instantly share code, notes, and snippets.

View bufordtaylor's full-sized avatar

Buford Taylor bufordtaylor

View GitHub Profile
@bufordtaylor
bufordtaylor / .sh
Created April 11, 2014 19:30
git config aliases +git
[alias]
st = status
co = checkout
br = branch
st = status
ci = commit
w = whatchanged
abbrev = !sh -c 'git rev-parse --short ${1-`echo HEAD`}' -
[gc]
auto = 1
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ] && [ -f ".ruby-gemset" ]; then
source "$rvm_path/scripts/rvm"
rvm use `cat .ruby-version`@`cat .ruby-gemset`
fi
@bufordtaylor
bufordtaylor / 0_reuse_code.js
Created August 9, 2014 09:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# in gemfile
gem 'soundcloud'
#don't forget to bundle install
# in haml
= @embed_info['html'].html_safe if @embed_info

#1. Deep link

Deep linking is the easiest integration (because there is the least chance of technical failure), but it requires that the user has both the Open and the Shortcut apps.

It is as simple as letting the user click on a URL like the one as follows:

    shortcutapp://event/12345/menu

In the AndroidManifest.xml

#Sample SDK integration

iOS SDK example

    // iOS example: Install the Shortcut SDK with pod
    
    override func viewDidLoad() {
      super.viewDidLoad()
      let shortcut = ShortcutApp.initWithEvent("12345", completion: completionBlock)

shortcut.setMainColor("#fff")

require 'rails_helper'
describe 'application controller', js: true do
let!(:user) { create(:user)}
let!(:admin) { create(:user, admin: true)}
describe "when user logs in" do
it "redirects to attempted path" do
visit manage_events_path
@bufordtaylor
bufordtaylor / csjx
Created September 8, 2015 23:52
react example
@Welcome = React.createClass
propTypes:
q: React.PropTypes.string.isRequired
getInitialState: ->
didFetchData: false
projects: []
project_fav_ids: []
meta:
total_pages: 0
@bufordtaylor
bufordtaylor / brightbit_new_machine.sh
Created October 8, 2015 05:14 — forked from ericboehs/brightbit_new_machine.sh
A script we run for each of our new employee's machines.
#!/usr/bin/env bash
# This script is idempotent
# TODO: Add VERRBOSE to silence commands (default to no output)
# TODO: Add log file
# TODO: Convert >/dev/null to &>-
# TODO: Don't use cask for chrome since it screws up 1Password permission
# Before running script:
# * Create/login to the user you want to run it from

Keybase proof

I hereby claim:

  • I am bufordtaylor on github.
  • I am buf (https://keybase.io/buf) on keybase.
  • I have a public key whose fingerprint is 7E45 77AA 173F BC3C 7DAE ABCB E334 C6FD 7CC0 B7F7

To claim this, I am signing this object: