This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
/** | |
* Polyfill for the vw, vh, vm units | |
* Requires StyleFix from -prefix-free http://leaverou.github.com/prefixfree/ | |
* @author Lea Verou | |
*/ | |
(function() { | |
if(!window.StyleFix) { | |
return; |
In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.
The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.
// SVG custom feature detection and svg to png fallback | |
// toddmotto.com/mastering-svg-use-for-a-retina-web-fallbacks-with-png-script#update | |
function supportsSVG() { | |
return !! document.createElementNS && !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect; | |
} | |
if (supportsSVG()) { | |
document.documentElement.className += ' svg'; | |
} else { | |
document.documentElement.className += ' no-svg'; | |
var imgs = document.getElementsByTagName('img'), |
// Returns a function, that, when invoked, will only be triggered at most once | |
// during a given window of time. | |
var throttle = function(func, wait) { | |
var context, args, timeout, throttling, more, result; | |
var whenDone = _.debounce(function(){ more = throttling = false; }, wait); | |
return function() { | |
context = this; args = arguments; | |
var later = function() { | |
timeout = null; | |
if (more) func.apply(context, args); |
function hasClass(elem, className) { | |
return new RegExp(' ' + className + ' ').test(' ' + elem.className + ' '); | |
} | |
function addClass(elem, className) { | |
if (!hasClass(elem, className)) { | |
elem.className += ' ' + className; | |
} | |
} |
/* | |
* jQuery wraplines plugin | |
* | |
* Copyright (c) 2010 Paul Bennett (http://pmbennett.net) | |
* Licensed under the MIT License: | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
*/ | |
jQuery.fn.wraplines = function(options) { |
#Error management in gulp
Sucking at something is the first step to becoming sorta good at something
No one can assure you, that plugins will run smooth in any circumstances (except for tests - they could), so neither should you convince anyone, that your plugin will never break. Only thing, that you could possibly do (if something gone wrong) - is gracefully inform your plugin user, that something went wrong and die.
We are will use this plugin from beginning to demonstrate error management. Suppose you have a task in gulpfile.js
that contains this code (we modified it a little bit to be closer to real-usage):
var coffee = require('gulp-coffee');
// # Mocha Guide to Testing | |
// Objective is to explain describe(), it(), and before()/etc hooks | |
// 1. `describe()` is merely for grouping, which you can nest as deep | |
// 2. `it()` is a test case | |
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run | |
// before/after first/each it() or describe(). | |
// | |
// Which means, `before()` is run before first it()/describe() |
#ST2/3 Search result syntax highlighting
##Introduction and disclaimer
This is gist contains an edited Find Results.hidden-tmLanguage
which adds syntax highlighting to your ST search results.
As far as I know, there is no plugin that does this and for that reason it needs to be done via config.
DISCLAIMER: Use this HACK at your risk and backup the original files you are about to mess with.
##Usage Guide for Sublime Text 2