Skip to content

Instantly share code, notes, and snippets.

jswanner /
Last active August 29, 2018 16:43
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement: function() {
this.player = videojs(this.$('video')[0], null, function() {;
didRender: function() {
View wc.rb
#! /usr/bin/env ruby
require 'bundler/inline'
gemfile do
gem 'rspec', '3.7', require: false
class Program
def initialize(input)
View running-script
$ chmod +x wc.rb
$ echo "hello, world" | ./wc.rb
1 2 13
$ printf "line 1\nline 2\n" | ./wc.rb
2 4 14
View running-specs
$ rspec wc.rb
Finished in 0.00348 seconds (files took 0.19061 seconds to load)
4 examples, 0 failures
View script-spec.rb
# script logic
# the script itself is being executed
require 'rspec'
RSpec.describe 'the script' do
View bundler-inline.rb
require 'bundler/inline'
gemfile do
gem 'rspec', '3.7', require: false

Keybase proof

I hereby claim:

  • I am jswanner on github.
  • I am jswanner ( on keybase.
  • I have a public key whose fingerprint is 1140 8F9C EAD0 C993 1C96 63E6 C154 4A94 D2DC 2F30

To claim this, I am signing this object:

jswanner / .tmux.conf
Last active March 24, 2016 19:46
My tmux conf
View .tmux.conf
unbind C-b
set -g prefix C-a
set -g default-terminal "screen-256color"
set -g history-limit 5000
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
jswanner / canary.rb
Last active August 29, 2015 14:06 — forked from mclosson/canary.rb
View canary.rb
# SpiderOak now maintains a warrant canary so they can passively let their users know
# if they have been served a National Security Letter or other legal tool which
# prevents them from actively disclosing to their users that they are being coerced
# or forced into compromising the security or privacy of their userbase.

This function automatically grabs the latest git tag and, based on keyword (major, minor, patch), adds a new tag. (e.g. git_tag patch for v1.2.0 would create v1.2.1)

Drop this into your ~/.bash_profile and run source ~/.bash_profile to use it.

You can find all of my dotfiles here: