Skip to content

Instantly share code, notes, and snippets.

@elucid
elucid / ember-b0rked.js
Last active August 29, 2015 13:57
Paste this in the console of a running ember.js app to detect broken markup
// see https://gist.github.com/raycohen/2296605
// see https://github.com/mahonnaise/b0rked.js
var b0rked = 'https://raw.githubusercontent.com/mahonnaise/b0rked.js/master/b0rked.js';
var script= document.createElement('script');
script.type = 'text/javascript';
script.src = b0rked;
document.head.appendChild(script);
var logIfB0rked = function(s) {
@elucid
elucid / application.controller.js
Last active September 30, 2015 21:08
async computed property experiment
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@elucid
elucid / .irbrc.rb
Created September 17, 2016 21:05
save useful stuff from IRB sessions
def save_irb(filename)
File.open(filename,'w') {|f| f.puts Readline::HISTORY.entries[0..-2]}
end
@elucid
elucid / .profile
Created November 30, 2016 15:56
fix ssh auth sock on tmux attach
# Predictable SSH authentication socket location.
SOCK="/tmp/ssh-agent-$USER-screen"
if test $SSH_AUTH_SOCK && [ $SSH_AUTH_SOCK != $SOCK ]
then
rm -f $SOCK
ln -sf $SSH_AUTH_SOCK $SOCK
export SSH_AUTH_SOCK=$SOCK
fi
class NoActiveRecordController < ActionController::Metal
include Honeybadger::Rack::UserFeedback
include Honeybadger::Rack::ErrorNotifier
include Rack::Sendfile
include ActionDispatch::Static
include Rack::Lock
include Rack::Runtime
include Rack::MethodOverride
include ActionDispatch::RequestId
include RequestStore::Middleware
@elucid
elucid / .bash_profile
Created March 13, 2017 20:21
fix ssh-agent in OS X sierra
ssh-add -A
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
initialAmount: null,
hasInitialAmount: Ember.computed.gte('initialAmount', 0),
});
import Ember from 'ember';
const decoder =
{
4: "A",
7: "B",
5: "C",
9: "D",
6: "E",
8: "F",