Skip to content

Instantly share code, notes, and snippets.

View wm's full-sized avatar

Will Mernagh wm

View GitHub Profile
@bfitch
bfitch / embrace_the_javascript_ecosystem.md
Created May 4, 2018 18:42
#EmberJS2018: Embrace the Javascript Ecosystem

#EmberJS2018: Embrace the Javascript Ecosystem

Adopting a convention usually means eliminating inconsequential choices or, in the event that there are two or more viable options, picking one as the blessed path. Ember was launched in a much different environment than today and it made some excellent choices by:

  1. Building missing language and platform features like the Ember object/class model, Ember.Enumerable and utils, RSVP, Backburner.js, and even ember addons

  2. Rallying around one choice in a crowded and chaotic ecosystem, like broccoli.js, testem/qunit, JSON-API, and ember-cli.

But, as the JS ecosystem has matured, many of those initial choices are simply not needed or the community has embraced other solutions.

@borjaburgos
borjaburgos / blue-green
Created June 6, 2015 18:17
ContainerDays
lb:
image: 'tutum/haproxy:latest'
autorestart: always
links:
- web-green
ports:
- '80:80'
roles:
- global
deployment_strategy: high_availability

docs

To start godoc at log in time (so it always there on port 6060 when you need it):

  1. copy smarticus.godoc.plist to in ~/Library/LaunchAgents
  2. launchctl load ~/Library/LaunchAgents/smarticus.godoc.plist
  3. visit http://localhost:6060
@honzakral
honzakral / -README.rst
Last active August 24, 2020 09:24
WebExpo demo
-- This script includes examples for using AppleScript to perform several
-- useful tasks with Evernote.
-- Each section illustrates a chunk of Evernote's AppleScript interface,
-- and each section also cleans up after itself.
-- Please refer to the Evernote application's scripting dictionary for
@davejachimiak
davejachimiak / mappings.vim
Created February 12, 2013 13:48
Mappings for opening related js.coffee file in rails.
" ...
function! OpenRelatedCoffeeFile(action)
let action = a:action
if match(expand('%'), 'app/assets') != -1
exec action . " " . expand("%:s?app/assets?spec?:s?.js.coffee?_spec.js.coffee?")
else
exec action . " " . expand("%:s?^spec?app/assets?:s?_spec??")
endif
endfunction
class Exception
def pretty
trace = backtrace.select{ |l|l.start_with?(Rails.root.to_s) }.join("\n ")
"#{self.class}\n#{message}\n#{trace}\n"
end
end
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
module Watchable
def events
@events ||= Hash.new { |h,k| h[k] = [] }
end
def fire event, *args
events[event].each { |e| e[*args] }
end
def on event, &block
@avdi
avdi / when.rb
Created December 5, 2011 22:17
Experimenting with Object#when in Ruby
def maybe_a_sandwich
nil
end
# Methods that might return nil are annoying. We want to write a nice
# confident chain:
result = nil
result = maybe_a_sandwich.add_horseradish.get_into_my_belly! rescue $!
result # => #<NoMethodError: undefined method `add_horseradish' for nil:NilClass>