Skip to content

Instantly share code, notes, and snippets.

Jacob Swanner jswanner

Block or report user

Report or block jswanner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View components.video-js.js
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement: function() {
this._super();
this.player = videojs(this.$('video')[0], null, function() {
this.play();
});
},
didRender: function() {
View wc.rb
#! /usr/bin/env ruby
require 'bundler/inline'
gemfile do
gem 'rspec', '3.7', require: false
end
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
if $PROGRAM_NAME == __FILE__
# the script itself is being executed
exit
end
require 'rspec'
RSpec.describe 'the script' do
View bundler-inline.rb
require 'bundler/inline'
gemfile do
gem 'rspec', '3.7', require: false
end
View keybase.md

Keybase proof

I hereby claim:

  • I am jswanner on github.
  • I am jswanner (https://keybase.io/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
jswanner / .tmux.conf
Last active Mar 24, 2016
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
View canary.rb
# https://blog.spideroak.com/20140814060007-status-reports-transparency-overall-safety
# https://spideroak.com/canary
# https://en.wikipedia.org/wiki/Warrant_canary
# https://www.eff.org/deeplinks/2014/04/warrant-canary-faq
# https://en.wikipedia.org/wiki/National_security_letter
#
# 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.
View README.md

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: https://github.com/drewbarontini/dotfiles

You can’t perform that action at this time.