Like so: var s = `abc`;
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^a w | |
New -s <session> Create ^a c | |
Attach att -t <session> Rename ^a , <name> | |
Rename rename-session -t <old> <new> Last ^a l (lower-L) | |
Kill kill-session -t <session> Close ^a & |
This file contains hidden or 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
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
This file contains hidden or 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
module.exports = (function () { | |
var _ = require('underscore'); | |
var isCollection = function(item) { | |
return (_.isObject(item) || _.isArray(item) || _.isArguments(item)); | |
}; | |
var complement = function(fn) { | |
return function() { |
This file contains hidden or 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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Rebuild to run it on the right | |
var _ = require('lodash'); | |
var talk = function( phraseObj ) { | |
var obj = _.cloneDeep(phraseObj); | |
return function() { | |
console.log(obj.phrase); | |
}; | |
}; |
The iOS app Workflow is the greatest thing since whatever the last great thing was, and I am diving in head first.
One of the first problems I've run into is the inability of the If
action to detect the absence of a string.
Why would you want to?
Let's say you have a workflow that's processing a JSON result that has optional fields, and there's something you'd like to do, but only if a certain key is present.
This file contains hidden or 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
# Google Search for Pythonista (iOS) | |
# Searches Google and copies the first result to the clipboard as | |
# a Markdown link in the form [title](url). | |
# | |
# Inspired by Brett Terpstra's SearchLink: | |
# http://brettterpstra.com/searchlink-automated-markdown-linking-improved/ | |
import clipboard | |
def google(terms): |
This file contains hidden or 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
// Works like underscore-contrib's getPath function. | |
// Takes a promise that will resolve to an object and a dot notation string specifying a path. | |
// | |
// Cannot know if path exists in resolved value - returned promise will reject with a TypeError if you | |
// specify a subkey of a nonexistent key, and undefined for a single | |
// nonexistent key. | |
function promiseForPath(promise, path) { | |
var k = path.split('.'); | |
return k.reduce(function(memo, item){ |
This file contains hidden or 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
@@ -50,7 +50,7 @@ import android.widget.LinearLayout; | |
import android.widget.RelativeLayout; | |
import org.apache.cordova.CallbackContext; | |
-import org.apache.cordova.Config; | |
+import org.apache.cordova.Whitelist; | |
import org.apache.cordova.CordovaArgs; | |
import org.apache.cordova.CordovaPlugin; | |
import org.apache.cordova.CordovaWebView; | |
@@ -143,6 +143,7 @@ public class InAppBrowser extends CordovaPlugin { |