Skip to content

Instantly share code, notes, and snippets.

View ecmendenhall's full-sized avatar

Connor Mendenhall ecmendenhall

View GitHub Profile
@ecmendenhall
ecmendenhall / check_for_hijacked_modules.sh
Last active March 23, 2016 17:55
A quick script to check npm dependencies for modules hijacked by nj48 (https://www.npmjs.com/~nj48)
#!/usr/bin/env bash
MATCHES=$(npm ls | grep -e " andthen@" \
-e " anglicize@" \
-e " ansi-codes@" \
-e " atbash@" \
-e " attr@" \
-e " attrs@" \
-e " available-slug@" \
-e " background-image@" \
class SpaceJam
def index(item)
if item.is_a?(Hash)
key = item['name']
items[key] = item
increment_name(key)
if item['children']
item['children'].each do |child|
index(child)
@ecmendenhall
ecmendenhall / all_emoji
Created January 27, 2015 05:04
all_emoji
:smile: :smiley: :grinning: :blush: :relaxed: :wink: :heart_eyes:
:kissing_heart: :kissing_closed_eyes: :kissing: :kissing_smiling_eyes:
:stuck_out_tongue_winking_eye: :stuck_out_tongue_closed_eyes:
:stuck_out_tongue: :flushed: :grin: :pensive: :relieved: :unamused:
:disappointed: :persevere: :cry: :joy: :sob: :sleepy: :disappointed_relieved:
:cold_sweat: :sweat_smile: :sweat: :weary: :tired_face: :fearful: :scream:
:angry: :rage: :triumph: :confounded: :laughing: :yum: :mask: :sunglasses:
:sleeping: :dizzy_face: :astonished: :worried: :frowning: :anguished:
:smiling_imp: :imp: :open_mouth: :grimacing: :neutral_face: :confused:
:hushed: :no_mouth: :innocent: :smirk: :expressionless: :man_with_gua_pi_mao:
require_relative '0_parent_child'
require 'rspec'
describe ParentClass do
it 'creates a child class' do
expect(described_class.new.create_child_class).to be_a(ChildClass)
end
end
# Some simple Ruby transducers
# Based on Rich Hickey's "Transducers" talk at Strangeloop 2014
# https://www.youtube.com/watch?v=6mTbuzafcII
# Clojure:
# (defn mapping [f]
# (fn [step]
# (fn [r x] (step r (f x)))))
def mapping(&procedure)
@ecmendenhall
ecmendenhall / unicornleap.md
Last active August 29, 2015 14:03
Unicornleap from a Vagrant VM (OS X)

Unicornleap from Vagrant (OS X)

The vagrant-notify plugin replaces the Linux notify-send command in your Vagrant VM with a Ruby script that forwards notifcations to the host machine. You can use it to invoke unicornleap when your specs pass. (Or, you know, whenever).

On the host

From the host machine, install vagrant-notify:

$ vagrant plugin install vagrant-notify
(menu-bar-mode -1)
(setq visible-bell nil)
(setq ring-bell-function 'ignore)
(disable-theme 'zenburn)
(require 'monokai-theme)
(enable-theme 'monokai)
(require 'evil)
(evil-mode 1)
@ecmendenhall
ecmendenhall / keybase.md
Created March 19, 2014 20:05
keybase.md

Keybase proof

I hereby claim:

  • I am ecmendenhall on github.
  • I am ecm (https://keybase.io/ecm) on keybase.
  • I have a public key whose fingerprint is 2931 AB89 F800 1F61 6455 008C 2D7F 74E9 C1B8 F6DB

To claim this, I am signing this object:

alias doge=cat
alias much=less
alias so=grep
alias wow=ls
alias such=cat
alias very=cd
alias plz=vim
alias halp="head -n 7 $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.dogerc"