start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env python | |
| # Python script to make Skype co-operate with GNOME3 notifications. | |
| # | |
| # | |
| # Copyright (c) 2011, John Stowers | |
| # | |
| # Adapted from skype-notify.py | |
| # Copyright (c) 2009, Lightbreeze | |
| # | |
| # |
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |
Add this to Info.plist in /System/Library/Spotlight/RichText.mdimporter/Contents/ and Spotlight will search for source code files.
<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
public.c-plus-plus-source
(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.
| #!/bin/sh | |
| # Firefox Developer Edition install | |
| # No need to download this script, just run it on your terminal: | |
| # $ curl -L git.io/firefoxdev | sh | |
| # When you need to update Firefox Developer Edition, run this script again. | |
| START_CMD="firefox-dev" | |
| INSTALLATION_DIR="/opt/${START_CMD}" |
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| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
| /** | |
| * Updates the passed dialog to retain focus and restore it when the dialog is closed. Won't | |
| * upgrade a dialog more than once. Supports IE11+ and is a no-op otherwise. | |
| * @param {!HTMLDialogElement} dialog to upgrade | |
| */ | |
| var registerFocusRestoreDialog = (function() { | |
| if (!window.WeakMap || !window.MutationObserver) { | |
| return function() {}; | |
| } | |
| var registered = new WeakMap(); |