Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
c9c17ca
Create bootstrap.sh
Overbryd Mar 10, 2018
ded6213
Update README.md
Overbryd Mar 10, 2018
b9b6c3a
Update bootstrap.sh
Overbryd Mar 10, 2018
f332db7
Update README.md
Overbryd Mar 10, 2018
f263ac4
Update README.md
Overbryd Mar 10, 2018
a7d10e4
Update README.md
Overbryd Mar 10, 2018
81e321f
Update README.md
Overbryd Mar 10, 2018
a47f637
Update Readme.md add some credits
Overbryd Mar 10, 2018
f0424b9
Update README.md
Overbryd Mar 10, 2018
a02f62d
add some missing software
Overbryd Mar 10, 2018
d38b7a8
its java not java8
Overbryd Mar 10, 2018
f24f199
restructure defaults into two new sections defaults-NSGlobalDomain an…
Overbryd Mar 10, 2018
b58301a
add config section to execute custom configs
Overbryd Mar 10, 2018
e874eb3
correct vim directories
Overbryd Mar 10, 2018
a2365d6
add defaults for Calendar, cleanup and some fixes for make vim
Overbryd Mar 10, 2018
6a747fd
Update README.md
Overbryd Mar 11, 2018
63099e3
Update README.md
Overbryd Mar 11, 2018
1691d7e
set dns servers and enable press and hold behaviour
Overbryd Mar 12, 2018
f8b793d
add vim/command-t post installation step
Overbryd Mar 12, 2018
9887cd0
add make section to build and manage ruby with rbenv
Overbryd Mar 12, 2018
8e34492
fix high key repeat rate for macOS high sierra
Overbryd Mar 12, 2018
1d7596f
add launchbar, god I love this tool
Overbryd Mar 13, 2018
7c687fd
Add 1 git-crypt collaborator
Overbryd Mar 14, 2018
8db53e2
add git-crypt and encrypted .ssh/config
Overbryd Mar 14, 2018
34673bc
reduce tmux configuration
Overbryd Mar 14, 2018
13c1d13
split out ssh setup, slow down key repeat (it was too damn fast) and …
Overbryd Mar 14, 2018
b282a38
remove AskPassGUI from .ssh/config
Overbryd Mar 14, 2018
d91b591
update .profile
Overbryd Mar 14, 2018
3ce85ce
add `make bootstrap` to run one-time setup tasks like restoring .gnup…
Overbryd Mar 14, 2018
ec480bb
add graphiql to casks
Overbryd Mar 14, 2018
1ad3294
add casks for graphical database clients
Overbryd Mar 14, 2018
52c9b86
add docker setup to Makefile; tms just opens a session by name or cre…
Overbryd Mar 19, 2018
5fa3b5c
add redis and itsycal (a nice menu bar calendar with events from ical)
Overbryd Mar 26, 2018
e8e7cdf
separate bash-aliases and bash-functions into their own files.
Overbryd Mar 26, 2018
8e945bd
fix source reference to home directory
Overbryd Mar 26, 2018
9e709f5
fix RBENV initalisation in .profile
Overbryd Mar 28, 2018
140da2d
change PS1 separation charactor back to a dollar sign
Overbryd Mar 28, 2018
ff0bb66
adding 'make harder' to host a collection of basic security settings
Overbryd Apr 3, 2018
8bf641a
add macdown and some hardening instructions
Overbryd Apr 9, 2018
1894b61
add nmap to brew installs
Overbryd Apr 10, 2018
43c1da3
add `make fonts` as their own section
Overbryd Jun 9, 2018
e4f5621
use docker for mac instead of docker-machine
Overbryd Jun 9, 2018
c93c0bb
fix intendation
Overbryd Jun 9, 2018
f958a15
Merge branch 'master' of github.com:Overbryd/dotfiles
Overbryd Jun 9, 2018
2b74a49
fix intendation
Overbryd Jun 9, 2018
ded3079
remove docker-machine related installs
Overbryd Jun 9, 2018
0846bdf
add Dash to the list of installed software
Overbryd Jun 15, 2018
6c49f43
add git staged as an alias for `git diff --staged`
Overbryd Jun 15, 2018
4da8553
fix 8-spaces -> tab
Overbryd Jun 18, 2018
c5ac0ec
add brew version of curl
Overbryd Jul 10, 2018
4abd04e
Merge branch 'master' of github.com:Overbryd/dotfiles
Overbryd Jul 10, 2018
ba0b43a
encrypt .ssh/*.pem
Overbryd Jul 10, 2018
2f56fca
Enable touch id for sudo (if available)
Overbryd Jul 28, 2018
df630a7
add hugo, my blogging engine
Overbryd Jul 28, 2018
a81233b
knot-resolver secure dns setup
Jan 16, 2019
9566e87
Fix kresd configuration and remove ocaml
Overbryd Jan 19, 2019
1117b50
Add .pryrc for byebug like pry-byebug handling
Overbryd Jan 19, 2019
b13c290
Add jenv support, brew install jenv
Overbryd Jan 20, 2019
557e987
update .ssh/config
Overbryd Jan 20, 2019
743e959
Add terraform and Dart / Flutter support to vim
Overbryd Jan 20, 2019
73b03da
Fix vim and install jenv
Overbryd Mar 6, 2019
cf7bda2
Fix brew / vim / vim command-t / ruby combination
Overbryd Mar 7, 2019
d8492ca
restart knot-resolver
Overbryd Mar 23, 2019
cda1c14
Merge branch 'master' of github.com:Overbryd/dotfiles
Overbryd Mar 23, 2019
5657c10
re-enable subpixel font aliasing that got disabled in Mojave
Overbryd Mar 23, 2019
b7de2d4
Update .vimrc
alanyee Jun 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .bash_aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# if we are in a tmate session, alias tmux as tmate
if [[ $TMUX =~ tmate ]]; then alias tmux=tmate; fi

# nice directory listing
alias l="ls -Glah"

# nice directory tree listing showing permissions, user, group and size (human readable)
alias t="tree -L 1 --dirsfirst -shugp"
# nice directory tree listing, but just 2 levels
alias tt="tree -L 2 --dirsfirst"

# I use git so often that aliasing it saves a lot
alias g="git"

# Add simulator to start the iOS simulator
alias simulator="open -a Simulator"

# Access the console of the knot-resolver
alias kresd-console="sudo socat - /usr/local/var/kresd/tty/*"

105 changes: 105 additions & 0 deletions .bash_functions
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# print some information on the current tmate session
function tmate-info {
echo "rw: $(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}' 2>/dev/null)"
echo "ro: $(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh_ro}' 2>/dev/null)"
}

# start tmate session
function tmate-start {
tmate -S /tmp/tmate.sock new-session -d
tmate -S /tmp/tmate.sock wait tmate-ready
eval "$(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}')"
}

# tmux, be there and be named well
function tms {
local name=$(basename $PWD | sed -e s/\[^a-zA-Z0-9\\\//\$]/-/g -e s/--*/-/g)
tmux new -s $name || tmux attach-session -t $name
}

# docker-machine, be there and make it happen
function dms {
docker-machine start
eval `docker-machine env`
}

# Start an HTTP server from a directory, optionally specifying the port
function server() {
local port="${1:-8000}"
open "http://localhost:${port}/"
# Set the default Content-Type to `text/plain` instead of `application/octet-stream`
# And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files)
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
}

# Mirror a complete website
function mirror-website() {
local url=$@
local domain=`expr "$url" : '^http[s]*://\([^/?]*\)'`
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains $domain \
--no-parent \
$url
}

# Put my computer to sleep in X minutes
function sleep-in() {
local minutes=$1
if [ -z "$minutes" ]; then
echo "Usage: sleep-in <minutes>"
else
local datetime=`date -v+${minutes}M +"%m/%d/%y %H:%M:%S"`
echo "Scheduling sleep at $datetime"
sudo pmset schedule sleep "$datetime"
fi
}

# Open conflicts at once, setting the search pattern to <<<<<<< in order to cycle through them pressing 'n'
function editconflicts() {
vim +/"<<<<<<<" `git diff --name-only --diff-filter=U | xargs`
}

# quickly cleanup cruft from docker machine
function docker-cleanup() {
docker rm `docker ps -a -q`
docker rmi `docker images | grep "^<none" | tr -s ' ' | cut -d' ' -f 3`
docker volume prune -f
}

# quickly peek at secrets stored in kubernetes yaml files (base64 encoded)
function print-kube-secrets() {
for file in $@; do
echo "${file}:"
yaml2json < $file | jq '[.select(.type == "Secret") | .data | to_entries[] | .value = (.value | @base64d)] | from_entries'
done
}

# better bundle open, that changes current directory
function bundle-open() {
(cd $($(which bundle) show $@) && $EDITOR .)
}

# Use local dns server
function localdns() {
if [[ "x$2" == "x" ]]; then
local network="Wi-Fi"
fi
if [[ "$1" == "on" ]]; then
sudo networksetup -setdnsservers "$network" 127.0.0.1
sudo killall -HUP mDNSResponder
elif [[ "$1" == "off" ]]; then
sudo networksetup -setdnsservers "$network" empty
sudo killall -HUP mDNSResponder
else
cat <<USAGE
Usage: localdns <enable|disable>
Enables or disables local DNS configuration (knot-resolver@127.0.0.1 ==(tls)==> cloudflare)
USAGE
fi
}
4 changes: 4 additions & 0 deletions .git-crypt/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Do not edit this file. To specify the files to encrypt, create your own
# .gitattributes file in the directory where your files are.
* !filter !diff
*.gpg binary
Binary file not shown.
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
* text=auto
* text=auto
.ssh/config filter=git-crypt diff=git-crypt
.ssh/*.pem filter=git-crypt diff=git-crypt

3 changes: 3 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
pick = "cherry-pick"
contributors = "shortlog -n -s --no-merges"
amend = "commit -a --amend"
staged = "diff --staged"
[push]
default = upstream
[status]
submoduleSummary = true
[http]
cookiefile = /Users/lukas/.gitcookies
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,5 @@ Thumbs.db
.Spotlight-V100
.Trashes

# vim plugins handled by vundle
.vim/bundle
!.vim/bundle/vundle

.ssh/config
.ssh/wooga_heroku_id_rsa

# Ruby byebug debugger history files
.byebug_history
Empty file added .hushlogin
Empty file.
188 changes: 46 additions & 142 deletions .profile
Original file line number Diff line number Diff line change
@@ -1,70 +1,42 @@
# PATH setup
export PATH="$HOME/bin:$PATH"
# add escripts (elixir scripts) to PATH
export PATH="/Users/lukas/.mix/escripts:$PATH"
# add brew version of curl to PATH
export PATH="/usr/local/opt/curl/bin:$PATH"

export GOPATH="$HOME/Projects/go"
export PATH="$GOPATH/bin:$PATH"

# Jenv setup
export JENV_ROOT="$HOME/.jenv"
export PATH="$JENV_ROOT/bin:$PATH"
eval "$(jenv init -)"

# Rbenv setup
export RBENV_ROOT="$HOME/.rbenv"
export RBENV_BUILD_ROOT="$RBENV_ROOT/sources"
export PATH="$RBENV_ROOT/bin:./node_modules/.bin:$PATH"
# add ruby gems/rbenv shims to PATH
export PATH="$RBENV_ROOT/bin:$PATH"
eval "$(rbenv init -)"
alias l="ls -Glah"
alias g="git"
alias minecraft="java -d64 -Xms4096M -Xmx4096M -jar Minecraft.app/Contents/Resources/Java/MinecraftLauncher.jar"

# vim all the things
export EDITOR="vim"
export PATH="$HOME/bin:$PATH"
export VISUAL="$EDITOR"

# utf-8 all the things
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

# prevent API throttling when installing/updating homebrew things
export HOMEBREW_GITHUB_API_TOKEN=9d9f01f0d6cf2214fe951cc95f9d79872fbd5499
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSECURE_REDIRECT=1
export HOMEBREW_CASK_OPTS=--require-sha

# used to install/use go packages
export GOPATH="$HOME/.gopath"
export PATH="$GOPATH/bin:$PATH"

# add escripts (elixir scripts) to PATH
export PATH="/Users/lukas/.mix/escripts:$PATH"

# ansible configuration, used at Betterplace
export ANSIBLE_REMOTE_USER=lukas.rieder
export ANSIBLE_HOST_KEY_CHECKING=False

# if we are in a tmate session, alias tmux as tmate
if [[ $TMUX =~ tmate ]]; then alias tmux=tmate; fi
function tmate-info {
echo "rw: $(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}' 2>/dev/null)"
echo "ro: $(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh_ro}' 2>/dev/null)"
}
function tmate-start {
tmate -S /tmp/tmate.sock new-session -d
tmate -S /tmp/tmate.sock wait tmate-ready
eval "$(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}')"
}

# Fancy prompt
function git-prompt {
if (git status >/dev/null 2>&1); then
local symbolic_ref_head=$(git symbolic-ref HEAD 2> /dev/null)
local branch=${symbolic_ref_head#refs/heads/}
local stash_count=$(git stash list --oneline 2> /dev/null | sed -n "$=")
local dirty_star=$(git status --porcelain . | sed -e "$ ! d" -e "s/.*/*/")
echo "$branch$stash_count$dirty_star"
else
echo ""
fi
}
function rbenv-prompt {
local version=$(rbenv version-name | sed -e 's/system/s/; s/jruby-/j/')
local gemset=$(rbenv gemset active 2>&1 | cut -d ' ' -f1)
if (test "$gemset" = "no"); then
echo " $version"
else
echo " $version@$gemset"
fi
}
if [[ $TERM != "" ]]; then
export red=$(tput setaf 1)
export green=$(tput setaf 2)
export yellow=$(tput setaf 3)
export bold=$(tput bold)
export reset=$(tput sgr0)
fi
# setup a simple PROMPT/PS1
export PROMPT_DIRTRIM=1
#export PS1="\[$yellow\]\$(git-prompt)\[$red\]\$(rbenv-prompt)\n\[$reset\]\w: "
export PS1="\n\W$ "

# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob
Expand All @@ -73,99 +45,31 @@ shopt -s nocaseglob
export HISTCONTROL=ignoreboth
export HISTSIZE=1000000

# directly save every command to history
shopt -s histappend
if [ "x$PROMPT_COMMAND" != "x" ]; then
export PROMPT_COMMAND="$PROMPT_COMMAND;"
fi
export PROMPT_COMMAND="$PROMPT_COMMAND history -a; history -n" # preserve other PROMPT_COMMAND stuff!

# Start an HTTP server from a directory, optionally specifying the port
function server() {
local port="${1:-8000}"
open "http://localhost:${port}/"
# Set the default Content-Type to `text/plain` instead of `application/octet-stream`
# And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files)
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
}

# Mirror a complete website
function mirror-website() {
local url=$@
local domain=`expr "$url" : '^http[s]*://\([^/?]*\)'`
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains $domain \
--no-parent \
$url
}

# Put my computer to sleep in X minutes
function sleep-in() {
local minutes=$1
if [ -z "$minutes" ]; then
echo "Usage: sleep-in <minutes>"
else
local datetime=`date -v+${minutes}M +"%m/%d/%y %H:%M:%S"`
echo "Scheduling sleep at $datetime"
sudo pmset schedule sleep "$datetime"
fi
}

# Open conflicts at once, setting the search pattern to <<<<<<< in order to cycle through them pressing 'n'
function editconflicts() {
vim +/"<<<<<<<" `git diff --name-only --diff-filter=U | xargs`
}

# Selectively load bash completions for better performance
function load-bash-completion() {
local file="$(brew --prefix)/etc/bash_completion.d/$1"
if [ -f "$file" ]; then
. "$file"
fi
}
. "$(brew --prefix)/etc/bash_completion"
# load-bash-completion "git-completion.bash"
# load-bash-completion "ssh"

# Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"

function docker-cleanup() {
docker rm `docker ps -a -q`
docker rmi `docker images | grep "^<none" | tr -s ' ' | cut -d' ' -f 3`
docker volume prune -f
}

function docker-ip() {
docker inspect --format '{{ .NetworkSettings.IPAddress }}' "$@"
}

function print-kube-secrets() {
for file in $@; do
echo "${file}:"
yaml2json < $file | jq '[.select(.type == "Secret") | .data | to_entries[] | .value = (.value | @base64d)] | from_entries'
done
}

# project specific .envrc
# directory specific .envrc files
eval "$(direnv hook bash)"

# better bundle open, that changes current directory
function bundle-open() {
(cd $($(which bundle) show $@) && $EDITOR .)
}

# The next line updates PATH for the Google Cloud SDK.
if [ -f /usr/local/google-cloud-sdk/path.bash.inc ]; then
source '/usr/local/google-cloud-sdk/path.bash.inc'
fi
source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc"

# The next line enables shell command completion for gcloud.
if [ -f /usr/local/google-cloud-sdk/completion.bash.inc ]; then
source '/usr/local/google-cloud-sdk/completion.bash.inc'
fi
source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc"

# Source kubectl bash completion (generated with `kubectl completion bash > ~/.kube/bash_completion`)
source ~/.kube/bash_completion

# Bash completion for brew installed tools
source "$(brew --prefix)/etc/bash_completion"

# Aliases are managed here
source ~/.bash_aliases

# Functions are managed here
source ~/.bash_functions

6 changes: 6 additions & 0 deletions .pryrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if defined?(PryByebug)
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'f', 'finish'
end
Binary file added .ssh/config
Binary file not shown.
Binary file added .ssh/whatdropsnow-production.pem
Binary file not shown.
Binary file added .ssh/whatdropsnow-staging.pem
Binary file not shown.
Loading