This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`import DS from 'ember-data'` | |
ApplicationAdapter = DS.FixtureAdapter.extend() | |
`export default ApplicationAdapter` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure to install blessings first (pip install blessings) | |
from blessings import Terminal | |
t = Terminal() | |
fg_colors = [t.color(i) for i in range(0, 15)] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def playlist | |
[{:title "Elephant", :artist "The White Stripes", :year 2003} | |
{:title "Helioself", :artist "Papas Fritas", :year 1997} | |
{:title "Stories from the City, Stories from the Sea", | |
:artist "PJ Harvey", :year 2000} | |
{:title "Buildings and Grounds", :artist "Papas Fritas", :year 2000} | |
{:title "Zen Rodeo", :artist "Mardi Gras BB", :year 2002}]) | |
; (group-by :artist playlist) returns: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(filter (comp (partial <= 25) :age) [{:age 21 :name "David"} | |
{:gender :f :name "Suzanne" :age 20} | |
{:name "Sara" :location "NYC" :age 34}]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by CoffeeScript 1.4.0 | |
(function() { | |
var QuestionSet; | |
window.app || (window.app = {}); | |
QuestionSet = Backbone.Model.extend({ | |
defaults: { | |
operation: 'addition', | |
group: '0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.app or= {} | |
QuestionSet = Backbone.Model.extend | |
defaults: | |
operation: 'addition' | |
group: '0' | |
currentOperand: null | |
questionsPerSet: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.app or= {} | |
ProblemView = Backbone.View.extend | |
el: '#problemContainer' | |
initilize: (operation='addition', group='0') -> | |
otherOperand = Math.floor Math.random()*10 | |
# the result cannot be negative, order matters (put the larger number first) | |
if operation is 'subtraction' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# display an rfc in `less` | |
# NOTE: this script depends on the following 'rfc' package: http://www.archlinux.org/packages/community/any/rfc/ | |
# install with `pacman -S rfc` | |
RFC_LOCATION="/usr/share/doc/rfc/txt/" | |
if [ $# -lt 1 ]; then |
NewerOlder