start new:
tmux
start new with session name:
tmux new -s myname
// Add a Mustache.js templating function to your JavaScript: | |
Mustache.template = function(templateString) { | |
return function() { | |
return Mustache.to_html(templateString, arguments[0], arguments[1]); | |
}; | |
}; | |
// And then, in assets.yml, you can set "template_function" to "Mustache.template". |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
// sets globals: | |
// __stack, | |
// __line, | |
// __file, | |
// __function, | |
// __ext, | |
// __base | |
// we already have these: | |
// __filename which gives as an example: /Users/mjr/example.js |
(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.
while :; do; say -v Whisper "is anybody there"; sleep 3; done |
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.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription
. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
JedWatson/classnames (2650855 dls, 1465 stars) | |
yannickcr/eslint-plugin-react (2077066 dls, 710 stars) | |
rackt/react-router (1833204 dls, 9050 stars) | |
facebook/react-dom (782024 dls, 33044 stars) | |
gaearon/react-hot-loader (708042 dls, 3250 stars) | |
rackt/redux (568969 dls, 10743 stars) | |
rackt/react-redux (495498 dls, 1509 stars) | |
jsdf/coffee-react-transform (463488 dls, 380 stars) | |
JedWatson/react-input-autosize (455277 dls, 107 stars) | |
reflux/reflux (393281 dls, 4316 stars) |
#!/usr/bin/env phantomjs --disk-cache=false | |
/* | |
Load one or more URLs requesting Akamai CDN diagnostic information for every resource | |
and list resources which are configured not to be cached: | |
phantomjs check-akamai-status.js https://www.microsoft.com/ http://www.state.gov https://www.wdl.org/en/ | |
Additional timing information will be displayed to easily distinguish between requests | |
made before DOMContentLoaded or the full load event. | |
*/ |