Skip to content

Instantly share code, notes, and snippets.

View rustybailey's full-sized avatar

Rusty Bailey rustybailey

View GitHub Profile
@rustybailey
rustybailey / .gitconfig
Last active May 3, 2022 19:03
Gitconfig (OSX)
[user]
name = [Your Name]
email = [Your Email]
[alias]
co = checkout
rebase-this = "!git co main; git pull origin main; git co -; git rebase main"
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
unassume-all = "!git ls-files -v | grep ^h | cut -c 3-" | xargs -L1 git update-index --no-assume-unchanged
@rustybailey
rustybailey / bobby.theme.bash
Created June 21, 2013 19:45
Modified Bobby Theme for Bash It
#!/usr/bin/env bash
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
SCM_THEME_PROMPT_PREFIX=" |"
SCM_THEME_PROMPT_SUFFIX="${green}|"
GIT_THEME_PROMPT_DIRTY=" ${red}✗"
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
GIT_THEME_PROMPT_PREFIX="${bold_cyan}["
GIT_THEME_PROMPT_SUFFIX="${bold_cyan}]"
#!/usr/bin/env bash
# Load RVM, if you are using it
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
# Add rvm gems and nginx to the path
export PATH=$PATH:~/.gem/ruby/1.8/bin:/opt/nginx/sbin:~/bin
# Path to the bash it configuration
export BASH_IT=$HOME/.bash_it
@rustybailey
rustybailey / Preferences.sublime-settings
Last active May 9, 2022 14:06
Sublime Text 3 Preferences - updated to include Spacegray theme
{
"close_windows_when_empty": true,
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"font_size": 12,
"ignored_packages":
[
"Vintage",
],
"rulers":
[
@rustybailey
rustybailey / dateToUTCUnix
Created October 30, 2013 15:41
Convert date to UTC Unix time
dateToUTCUnix: (date) ->
d = new Date(date)
offset = d.getTimezoneOffset()
d.addMinutes(offset * -1)
d.getTime()/1000
@rustybailey
rustybailey / .jsbeautifyrc
Last active January 3, 2016 06:39
Options I use for the Sublime Text HTMLPrettify plugin. All options are the defaults, except I changed "keep_array_indentation" to true.
{
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"brace_style": "collapse", // "expand", "end-expand", "expand-strict"
"indent_char": " ",
"indent_scripts": "keep", // "separate", "normal"
"indent_size": 4,
"max_preserve_newlines": 10,
"preserve_newlines": true,
@rustybailey
rustybailey / .jshintrc
Last active January 3, 2016 06:39
Personal JSHint configAll available JSHint options: http://www.jshint.com/docs/options/
{
"regexdash": true,
"browser": true,
"trailing": true,
"sub": true,
"curly": true,
"eqeqeq": true,
"indent": 4,
"latedef": "nofunc",
"newcap": true,
@rustybailey
rustybailey / .gitconfig
Last active May 4, 2017 19:05
Gitconfig (Windows)
[user]
name = [Your Name]
email = [Your Email]
[alias]
co = checkout
rebase-this = "!git co master; git pull origin master; git co -; git rebase master"
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
unassume-all = "!git ls-files -v | grep ^h | cut -c 3-" | xargs -L1 git update-index --no-assume-unchanged
@rustybailey
rustybailey / PackageControl.sublime-settings
Last active November 19, 2015 21:10
Package Control.sublime-settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"AngularJS",
"Babel",
"Case Conversion",
@rustybailey
rustybailey / .jscsrc
Last active August 29, 2015 14:17
JSCS — JavaScript Code Style (mostly taken from Angular.js with a few tweaks)
{
"excludeFiles": ["node_modules/**", "api_docs/**"],
"disallowEmptyBlocks": true,
"disallowKeywordsOnNewLine": ["else"],
"disallowKeywords": ["with"],
"disallowMixedSpacesAndTabs": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforeBinaryOperators": [","],