Skip to content

Commit c6df734

Browse files
committed
Merge branch 'master' of github.com:DelvarWorld/configs
2 parents d1dbaf0 + a6234e0 commit c6df734

6 files changed

Lines changed: 105 additions & 33 deletions

File tree

.bash_profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ export KEY_SUFFIX=grandrounds.com
2727
#test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
2828

2929
[[ -s "/Users/andrewray/.gvm/scripts/gvm" ]] && source "/Users/andrewray/.gvm/scripts/gvm"
30+

.bashrc

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,34 @@ COLOR_LIGHT_RED=$(tput sgr0 && tput bold && tput setaf 1)
1111
COLOR_LIGHT_CYAN=$(tput sgr0 && tput bold && tput setaf 6)
1212
COLOR_RESET=$(tput sgr0)
1313

14+
pathadd() {
15+
newelement=${1%/}
16+
if [ -d "$1" ] && ! echo "$PATH" | grep -E -q "(^|:)$newelement($|:)" ; then
17+
if [ "$2" = "after" ] ; then
18+
PATH="$PATH:$newelement"
19+
else
20+
PATH="$newelement:$PATH"
21+
fi
22+
fi
23+
}
24+
25+
pathrm() {
26+
PATH="$(echo $PATH | sed -e "s;\(^\|:\)${1%/}\(:\|\$\);\1\2;g" -e 's;^:\|:$;;g' -e 's;::;:;g')"
27+
}
28+
29+
30+
# Configuration for the command line tool "hh" (history searcher to replace ctrl-r, brew install hh)
31+
export HH_CONFIG=hicolor,rawhistory,favorites # get more colors
32+
shopt -s histappend # append new history items to .bash_history
33+
#export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
34+
#export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}" # mem/file sync
35+
# if this is interactive shell, then bind hh to Ctrl-r (for Vi mode check doc)
36+
#if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hh -- \C-j"'; fi
37+
# if this is interactive shell, then bind 'kill last command' to Ctrl-x k
38+
#if [[ $- =~ .*i.* ]]; then bind '"\C-xk": "\C-a hh -k \C-j"'; fi
39+
40+
# AWS_ENVIRONMENT_BETA=true
41+
1442
# From awscli tools "Add the following to ~/.bashrc to enable bash completion:"
1543
complete -C aws_completer aws
1644

@@ -226,9 +254,6 @@ function what-is-listening-on-port() {
226254
lsof -n -i4TCP:$1 | grep LISTEN
227255
}
228256

229-
# required for dojo install of api (canvas dependency)
230-
#PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/X11/lib/pkgconfig
231-
232257
# Don't wait for job termination notification
233258
set -o notify
234259

@@ -872,19 +897,20 @@ function gr_banana() {
872897

873898
PS1="\n\[$COLOR_YELLOW\]\u\[\$(error_test)\]@\[$COLOR_GREEN\]\w\$(${dvcs_function})\[$COLOR_RESET\] \$ "
874899

875-
### Added by the Heroku Toolbelt
876-
#export PATH="/usr/local/heroku/bin:$PATH"
877-
878900
# Grand rounds stuff
879901
export GR_HOME=${HOME}/dev
880902
export GR_USERNAME=andrew.ray
881903

882904
if [ -d "$GR_HOME" ]; then
905+
906+
if [ -n "$LOGIN_WAIT" ]; then
907+
echo "waiting ${LOGIN_WAIT}"
908+
fi
883909
for file in ${GR_HOME}/engineering/bash/*.sh; do
884910
source $file;
885911
done
886912

887-
export PATH=${GR_HOME}/engineering/bin:${PATH}
913+
pathadd "${GR_HOME}/engineering/bin"
888914

889915
# default to aws env
890916
aws-environment development
@@ -896,7 +922,8 @@ fi
896922
alias vscode=code
897923

898924
# Android SDK
899-
export PATH="${HOME}/Library/Android/sdk/tools:${HOME}/Library/Android/sdk/platform-tools:${PATH}"
925+
pathadd "${HOME}/Library/Android/sdk/tools:${HOME}/Library/Android/sdk/platform-tools"
926+
#export PATH="${HOME}/Library/Android/sdk/tools:${HOME}/Library/Android/sdk/platform-tools:${PATH}"
900927

901928
# Banyan stuff
902929
alias bstart="pg_ctl start -D /usr/local/var/postgres-banyan -l /usr/local/var/postgres-banyan/server.log"
@@ -920,8 +947,10 @@ if [ -f /Users/andrewray/google-cloud-sdk/completion.bash.inc ]; then
920947
source '/Users/andrewray/google-cloud-sdk/completion.bash.inc'
921948
fi
922949

950+
# My C quick branch switcher script
923951
if [[ -d "${HOME}/c" ]]; then
924-
export PATH="${HOME}/c:${PATH}"
952+
#export PATH="${HOME}/c:${PATH}"
953+
pathadd "${HOME}/c"
925954
source ~/c/c_recent_branches_completer
926955
fi
927956

@@ -937,6 +966,9 @@ if [[ $(command -v pyenv) ]]; then
937966
fi
938967
fi
939968

969+
export IPSEC_SECRETS_FILE=/etc/ipsec.secrets
970+
export KEY_SUFFIX=grandrounds.com
971+
940972
# GR
941973
function releaseCommits() {
942974
git fetch --all
@@ -1044,3 +1076,20 @@ function switch_dialog {
10441076
esac
10451077
}
10461078

1079+
function docker_tag_exists() {
1080+
path="https://index.docker.io/v1/repositories/$1/tags/$2"
1081+
if curl --silent -f -lSL "$path" 2> /dev/null; then
1082+
echo "${COLOR_GREEN}Found $1 $2 at${COLOR_RESET}"
1083+
echo " ${COLOR_LIGHT_GREEN}${path}${COLOR_RESET}"
1084+
else
1085+
echo "${COLOR_RED}Tag $1 $2 not found, checked path:${COLOR_RESET}"
1086+
echo " ${COLOR_LIGHT_RED}${path}${COLOR_RESET}"
1087+
fi
1088+
}
1089+
1090+
TRACKER_FLOW_PATH="$GR_HOME/tracker-flow"
1091+
if [ -d "$TRACKER_FLOW_PATH" ]; then
1092+
pathadd "$TRACKER_FLOW_PATH"
1093+
. "$TRACKER_FLOW_PATH/tracker_completion.bash"
1094+
fi
1095+

.pryrc

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#require 'awesome_print' # Removing because bad colors and can't configure
22
#AwesomePrint.pry!
33

4-
puts "#{'Starting a Pry console...'.cyan}"
5-
64
begin
75
require 'colorize'
86
puts "#{'require'.light_red} #{"'colorize'".cyan}"
@@ -11,18 +9,22 @@ rescue LoadError
119
end
1210

1311
begin
14-
require 'factory_girl_console'
15-
puts "#{'require'.light_red} #{"'factory_girl_console'".cyan}"
12+
require 'factory_bot_rails'
13+
puts "#{'require'.light_red} #{"'factory_bot_rails'".cyan}"
1614
rescue LoadError
17-
puts "Warning: factory_girl_console gem not found"
15+
puts "Warning: factory_bot_rails gem not found"
1816
end
1917

20-
begin
21-
include Rails.application.routes.url_helpers
22-
puts "#{'include'.light_yellow} #{'Rails.application.routes.url_helpers'.cyan}"
23-
rescue LoadError
24-
puts "Warning: factory_girl_console gem not found"
25-
end
18+
# rails 5.1 break?
19+
#begin
20+
#Rails.application.routes.url_helpers
21+
#include Rails.application.routes.url_helpers
22+
#puts "#{'include'.light_yellow} #{'Rails.application.routes.url_helpers'.cyan}"
23+
#rescue LoadError
24+
#puts "Warning: factory_bot_rails gem not found"
25+
#end
26+
27+
puts "#{'Starting a Pry console...'.cyan}"
2628

2729
def colorized_stack_trace( stack, base_dir )
2830
separator = File::SEPARATOR
@@ -66,8 +68,8 @@ Pry::Commands.block_command "sa", "Application stack trace" do
6668
filtered_stack_trace( caller, /./ )
6769
end
6870

69-
_max_display_string_length = 50
70-
def pbcopy(input)
71+
def defandy(input)
72+
_max_display_string_length = 50
7173
str = input.to_s
7274
IO.popen('pbcopy', 'w') { |f| f << str }
7375
truncated = str.length > _max_display_string_length ? str[0.._max_display_string_length] + '...' : str

.vimrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ nnoremap <Leader>sv :source $MYVIMRC<cr>
259259
nnoremap <silent> <Leader>so :source %<cr>:echo "Sourced this file!"<cr>
260260
261261
" Quick file open shortcuts
262+
nnoremap <Leader>b :tabe ~/.bashrc<cr>
262263
nnoremap <Leader>v :tabe $MYVIMRC<cr>
263264
nnoremap <Leader>ss :tabe ~/.vim/delvarworld-snippets/javascript/javascript.snippets<cr>
264265
nnoremap <Leader>hs :tabe /etc/hosts<cr>:setlocal noreadonly<cr>:setlocal autoread<cr>
@@ -1489,9 +1490,9 @@ Project '~/dev/jarvis' , 'jarvis'
14891490
Project '~/dev/devise-two-factor/demo' , 'devise-two-factor-demo'
14901491
Project '~/workerbee/OpusWeb/mvp_webpack', 'bee site'
14911492
Project '~/rails-tutorial' , 'rails tutorial'
1493+
Project '~/dev/onboarding-tech-notes' , 'onboarding tech notes'
14921494
Project '~/closed-source-projects' , 'closed source projects'
14931495

1494-
14951496
"------------------------------------------------------------------------------
14961497
" Script-runner (I don't really use this anymore)
14971498
"------------------------------------------------------------------------------

code/keybindings.json

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,29 @@
1414
{ "key": "shift+alt+down", "command": "editor.action.copyLinesDownAction",
1515
{ "key": "shift+alt+up", "command": "editor.action.copyLinesUpAction",
1616
"when": "editorTextFocus && !editorReadonly" },
17-
{ "key": "cmd+alt+up", "command": "block-travel.selectUp",
18-
"when": "editorTextFocus" },
19-
{ "key": "alt+down", "command": "editor.action.moveLinesDownAction",
20-
"when": "editorTextFocus && !editorReadonly" },
17+
// { "key": "cmd+alt+up", "command": "block-travel.selectUp",
18+
// "when": "editorTextFocus" },
19+
// "when": "editorTextFocus && !editorReadonly" },
20+
// { "key": "alt+down", "command": "editor.action.moveLinesDownAction",
2121
{ "key": "alt+up", "command": "editor.action.moveLinesUpAction",
2222
"when": "editorTextFocus && !editorReadonly" },
23-
23+
24+
// I removed this plugin (cause it's bad?)
2425
// non-TERRIBLE defaults for this plugin. I tried cmd+] which feels more natural
2526
// but then selection (cmd+shift+[ conflicts with tab move)
26-
{ "key": "alt+[", "command": "block-travel.jumpUp", "when": "editorTextFocus" },
27-
{ "key": "alt+]", "command": "block-travel.jumpDown", "when": "editorTextFocus" },
27+
// { "key": "alt+[", "command": "block-travel.jumpUp", "when": "editorTextFocus" },
28+
// { "key": "alt+]", "command": "block-travel.jumpDown", "when": "editorTextFocus" },
2829

29-
{ "key": "alt+shift+[", "command": "block-travel.selectUp", "when": "editorTextFocus" },
30-
{ "key": "alt+shift+]", "command": "block-travel.selectDown", "when": "editorTextFocus" },
30+
// { "key": "alt+shift+[", "command": "block-travel.selectUp", "when": "editorTextFocus" },
31+
// { "key": "alt+shift+]", "command": "block-travel.selectDown", "when": "editorTextFocus" },
3132

3233
// terrible defaults for "rails run specs"
3334
{ "key": "shift+cmd+t", "command": "workbench.action.reopenClosedEditor" },
34-
{ "key": "cmd+k cmd+f", "command": "extension.runFileSpecs" }
35+
{ "key": "cmd+k cmd+f", "command": "extension.runFileSpecs" },
36+
{
37+
"key": "alt+cmd+n",
38+
"command": "workbench.action.compareEditor.nextChange",
39+
"when": "editorTextFocus"
40+
}
3541
]
42+

code/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,17 @@
6464
"indentRainbow.error_color": "",
6565

6666
"editor.renderWhitespace": "none",
67+
"workbench.panel.location": "right",
68+
"gitlens.advanced.messages": {
69+
"suppressShowKeyBindingsNotice": true
70+
},
71+
"cSpell.userWords": [
72+
"kase",
73+
"kases",
74+
"mixpanel"
75+
],
76+
"window.title": "${activeEditorMedium}${separator}${rootName}",
77+
"javascript.updateImportsOnFileMove.enabled": "always",
78+
"typescript.updateImportsOnFileMove.enabled": "always",
6779
"workbench.panel.location": "bottom"
6880
}

0 commit comments

Comments
 (0)