(function (d) {
var w = d.documentElement.offsetWidth,
t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
b;
while (t.nextNode()) {
b = t.currentNode.getBoundingClientRect();
if (b.right > w || b.left < 0) {
(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.
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 | |
# Usage: piperget.sh https://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/ | |
# automated retrieval of pipermail archives & conversion to mbox file | |
# Last edit: 2012/10/09 Tue 23:16 PDT | |
listname=$(echo "$1" | sed 's:^\(http.*\)/\([^/]*\)/$:\2:') | |
cd /tmp | |
wget -r -l 1 -nH -A *.txt.gz "$1" | |
touch /tmp/pipermail/$listname/$listname.mbox | |
chmod 600 /tmp/pipermail/$listname/$listname.mbox | |
cd /tmp/pipermail/$listname |
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
var externalObj = {key: 'value'}; | |
var items = { | |
obj: { | |
'string prop': 'string val', | |
5: 10, | |
nested: [[3, [5, 2]]], | |
'function': function(){return true;}, | |
reference: externalObj | |
}, |
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
defmodule Rotor do | |
@doc """ | |
Starts a new rotor as part of a supervision tree. | |
## Options | |
* `:name` - the registered name of the rotor | |
""" | |
def start_link(paths, opts) do |
Or what the hell do #![no_start]
, #![no_main]
, #[lang = "start"]
, #[start]
, and #[main]
do?
Disable automatically linking in the native crate and thus the default start lang item.
Which means you'll probably need one of: #![no_main]
, #![lang = “start”]
or #[start]
instead
Google Chrome Developers says:
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Some examples of file size differences: WOFF vs. WOFF2
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
augroup elixir | |
au! | |
au BufNewFile,BufRead *.ex,*.exs noremap <buffer> <leader>t :!mix test %<cr> | |
au BufNewFile,BufRead *_test.exs noremap <buffer> <leader>t :!mix test %<cr> | |
augroup END |
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
defmodule M do | |
defmacro common_fields(extra \\ []) do | |
[color: nil, id: nil] ++ extra | |
end | |
end | |
defmodule Pawn do | |
import M | |
defstruct common_fields | |
end |
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
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |