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
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
### autocorrects cd misspellings, 'cd /sur/src/linus' >> 'cd /usr/src/linux' ### |
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
## Install Sublime Text 3 on Fedora 19 ## | |
# Download Sublime Text 3 from http://www.sublimetext.com/3 . Make sure you download it as a tar.bz and that it has the right architecture | |
# Place this script in the same folder as your archive for ease of use, and cd there | |
# run this file with sudo chmod +x sublime-text.sh | |
#!/bin/sh | |
SCRIPT="#!/bin/sh | |
if [ \${1} == \"--help\" ]; then |
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
/** | |
* The default JSHint output is somewhat wasteful, and very bland, making it hard for a human to | |
* parse. The following does IMO a better job and colours the output for you. This requires the | |
* `colors` package, available via npm. If you don't want the dependency, just remove the color | |
* commands from strings. | |
* | |
* Usage: When invoking jshint from the command line, point it to this file with the --reporter | |
* flag. e.g. | |
* | |
* jshint someFile.js --config /path/to/config.cfg --reporter /path/to/jshintReporter.js |
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
function objectSize (obj) { | |
var key, | |
size = 0; | |
for (key in obj) { | |
if (obj.hasOwnProperty(key)) { | |
size++; | |
} | |
} | |
return size; | |
} |
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
{ | |
// If plugin has trouble finding Node.js, replace this string with path | |
// to your `node` bin | |
"node-path" : ":/usr/local/bin", | |
// Full list of supported options and acceptable values can be found here: | |
// https://github.com/csscomb/csscomb.js/blob/master/doc/options.md | |
"config": { | |
// Whether to add a semicolon after the last value/mixin. |
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
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
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
{ | |
"bold_folder_labels": true, | |
"caret_extra_bottom": 0, | |
"caret_extra_top": 0, | |
"caret_extra_width": 1, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Colorcoder/Seti_orig (Colorcoded).tmTheme", | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, |
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
Stash this hunk [y,n,q,a,d,/,K,g,s,e,?]? :q | |
y - stash this hunk | |
n - do not stash this hunk | |
q - quit; do not stash this hunk or any of the remaining ones | |
a - stash this hunk and all later hunks in the file | |
d - do not stash this hunk or any of the later hunks in the file | |
g - select a hunk to go to | |
/ - search for a hunk matching the given regex | |
j - leave this hunk undecided, see next undecided hunk | |
J - leave this hunk undecided, see next hunk |
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
g:commit() { | |
message="${1}" | |
if [ $# -gt 1 ]; then | |
case "$1" in | |
-s) | |
message="${2} --skip-ci" | |
;; | |
esac | |
fi | |
git commit -m "${message}" |
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
function query() { | |
var | |
total = 0, shown = 0, | |
// HN is done with very unsemantic classes. | |
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')), | |
query_list = Array.prototype.slice.call(arguments); | |
// This traverses up the dom stack trying to find a match of a specific class | |
function up_to(node, klass) { | |
if (node.className === klass) { |
OlderNewer