(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.
(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 Toggler = require('./toggler'); | |
| var React = require('react/addons'); | |
| var assert = chai.assert; | |
| var Simulate = React.addons.TestUtils.Simulate | |
| describe('Toggler', function(){ | |
| var toggler, el; | |
| beforeEach(function() { |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| (function(){ | |
| var log = console.log; | |
| console.log = function(str) { | |
| var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;'; | |
| var args = Array.prototype.slice.call(arguments); | |
| args[0] = '%c' + args[0]; | |
| args.splice(1,0,css); | |
| return log.apply(console, args); | |
| } |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
(The below text is licensed with CC0, which means that if you want to use or translate it, that is OK by me.)
Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺
Locally, I'm at this commit:
$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <[email protected]>
Date: Sun Apr 15 16:35:03 2012 +0200
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| // JS Module Pattern: | |
| // http://j.mp/module-pattern | |
| // Redefine: $, window, document, undefined. | |
| var APP = (function($, window, document, undefined) { | |
| // Automatically calls all functions in APP.init | |
| $(document).ready(function() { | |
| APP.go(); | |
| }); |