- Always use '===' instead of '==' for comparison
this.id
is better than$(this).attr('id')
- "use strict"
- Never leave out optional curly brackets, even for one-line statements.
- Get elements by id wherever possible
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
Show hidden characters
[ | |
// My Sublime shortcuts: | |
{ "keys": ["ctrl+k", "ctrl+m"], "command": "toggle_minimap" }, | |
// jEdit shortcuts: | |
{ "keys": ["alt+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }, | |
{ "keys": ["alt+right"], "command": "indent" }, | |
{ "keys": ["alt+left"], "command": "unindent" }, | |
{ "keys": ["ctrl+e", "ctrl+c"], "command": "toggle_comment", "args": { "block": false } }, | |
{ "keys": ["ctrl+e", "ctrl+w"], "command": "close_all" }, |
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
ack --sass "([\d\.]*)r?em" --output="\$1" -h | sort -u | |
Find all unique em and rem values in all Sass files below the current directory | |
cat / less | |
Output contents of a text file. ("less" is paginated but disappears after end of file, "cat" outputs in one go but output remains visible in console). | |
chown user:group /something | |
Changes owner of /something to 'user', group to 'group'. | |
cp |
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
git log --graph --date-order --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(yellow) %an %Creset' --abbrev-commit --date=relative |
- Add mintty.exe to Git\bin
- Create shortcut in Git directory with the following target:
"C:\Program Files\Git\bin\mintty.exe" --title "Git mintty" --icon "etc\git.ico" -c "%HOMEDRIVE%%HOMEPATH%\.minttyrc" --icon "etc\git.ico" --exec "bin\sh.exe" --login -i
('Starts in' should be set to "C:\Program Files\Git" in order for relative paths, eg. "etc\git.ico", to work) - In order to get colours working, add the following to .gitconfig:
[color] status = always diff = always
log = always
NewerOlder