Skip to content

Instantly share code, notes, and snippets.

@appleton
appleton / terminal-theme.js
Last active November 23, 2018 12:42
A blink.sh theme
const black = '#272c33'
const red = '#e06b74'
const green = '#98c378'
const yellow = '#e5c07a'
const blue = '#60aeee'
const magenta = '#c677dc'
const cyan = '#56b6c1'
const white = '#abb1bf'
const lightBlack = '#31353f'
const lightRed = '#f97782'
@appleton
appleton / config.js
Created March 23, 2018 16:57
Hyper config
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
@appleton
appleton / keybase.md
Last active June 7, 2016 15:47
keybase.md

Keybase proof

I hereby claim:

  • I am appleton on github.
  • I am appltn (https://keybase.io/appltn) on keybase.
  • I have a public key whose fingerprint is 5C33 F217 E61F F737 CE04 50E8 E464 B0E0 241C 31E4

To claim this, I am signing this object:

@appleton
appleton / feature-checke.hbs
Created January 20, 2015 10:09
Is it possible to add an {{else}} block to an Ember Component?
{{#feature-check name="awesome-feature"}}
It's enabled
{{else}}
It's disabled
{{/feature-check}}
@appleton
appleton / contents-from-ajax.js
Created November 4, 2014 15:29
contents-from-ajax.js
var d = document.createElement('div');
d.innerHTML = 'a load of html that you got back from the server';
var contents = d.querySelector('div.whatever').innerHTML;
describe('A test', function() {
set('data', function() {
return { some: 'stuff' };
});
set('subject', function() {
return new FooThing(data);
});
it('does stuff', function() {
def multiply(x, y)
x * y
end
p [1,2,3].map(&method(:multiply, 2))
# ArgumentError :(
export default function() {
return 'hai';
}
express.use(connect.static({maxAge: 12345}));
@appleton
appleton / callback.rb
Created October 28, 2013 15:31
Denormalizing statesman state onto the parent model.
#...
after_transition do |parent, transition|
parent.state = transition.to_state
parent.save!
end
#...