Skip to content

Instantly share code, notes, and snippets.

View chodorowicz's full-sized avatar

Jakub Chodorowicz chodorowicz

View GitHub Profile
@beaugunderson
beaugunderson / Default (OSX).sublime-keymap
Created January 23, 2014 23:22
Sublime Text macros for converting to and from 2 and 4 space indentation
[
{
"keys": ["ctrl+2"],
"command": "run_macro_file",
"args": {
"file": "Packages/User/to-2.sublime-macro"
}
},
{
"keys": ["ctrl+4"],
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

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

@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// 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
*/
@eoinoc
eoinoc / gist:1958143
Created March 2, 2012 12:37
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@iansoper
iansoper / dabblet.css
Created January 5, 2012 16:07 — forked from bastianallgeier/dabblet.css
PE to use SVG as CSS background image with fallback for IE8/7/6
/**
* 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
@billerickson
billerickson / gist:1380344
Created November 20, 2011 15:12
CMS Page Order for Rotator post type
<?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
@jbjornson
jbjornson / open_recently_closed_file.py
Last active July 27, 2017 20:35
Plugin that keeps track of which files have been recently closed, as well as files that have been recently accessed. The plugin can be used to simply open the last file you closed or can be used to display a quick panel with a list of recently accessed f
'''
@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
#
@yconst
yconst / gist:964345
Created May 10, 2011 12:00 — forked from paulirish/README.md
imagesLoaded() jquery plugin
// $('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.
@nathos
nathos / fancy-hover-mixin.sass
Last active September 25, 2015 17:47
Compass fancy-hover - snazzy-looking image replacement hovers with an animated opacity ramp. Now using Compass sprites so you don't have to do the dirty work! See the demo at http://nathos.github.com/fancy-hovers/
@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