Usefulness is indicated by amount of stars.
All are currently Mac only
Shift + Cmd + A
Ctrl + Shift + W
| #!/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 |
| - my normal flow? | |
| - good commit messages ****** | |
| - searching commit messages (group by keywords) | |
| - searching code * | |
| - working with history (viewing, time traveling) | |
| - rebasing (for pulling & squashing, splitting a commit) * | |
| - undoing local commits (soft, hard reset) | |
| - forgot to add / change message (amend) | |
| - LOST commits? * |
| /* Supported IE8+ */ | |
| .el { | |
| display: table-row; | |
| width: 100%; | |
| } |
| /* (taken from bootstrap github conversation) */ | |
| /* Utility classes */ | |
| /* Clearfix */ | |
| /* Clearfix for modern browsers */ | |
| .cf:before, | |
| .cf:after { | |
| content: ""; | |
| display: table; |
TJ HollowayChuck (creator of Express)
"personally I find large rails-style structure difficult to work with for large applications (great for small ones however). A more modular approach like Drupal is a big win as far as management goes but it can complicate some things (layout templates) so you kind of need
| //add this code at the end of "functions.php" (Theme Functions). This can be accessed through the WP admin menu under Appearance -> Editor -> Theme Functions | |
| //this is the logic to get the posts you want | |
| function displayHomePosts(){ | |
| //default values obj from post.php. | |
| //pass these in as args that you really want | |
| $defaults = array( | |
| 'numberposts' => 5, 'offset' => 0, | |
| 'category' => 0, 'orderby' => 'post_date', |
| function sanitizeJSON(unsanitized){ | |
| return unsanitized.replace(/\\/g, "\\\\").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t").replace(/\f/g, "\\f").replace(/"/g,"\\\"").replace(/'/g,"\\\'").replace(/\&/g, "\\&"); | |
| } |
| //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"); | |
| } |
| 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'; |