I published this email exchange as a full post at csswizardry.com/…/can-css-be-too-modular.
| function foo(x) { x = (typeof x != "undefined") ? x : 10; .. } | |
| function foo(x = 10) { .. } | |
| function foo(x,y,z) { .. }; foo.apply(null,[1,2,3]); | |
| function foo(x,y,z) { .. }; foo(...[1,2,3]); | |
| function foo() { var args = [].slice.call(arguments); .. } | |
| function foo(...args) { .. } | |
| var o = { x: 2, y: 3 }, x = o.x, y = o.y, z = (typeof o.z != "undefined") ? o.z : 10; |
| # Set variables in .bashrc file | |
| # don't forget to change your path correctly! | |
| export GOPATH=$HOME/golang | |
| export GOROOT=/usr/local/opt/go/libexec | |
| export PATH=$PATH:$GOPATH/bin | |
| export PATH=$PATH:$GOROOT/bin |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
Dan DeLeo appeared on the FoodFightShow some time ago to walk through "what a Chef run really does". I expanded on these remarks in my personal investigation.
-
bin/chef-clientcreates a newChef::Application::Client(subclass ofChef::Applicationwhich sets up common things like loggers across chef-client, chef-solo, knife, etc.) then jump to: -
lib/chef/client.rb -
application classes create a new
Chef::Clientobject, which callsinitialize().
| #!/bin/bash | |
| # Here short description of this script | |
| # This is just a template to be used for writing new bash scripts | |
| ### | |
| # Based on Google Style Guide: https://google.github.io/styleguide/shell.xml | |
| # General remarks | |
| # * Executables should have no extension (strongly preferred) or a .sh extension. | |
| # * Libraries must have a .sh extension and should not be executable |
| defmodule DBL.Message.Channel do | |
| def subscribe([]), do: :ok | |
| def subscribe([chan | rest]) do | |
| case :pg2.join "stream/" <> chan, self do | |
| {:error, {:no_such_group, _}} -> | |
| :ok = :pg2.create "stream/" <> chan | |
| :ok = :pg2.join "stream/" <> chan, self | |
| :ok -> | |
| :ok |
(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.
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
This section describes the conventions used here to describe type signatures.
A [T] is an array-like value (only ever used read-only in this API), i.e., one with an integer length and whose indexed properties from 0 to length - 1 are of type T.
A type T? should be read as T | undefined -- that is, an optional value that may be undefined.