- OSX defaults: https://gist.github.com/meleyal/5890865
- Terminal next/previous tab shorcuts: http://hints.macworld.com/article.php?story=20071030192108181
- Sync Sublime Text 2 settings with Dropbox: https://coderwall.com/p/s1vdtw
- Chrome
- 1Password
#!/usr/bin/ruby | |
# Instructions | |
# - Install optipng + libjpeg (http://mxcl.github.com/homebrew/) | |
# - Put this file in a directory of images | |
# - Open in TextMate + run it (cmd+r) | |
# Config |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>GitHub</string> | |
<key>settings</key> | |
<array><dict><key>name</key><string>mon_color</string><key>scope</key><string>mcol_999988FF</string><key>settings</key><dict><key>background</key><string>#999988FF</string><key>caret</key><string>#000000FF</string><key>foreground</key><string>#000000FF</string></dict></dict> | |
<dict><key>name</key><string>mon_color</string><key>scope</key><string>mcol_666666FF</string><key>settings</key><dict><key>background</key><string>#666666FF</string><key>caret</key><string>#FFFFFFFF</string><key>foreground</key><string>#FFFFFFFF</string></dict></dict> | |
<dict><key>name</key><string>mon_color</string><key>scope</key><string>mcol_999999FF</string><key>settings</key><dict><key>background</key><string>#999999FF</string><key>caret</key><string>#000000FF</string><key>foreground</key><string>#000000 |
Create a new default search engine without the {google:instantExtendedEnabledParameter}
token:
Before:
{google:baseURL}search?q=%s&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}ie={inputEncoding}
After:
{google:baseURL}search?q=%s&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}ie={inputEncoding}
### | |
**ConditionalField** toggles the visibility of other elements | |
based on the state of a form field. | |
Usage: | |
<input data-show="#example1" data-unless="blank"> | |
<input data-hide="#example2" data-if="['A', 'B', 'C']"> | |
$('[data-if], [data-unless]').conditionalField() |
### | |
**TextUpdater**: change the text of one or more elements when another element changes. | |
Usage: | |
<input data-updates="#price, #vat-price" data-price="40 €" data-vat-price="48 €"> | |
<input data-updates="#price, #vat-price" data-price="80 €" data-vat-price="88 €"> | |
$('[data-updates]').textUpdater() | |
Example 1: |
### | |
Backbone.PluginView | |
https://github.com/meleyal/backbone.pluginview | |
Copyright (c) 2012 William Meleyal | |
MIT License | |
Make jQuery plugins from your Backbone Views. | |
Backbone.PluginView extends Backbone.View with some simple helpers for creating jQuery plugins ($.fn). |
# Get all the jQuery bound events on an element: | |
console.log $._data(el, 'events') | |
# Create and remove multiple instances of a view: | |
window.installTest = -> | |
views = [] | |
viewClass = MyView | |
options = {} |
If you've already wrote the code, try commenting it all out, then start testing it piece by piece.
Test the public API (not internal/implementation details)
Test as little as possible to reach a given level of confidence
Test the critical parts of your application
Test expectations not implementations