NOTE: Anything in angle brackets like <this>
should be replaced with your own value
Global ignore file
git config --global core.excludesfile ~/.gitignore_global
More about ignoring files and sensible defaults for ~/.gitignore
/* Copyright (C) 2012-2014 Kurt Milam - http://xioup.com | Source: https://gist.github.com/1868955 | |
* | |
* This mixin now has its own github repository: https://github.com/kurtmilam/underscoreDeepExtend | |
* It's also available through npm and bower | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFR |
// swap the keybindings for paste and paste_and_indent | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" } |
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
NOTE: Anything in angle brackets like <this>
should be replaced with your own value
Global ignore file
git config --global core.excludesfile ~/.gitignore_global
More about ignoring files and sensible defaults for ~/.gitignore
<?php | |
//Deletes all CSS classes and id's, except for those listed in the array below | |
function custom_wp_nav_menu($var) { | |
return is_array($var) ? array_intersect($var, array( | |
//List of allowed menu classes | |
'current_page_item', | |
'current_page_parent', | |
'current_page_ancestor', | |
'first', | |
'last', |
$.fn.stripClass = function (partialMatch, endOrBegin) { | |
/// <summary> | |
/// The way removeClass should have been implemented -- accepts a partialMatch (like "btn-") to search on and remove | |
/// </summary> | |
/// <param name="partialMatch">the class partial to match against, like "btn-" to match "btn-danger btn-active" but not "btn"</param> | |
/// <param name="endOrBegin">omit for beginning match; provide a 'truthy' value to only find classes ending with match</param> | |
/// <returns type=""></returns> | |
var x = new RegExp((!endOrBegin ? "\\b" : "\\S+") + partialMatch + "\\S*", 'g'); | |
// http://stackoverflow.com/a/2644364/1037948 |
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')
From here on out, use Package Control to install everything. ⌘
+Shift
+P
, then type Install
to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.
// adapted from https://gist.github.com/adaline/7363853 which read the image from a file | |
// modified to support posting to twitter update_with_media - with image from s3 rather than a | |
// local file. | |
(function() { | |
var fs, path, request, twitter_update_with_media; | |
fs = require('fs'); | |
path = require('path'); |
jQuery.csi = function csi( context ){ | |
$( '[data-include]', context || document ).each( function fetchPartial(){ | |
var $placeholder = $( this ); | |
var location = $placeholder.attr( 'data-include' ); | |
$.ajax( { url : location, async : false } ).done( function injectPartial( response ){ | |
var $partial = $( response ); | |
csi( $partial ); |