(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.
| /** | |
| * Debounce a function so that it will only fire once | |
| * | |
| * USAGE EXAMPLE: | |
| * $scope.search = debounce(performSearch, 500); // Bind to ng-keyup | |
| * | |
| * http://davidwalsh.name/javascript-debounce-function | |
| * | |
| * @param func [Function] - The function to execute |
| /** | |
| * VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
| * | |
| * To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
| * It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
| * the height of element `.foo` —which is a full width and height cover image. | |
| * | |
| * iOS Resolution Quick Reference: http://www.iosres.com/ | |
| */ | |
(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.
| function copyToClipboard( text ){ | |
| var copyDiv = document.createElement('div'); | |
| copyDiv.contentEditable = true; | |
| document.body.appendChild(copyDiv); | |
| copyDiv.innerHTML = text; | |
| copyDiv.unselectable = "off"; | |
| copyDiv.focus(); | |
| document.execCommand('SelectAll'); | |
| document.execCommand("Copy", false, null); | |
| document.body.removeChild(copyDiv); |
| #!/bin/bash | |
| file=$1 | |
| test -z $file && echo "file required." 1>&2 && exit 1 | |
| git filter-branch -f --index-filter "git rm -r --cached $file --ignore-unmatch" --prune-empty --tag-name-filter cat -- --all | |
| git ignore $file | |
| git add .gitignore | |
| git commit -m "Add $file to .gitignore" |
| Here is a list of scopes to use in Sublime Text 2 snippets - | |
| ActionScript: source.actionscript.2 | |
| AppleScript: source.applescript | |
| ASP: source.asp | |
| Batch FIle: source.dosbatch | |
| C#: source.cs | |
| C++: source.c++ | |
| Clojure: source.clojure | |
| CoffeeScript: source.coffee |