Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Jason Karns jasonkarns

🏠
Working from home
Block or report user

Report or block jasonkarns

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
@jasonkarns
jasonkarns / index.js
Created May 7, 2015
requirebin sketch
View index.js
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var d = require('domready');
d(function(){
alert("boo")
});
@jasonkarns
jasonkarns / broken.sh
Last active Aug 29, 2015
debug log for rbenv-update
View broken.sh
$ RBENV_DEBUG=1 rbenv update | pbcopy
+ [rbenv:15] enable -f /Users/David/.rbenv/bin/../libexec/rbenv-realpath.dylib realpath
+ [rbenv:21] '[' -n '' ']'
++ [rbenv:25] type -p greadlink readlink
++ [rbenv:25] head -1
+ [rbenv:25] READLINK=/usr/bin/readlink
+ [rbenv:26] '[' -z /usr/bin/readlink ']'
+ [rbenv:50] '[' -z '' ']'
+ [rbenv:51] RBENV_ROOT=/Users/David/.rbenv
+ [rbenv:55] export RBENV_ROOT
@jasonkarns
jasonkarns / .projections.json
Created Mar 13, 2014
vim-projectile file for Lineman projects
View .projections.json
{
"README.md": {
"command": "readme"
},
"package.json": {
"command": "package"
},
"bower.json": {
"command": "bower"
},
View keybase.md

Keybase proof

I hereby claim:

  • I am jasonkarns on github.
  • I am jasonkarns (https://keybase.io/jasonkarns) on keybase.
  • I have a public key whose fingerprint is A0E8 D7D1 099F 66C3 7347 3D66 E87D 122A A9B1 B726

To claim this, I am signing this object:

@jasonkarns
jasonkarns / npm-commands
Created Feb 28, 2014
Npm commands, with aliases grouped and organized by primary command
View npm-commands
adduser add-user login
bin
bugs issues
cache
completion
config c
dedupe ddp find-dupes
deprecate
docs home
edit
@jasonkarns
jasonkarns / munge.coffee
Created Jan 29, 2014
Demonstrate Jasmine spies' odd behavior of verifying against argument references
View munge.coffee
munge = (operator) ->
data = x: 1
data.y = operator(data)
@jasonkarns
jasonkarns / subarray.coffee
Created Jan 26, 2014
subclass array in CoffeeScript
View subarray.coffee
class SubArray
@:: = new Array
constructor: (args...) ->
args.__proto__ = SubArray::
return args
View dispatcher.coffee
# we have an event aggregator that is treated as an adapter to hide
# whatever eventing lib/framework/utility we decide to use
#
# originally, it was backed by Backbone.Events. Now it's Angular's $rootScope
#
# `on` accepts a callback that expects to be given event args. (as backbone.events does)
#
# Angular's $on, on the other hand, accepts a callback that expects
# $scope as the first param, followed by event args.
@jasonkarns
jasonkarns / tap.coffee
Created Nov 16, 2013
What if _.tap could set the context of the interceptor? I would imagine that it would set the context to the tapped object by default. I can't think of a use case for setting it to another arbitrary object.
View tap.coffee
# the thought came to me when dealing with angular
myModule = angular.module('myModule', [])
myModule.value 'X', X
myModule.factory 'F', F
myModule.service 'S', S
# with tap, but without setting context
_(angular.module('myModule', [])).tap (myModule) ->
myModule.value 'X', X
@jasonkarns
jasonkarns / bad-ember-shrinkwrap.json
Created Nov 2, 2013
npm shrinkwraps for linemanjs
View bad-ember-shrinkwrap.json
{
"name": "ember-template",
"version": "0.0.1",
"dependencies": {
"grunt-ember-handlebars": {
"version": "0.7.0",
"from": "grunt-ember-handlebars@0.7.0",
"dependencies": {
"grunt": {
"version": "0.4.1",
You can’t perform that action at this time.