Usefulness is indicated by amount of stars.
All are currently Mac only
Shift + Cmd + A
Ctrl + Shift + W
| /* Supported IE8+ */ | |
| .el { | |
| display: table-row; | |
| width: 100%; | |
| } |
| #!/bin/bash | |
| #Inspired by http://blog.neutrino.es/2012/git-copy-a-file-or-directory-from-another-repository-preserving-history/ | |
| #Copy a file or directory out of a git repository, preserving history! | |
| #Creates DESTINATIONPATH with patches that can be applied with git am | |
| #e.g. | |
| #0001-Add-new-theme-Gum.patch | |
| #0002-Add-syntax-highlighting-for-Gum-theme.patch | |
| #0003-Gum-Fix-tag-URLs-not-being-slugified-and-therefore-b.patch | |
| #0004-Gum-Add-Disqus-support.patch | |
| #0005-Gum-Use-article-title-as-the-title-of-the-generated-.patch |
| #!/bin/bash | |
| # $ ./gitmove [destGitRepo] [src_file] | |
| DEST_FOLDER=$1 | |
| # this will take all parameters AFTER the first. So you can give a list, or a glob (which is expanded into separate params) | |
| SOURCE_FILES="${@:2}" | |
| # SOURCE_FILE=$2 | |
| STARTING_FOLDER=$(pwd) |
| // This is a 'curried' function. If it receives less params than it expects, it returns a function which expects the rest of the params. | |
| function add(a, b) { | |
| // if 2nd param wasn't passed, return a function that holds the 1st param via closure, but expects another param. | |
| if (typeof b === "undefined") { | |
| return function(c) { | |
| a + c; | |
| } | |
| } | |
| // if 2 params are passed return the result |
| YUI.add('breeze-nav', function(Y) { | |
| Y.namespace('bb.session.Nav'); | |
| bb.session.Nav = function() { | |
| // expose an API | |
| // this in here will execute when it's pulled in through YUI().use() | |
| }; | |
| var getNode = function(el) { | |
| //fetch the node by selector, or wrap it in a new YUI Node instance | |
| return Y.one('#' + el) || new Y.Node(el); | |
| }; | |
| //from http://stackoverflow.com/questions/4892051/how-can-i-normalise-a-javascript-object-to-a-dom-element-with-yui3 |
| var headID = document.getElementsByTagName("head")[0]; | |
| //create new script | |
| var newScript = document.createElement('script'); | |
| newScript.type = 'text/javascript'; | |
| //add callback | |
| newScript.onload = function(){ alert("loaded");}; | |
| newScript.src = 'http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js'; |
| //of this will execute privately without exposing the variables to the global object and without polluting the global namespace. | |
| (function(){ | |
| console.log("runs"); | |
| function test(){ | |
| //console | |
| console.log("test"); | |
| } |
| /* (taken from bootstrap github conversation) */ | |
| /* Utility classes */ | |
| /* Clearfix */ | |
| /* Clearfix for modern browsers */ | |
| .cf:before, | |
| .cf:after { | |
| content: ""; | |
| display: table; |