A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| [ | |
| { | |
| "keys": ["ctrl+2"], | |
| "command": "run_macro_file", | |
| "args": { | |
| "file": "Packages/User/to-2.sublime-macro" | |
| } | |
| }, | |
| { | |
| "keys": ["ctrl+4"], |
| // This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.github.io | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
| */ |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| /** | |
| * PE to use SVG as CSS background image with fallback for IE8/7/6 | |
| * | |
| * Using SVG as CSS background image to display | |
| * resolution-independent logos or icons is pretty | |
| * awesome but does completely fail on IE8/7/6 | |
| * | |
| * The trick: | |
| * All three IE versions don't support rgba color values. | |
| * By defining a rgba background color together with the |
| <?php | |
| add_filter( 'cmspo_post_types', 'be_sort_rotator' ); | |
| /** | |
| * CMS Page Order for Rotator post type | |
| * @author Bill Erickson | |
| * @link http://www.billerickson.net/code/change-post-types-cms-page-order/ | |
| * | |
| * @param array $post_types (default is array( 'page' ) ) | |
| * @return array $post_types modified |
| ''' | |
| @author Josh Bjornson | |
| This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. | |
| To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ | |
| or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | |
| ''' | |
| # Plugin to provide access to the history of accessed files: | |
| # https://gist.github.com/1133602 | |
| # |
| // $('img.photo',this).imagesLoaded(myFunction) | |
| // execute a callback when all images have loaded. | |
| // needed because .load() doesn't work on cached images | |
| // Modified with a two-pass approach to changing image | |
| // src. First, the proxy imagedata is set, which leads | |
| // to the first callback being triggered, which resets | |
| // imagedata to the original src, which fires the final, | |
| // user defined callback. |
| @mixin fancy-hover($sprite_dir, $off_state, $hover_state, $speed: 0.3s) | |
| $sprites: sprite-map("#{$sprite_dir}/*.png") | |
| $width: image-width(sprite_file($sprites, $off_state)) | |
| $height: image-height(sprite_file($sprites, $off_state)) | |
| @include hide-text | |
| width: $width | |
| height: $height | |
| background: sprite($sprites, $off_state) no-repeat | |
| display: block | |
| position: relative |
| """ | |
| jQuery templates use constructs like: | |
| {{if condition}} print something{{/if}} | |
| This, of course, completely screws up Django templates, | |
| because Django thinks {{ and }} mean something. | |
| Wrap {% verbatim %} and {% endverbatim %} around those | |
| blocks of jQuery templates and this will try its best |