Skip to content

Instantly share code, notes, and snippets.

View lennyburdette's full-sized avatar

Lenny Burdette lennyburdette

  • Apollo GraphQL
  • Boston
View GitHub Profile
@lennyburdette
lennyburdette / gist:2008816
Created March 9, 2012 21:33
Cards against humanity poetry
Bill nye the science guy/sobbing into a hungry man frozen dinner/a murder most foul.
Amputees/assless chaps/a mating display.
Dick Cheney/getting really high/teaching a robot to love.
Glenn beck catching his scrotum on a curtain hook/Glenn beck convulsively vomiting as a brood of spiders hatches in his brain and erupts from his tear ducts/Muhammad (praise be unto him.)
@lennyburdette
lennyburdette / config.ru
Created July 12, 2013 20:00
Learn Rails Inside and Out: Rack example code
require 'rack'
your_app = Proc.new { [200, {}, ["Hello World!"]] }
Rack::Server.start app: your_app, Port: 9292
#####################################################################
your_app = proc { [200, {}, ["Hello World!"]] }
run your_app
#####################################################################
@lennyburdette
lennyburdette / index.html
Last active December 28, 2015 22:09
d3 table
<html>
<head>
<title>stuff</title>
<style type="text/css">
body {
font: 12px helvetica;
}
</style>
</head>
<body>
require 'concurrent'
class Observer
attr_reader :key
def initialize(event, key)
@event = event
@key = key
@finished = false
end
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
stroke: #fff;
stroke-width: 1.5px;
}
.link {
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'input',
attributeBindings: ['type','min','max','step'],
type: 'range',
min: 1,
max: 5,
step: 1,
input(e) {
import Ember from 'ember';
export default Ember.Component.extend({
modal: Ember.inject.service(),
actions: {
close() {
this.get('modal').close();
}
}
import Ember from 'ember';
export default Ember.TextField.extend(Ember.ViewTargetActionSupport, {
input(event) {
this.action(event.target.value);
}
});
import Ember from 'ember';
/*
This component manages:
* Converting an arbitrary array of objects in options (objects with a value and label)
for inner select component.
* The filter text and the filtered list of options.
* The proposed option, held temporarily until the selection is committed or discarded.
* Converting the option back into the original value in the action up to the calling comment.
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
baz: true,
actions: {
foo() {
console.log(arguments);
}