commit e154843e45867a3b7c5a2e69f314c76e9ea24ea7 parent ae7915bb857aa53dadbd66290cdf3c709d0fc036 Author: Alex Balgavy <a.balgavy@gmail.com> Date: Tue, 20 Mar 2018 00:19:46 +0100 Added a few more dotfiles Diffstat:
33 files changed, 262 insertions(+), 0 deletions(-)
diff --git a/Desktop Changer.app/Contents/Info.plist b/.bin/Desktop Changer.app/Contents/Info.plist diff --git a/Desktop Changer.app/Contents/MacOS/applet b/.bin/Desktop Changer.app/Contents/MacOS/applet Binary files differ. diff --git a/Desktop Changer.app/Contents/PkgInfo b/.bin/Desktop Changer.app/Contents/PkgInfo diff --git a/Desktop Changer.app/Contents/Resources/Scripts/main.scpt b/.bin/Desktop Changer.app/Contents/Resources/Scripts/main.scpt Binary files differ. diff --git a/Desktop Changer.app/Contents/Resources/applet.icns b/.bin/Desktop Changer.app/Contents/Resources/applet.icns Binary files differ. diff --git a/Desktop Changer.app/Contents/Resources/applet.rsrc b/.bin/Desktop Changer.app/Contents/Resources/applet.rsrc Binary files differ. diff --git a/Desktop Changer.app/Contents/Resources/description.rtfd/TXT.rtf b/.bin/Desktop Changer.app/Contents/Resources/description.rtfd/TXT.rtf diff --git a/README.md b/.bin/README.md diff --git a/anythingtogif b/.bin/anythingtogif diff --git a/cs_record_tasks.rb b/.bin/cs_record_tasks.rb diff --git a/epub-convert b/.bin/epub-convert diff --git a/executable b/.bin/executable diff --git a/gfx2gfx b/.bin/gfx2gfx Binary files differ. diff --git a/icalBuddy b/.bin/icalBuddy Binary files differ. diff --git a/itunes_style_getter b/.bin/itunes_style_getter diff --git a/itunes_style_getter_helper.rb b/.bin/itunes_style_getter_helper.rb diff --git a/modified_cfscrape.py b/.bin/modified_cfscrape.py diff --git a/mp3tagger.jar b/.bin/mp3tagger.jar Binary files differ. diff --git a/percerr.rb b/.bin/percerr.rb diff --git a/strip-html-tags b/.bin/strip-html-tags diff --git a/tag b/.bin/tag diff --git a/tcprelay.py b/.bin/tcprelay.py diff --git a/topdf b/.bin/topdf diff --git a/upx.out b/.bin/upx.out Binary files differ. diff --git a/usbmux.py b/.bin/usbmux.py diff --git a/usbmux.pyc b/.bin/usbmux.pyc Binary files differ. diff --git a/wattpad-scrape b/.bin/wattpad-scrape diff --git a/xld b/.bin/xld diff --git a/.commonprofile b/.commonprofile @@ -0,0 +1,128 @@ +### SIMPLE COMMANDS ### +alias c="clear" +alias fucking="sudo" +alias virc="vim ~/.vimrc" +alias cp='cp -iv' # Preferred 'cp' implementation +alias mv='mv -iv' # Preferred 'mv' implementation +alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation +alias l="ls -FGlAhp" # Preferred 'ls' implementation +alias less='less -FRXc' +cd() { builtin cd "$@"; ls; } +mkcd() { mkdir -p -- "$1" && cd -P -- "$1" } +procinfo() { ps -aux | grep $1 } + +### DOUG SCRIPTS TRIAL RESET ### +alias rs_notinplaylist="rm /Users/alex/Library/iTunes/.ntnny.txt" +alias rs_removedeadtracks="rm /Users/alex/Library/iTunes/.superremoveapp.plist" + +### MAC UI CUSTOMISATIONS ### +alias changedock="defaults write com.apple.dock contents-immutable -bool false;killall Dock" +alias nochangedock="defaults write com.apple.dock contents-immutable -bool true;killall Dock" +alias dockspacer="defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'; killall Dock" +alias spotlighton="sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist" +alias spotlightoff="sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist" + +### SERVICES ### +alias loadftp="sudo launchctl load /System/Library/LaunchDaemons/ftp.plist" +alias unloadftp="sudo launchctl unload /System/Library/LaunchDaemons/ftp.plist" +alias startftp="sudo launchctl start com.apple.ftpd" +alias stopftp="sudo launchctl stop com.apple.ftpd" +alias startapache="sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist" +alias stopapache="sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist" +alias startpg="pg_ctl -D $(brew --prefix)/var/postgres start" + +### MORE COMPLEX FUNCTIONS ### +pip3-upgrade() { + pip3 list --outdated | cut -d ' ' -f1 | xargs -n1 pip3 install -U +} + +notify() { + terminal-notifier -title "Task Finished" -message "Done" +} + +brewmaster() { + brew update; + brew update; + brew outdated | atom; + brew upgrade; + brew cleanup -s; + brew cask cleanup; + brew prune; + brew doctor; + notify; +} + +gemmaster() { + gem update; + gem update rails; + gem cleanup; +} + +webmTOmp4() { + ffmpeg -i "$1" -qscale 0 "$1".mp4 +} + +mp4TOmp3() { + ffmpeg -i "$1" "$1".mp3 +} + +gifify() { + ffmpeg -i $1 -r 25 -f image2pipe -vcodec ppm - | \ + convert -delay 4 -loop 0 - output.gif +} + +extract () { + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar e $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via extract()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} + +current_wifi_password() { + security find-generic-password -ga "$1" | grep password +} + +cdf() { + target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'` + if [ "$target" != "" ]; then + cd "$target"; pwd + else + echo 'No Finder window found' >&2 + fi +} + + +###################### + +### PATH CHANGES ### + +# Original path: +# PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + +# Include my scripts in PATH # +export PATH=$PATH:/Users/alex/.bin + +# Haskell path changes # +export PATH="$HOME/Library/Haskell/bin:$PATH" +###################### + +### HOMEBREW VARIABLE CHANGES ### +export EDITOR="vim" +export HOMEBREW_EDITOR="atom" + + +###################### diff --git a/.gitconfig b/.gitconfig @@ -0,0 +1,7 @@ +# This is Git's per-user configuration file. +[user] +# Please adapt and uncomment the following lines: +name = <name> +email = EMAIL +[alias] + lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --decorate diff --git a/.oh-my-zsh b/.oh-my-zsh @@ -0,0 +1 @@ +Subproject commit 0cec4626219bfd5a163986ebe3745fc31b593446 diff --git a/.shpotify.cfg b/.shpotify.cfg @@ -0,0 +1,2 @@ +CLIENT_ID="7ee4bbd51eaf4846850b7382e75405d1" +CLIENT_SECRET="91da8a9660874d2093951b4fe0f29e40" diff --git a/.zshrc b/.zshrc @@ -0,0 +1,124 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH=/Users/alex/.oh-my-zsh + +# Set name of the theme to load. Optionally, if you set this to "random" +# it'll load a random theme each time that oh-my-zsh is loaded. +# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes +ZSH_THEME="powerlevel9k/powerlevel9k" + +# Set list of themes to load +# Setting this variable when ZSH_THEME=random +# cause zsh load theme from this variable instead of +# looking in ~/.oh-my-zsh/themes/ +# An empty array have no effect +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. Case +# sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=( + git + brew + bundler + cp + gem + gitignore + heroku + iterm2 + osx + pass + pyenv + python + rails + rake + rbenv + rvm + sublime + sudo + vim-interaction +) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# ssh +# export SSH_KEY_PATH="~/.ssh/rsa_id" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +#POWERLEVEL9K +POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(user dir vcs) +POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time battery) + +# Aliases +source ~/.commonprofile +alias configure="vim ~/.zshrc" +alias reload="source ~/.zshrc" + +# Z initialization +. /usr/local/etc/profile.d/z.sh