(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var inherits = require('inherits'); | |
| var Game = require('crtrdg-gameloop'); | |
| var Entity = require('crtrdg-entity'); | |
| var Keyboard = require('crtrdg-keyboard'); | |
| inherits(Player, Entity); | |
| function Player(options){ | |
| this.position = { | |
| x: options.position.x, |
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
| body { | |
| margin: 20px 0px 0px 50px; | |
| } | |
| .formattext { | |
| text-align: right; | |
| } | |
| .formatresult { | |
| text-align: left; |
| //this function composes functions like in Haskell (and most other functional languages) | |
| //the final composed function can accept parameters dictated by the chain it creates | |
| //you can pass it a list of functions and it shall apply them from RIGHT to LEFT (right associativeness?) | |
| //eg., c0(fn1, fn2, fn3)(10) => return fn1(fn2(fn3(10))); | |
| // out<---<----<----<=10 | |
| function c0(f, g) { | |
| var last; | |
| if (!arguments.length) return; | |
| if (arguments.length === 1) return f; | |
| if (arguments.length === 2) { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| The MIT License (MIT) | |
| Copyright (c) 2014 NPR | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| 'use strict'; | |
| var React = require('react/addons'); | |
| var _ = require('lodash'); | |
| var setClass = React.addons.classSet; | |
| var MediaObject = React.createClass({ | |
| render: function () { | |
| var classes = setClass({ | |
| 'media-left': this.props.horizontalAlignment === 'left', |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
| // Original | |
| // | |
| // Markup: | |
| // | |
| // <button class="button">Button</button> | |
| // <button class="button button-primary">Button</button> | |
| // <button class="button button-danger">Button</button> | |
| // | |
| // Total selectors: 6 | |
| // Total declarations: 19 |