$ rails g model User
belongs_to
has_one
(by @andrestaltz)
So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
#!/usr/bin/ruby1.9.1 -Kw | |
# -*- coding: utf-8 -*- | |
class Edge | |
attr_accessor :src, :dst, :length | |
def initialize(src, dst, length = 1) | |
@src = src | |
@dst = dst | |
@length = length |
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |
# First the end result of what we want: | |
class Foo | |
before_hook :whoa | |
before_hook :amazing | |
def test | |
puts "This is kinda cool!" | |
end |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
elem.clientLeft
, elem.clientTop
, elem.clientWidth
, elem.clientHeight
elem.getClientRects()
, elem.getBoundingClientRect()
production: | |
after_symlink: | |
- source: /.cloud66/log_files.yml | |
destination: /etc/log_files.yml | |
sudo: true | |
target: any | |
apply_during: all | |
- source: /.cloud66/remote_syslog.init.d | |
destination: /etc/init.d/remote_syslog |
production: | |
after_rails: | |
- source: /.cloud66/log_files.yml | |
destination: /etc/log_files.yml | |
sudo: true | |
target: rails | |
apply_during: build_only | |
- source: /.cloud66/remote_syslog.init.d | |
destination: /etc/init.d/remote_syslog |
-- https://www.geekytidbits.com/performance-tuning-postgres/ | |
-- http://www.craigkerstiens.com/2012/10/01/understanding-postgres-performance/ | |
-- http://okigiveup.net/what-postgresql-tells-you-about-its-performance/ | |
-- https://wiki.postgresql.org/wiki/Introduction_to_VACUUM,_ANALYZE,_EXPLAIN,_and_COUNT | |
-- https://devcenter.heroku.com/articles/postgresql-indexes#b-trees-and-sorting | |
-- http://www.databasesoup.com/2014/05/new-finding-unused-indexes-query.html | |
-- performance tools | |
-- https://www.vividcortex.com/resources/network-analyzer-for-postgresql | |
-- show running queries (pre 9.2) |