⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colorizing. Source: http://systhread.net/texts/200703bashish.php. | |
DULL=0 | |
BRIGHT=1 | |
FG_BLACK=30 | |
FG_RED=31 | |
FG_GREEN=32 | |
FG_YELLOW=33 | |
FG_BLUE=34 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colorizing. Source: http://systhread.net/texts/200703bashish.php. | |
DULL=0 | |
BRIGHT=1 | |
FG_BLACK=30 | |
FG_RED=31 | |
FG_GREEN=32 | |
FG_YELLOW=33 | |
FG_BLUE=34 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******************************************* | |
// Level 1, basic API, minimum support | |
//******************************************* | |
/* | |
Modules IDs are strings that follow CommonJS | |
module names. | |
*/ | |
//To load code at the top level JS file, | |
//or inside a module to dynamically fetch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
# that enables you to choose a character from a menu of options. If you are on Lion | |
# try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
# for input. | |
# | |
# It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
# it's a nightmare to deal with in Sublime Text 2 if you're running Vintage (Vim) mode, | |
# as it means you cannot press and hold h/j/k/l to move through your file. You have | |
# to repeatedly press the keys to navigate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X) | |
h2. General | |
| *⌘T* | go to file | | |
| *⌘⌃P* | go to project | | |
| *⌘R* | go to methods | | |
| *⌃G* | go to line | | |
| *⌘KB* | toggle side bar | | |
| *⌘⇧P* | command prompt | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: Failed to update tap: caskroom/versions | |
brew untap caskroom/cask | |
brew update | |
brew cleanup --force -s | |
rm -rf "$(brew --cache)" | |
brew tap caskroom/cask | |
This removed what I believe is a unnecessary single quote in the rm command and a period that was probably not intended after the last command | |
Also in my case, I needed to add sudo for the remove command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", "https://api.box.com/2.0/files/76537235577/thumbnail.png?min_height=150&min_width=150", true); | |
xhr.setRequestHeader("Authorization", "Bearer your_access_token"); | |
xhr.responseType = "arraybuffer"; | |
xhr.onload = function(e) { | |
if (this.status == 200) { | |
var uInt8Array = new Uint8Array(this.response); | |
var i = uInt8Array.length; | |
var binaryString = new Array(i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", "https://api.box.com/2.0/files/76537235577/thumbnail.png?min_height=150&min_width=150", true); | |
xhr.setRequestHeader("Authorization", "Bearer your_access_token"); | |
xhr.responseType = "arraybuffer"; | |
xhr.onload = function(e) { | |
if (this.status == 200) { | |
var uInt8Array = new Uint8Array(this.response); | |
var blob = new Blob([uInt8Array], {type: 'application/octet-binary'}); // pass a useful mime type here | |
var url = URL.createObjectURL(blob); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", "https://api.box.com/2.0/files/76537235577/thumbnail.png?min_height=150&min_width=150", true); | |
xhr.setRequestHeader("Authorization", "Bearer your_access_token"); | |
xhr.responseType = "blob"; | |
xhr.onload = function(e) { | |
if (this.status == 200) { | |
var blob = xhr.response; | |
var url = URL.createObjectURL(xhr.response); |
OlderNewer