Skip to content

Instantly share code, notes, and snippets.

@Epigene
Created February 10, 2016 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Epigene/070f320859bcd6a2cf6b to your computer and use it in GitHub Desktop.
Save Epigene/070f320859bcd6a2cf6b to your computer and use it in GitHub Desktop.
Fish2 configuration file
# Path to Oh My Fish install.
set -gx OMF_PATH /Users/augusts/.local/share/omf
source $OMF_PATH/init.fish
# Path to your oh-my-fish.
set PATH /Applications/Postgres.app/Contents/Versions/9.4/bin $PATH
set PATH ~/bin $PATH
set PATH /usr/local/bin $PATH
set -x RACK_ENV development
set -x EDITOR atom
set fish_path $HOME/.oh-my-fish
set -x SECRET_KEY_BASE a0d7c54e36f35be8288d79229d7df09600c56e24e50a984799ab98e09dd60ea1008965126c6412002e06c01ec3defb65e0c13908845f82c0bdfe82937f9f113c
rvm default
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder'
alias resque!="command rake resque:work 'QUEUE=*'"
alias clean_empty="find . -depth -type f -empty -delete; and find . -depth -type d -empty -delete"
alias keys="cd /Library/Keyboard\ Layouts/"
alias background="cd /Library/Desktop\ Pictures"
alias here="open ."
alias a="atom --dev ."
alias skripti="cd ~/scripts"
alias dt="cd ~/Desktop; and rvm use 2.2.3@global"
alias ls="command ls -ABCFG"
alias cls="command clear"
alias db:migrate="command rake db:migrate RAILS_ENV=test; and rake db:seed RAILS_ENV=test; and rake db:migrate; and rake db:seed"
alias rspec="command env cov=ignore rspec"
alias nomail="sudo rm /var/mail/augusts"
# config files
alias opsh="command atom ~/.config/fish/config.fish"
alias sopsh="command atom ~/.ssh/config"
alias again=". ~/.config/fish/config.fish"
alias ropsh="command sudo atom ~/.irbrc"
alias dumpit="pg_dump --format=c -h localhost --username augusts manabalss > ~/Desktop/latest.dump"
# commands
alias rez_small="sips --resampleWidth 172"
alias lookup="command ps aux | grep"
alias fresh="command git checkout --"
# Rails
alias go!="rails s -b 127.0.0.1 -p 3000"
alias gop="bundle exec puma -p 3000 -C config/development_puma.rb"
alias co!="rails c"
alias migrate="rake db:migrate; and rake db:migrate RAILS_ENV=test"
alias c-spec="command env cov=true rspec"
# Git & Cap
alias push="command git push"
function puhs
echo "you probably meant 'push', ran dat."
push
end
alias puush="command git push origin master"
alias pull="command git pull"
alias puull="command git pull origin master"
alias com="command git commit -am"
alias gits="command git status"
alias ffs="command cap deploy:cold"
alias CPD="command cap production deploy"
alias turn="command git checkout"
# Atom hacks
alias ent="command atom ~/Documents/Copy/Dev\ Env/1Entries.rb"
alias a_cpp="command atom ~/Documents/cpp"
alias a_sl="command atom ~/Documents/SwissLanguages"
alias a_sha="command atom ~/Documents/SHProduct"
alias a_nord="command atom ~/Documents/nordenhealth"
alias a_mg="command atom ~/Documents/mailigen_platform"
# dumpfile scp commands # Define scp variables in ~/.ssh/config /Users/augusts/.config/fish/config.fish
#CPP Produkcija
alias scp_cpp="scp CPP:/home/deployer/apps/cpp/latest.dump ~/Desktop/"
#Norden Produkcija
alias scp_nord="scp -P 39011 NORD:/home/deployer/apps/nordenhealth/latest.dump ~/Desktop/"
#MB
alias scp_mb="scp MB:/home/deployer/apps/manabalss/latest.dump ~/Desktop/"
#SL
alias scp_sl="scp SL:/home/deployer/apps/SwissLanguages/latest.dump ~/Desktop/"
#SHProduct
alias scp_sha="scp deployer@37.139.8.70:/home/deployer/apps/shproduct/latest.dump ~/Desktop/"
#Dokku
alias scp_dokku="scp root@146.185.130.153:/root/latest.dump ~/Desktop/"
#Dokku2
alias scp_dokku2="scp root@178.62.175.11:/home/dokku/latest.dump ~/Desktop/"
#Mailigen platform
alias scp_mg="scp MG:/home/deployer/apps/mailigen_platform/latest.dump ~/Desktop/"
# blog.stockholmhealth.com
alias scp_blog_stock="scp -rp root@37.139.25.144:/var/www/html ~/Desktop/"
alias dev_noti="cd ~/Documents/development_notification; and rvm use 2.2.3@dev_noti"
# CPP paths
alias cpp="cd ~/Documents/cpp; and rvm use 2.3.0@cpp"
alias CPP="command ssh -p 9917 deployer@146.185.168.135"
function restore_cpp
cpp
rake db:drop db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U augusts -d cpp ~/Desktop/latest.dump
rake db:migrate db:seed
end
# Norden paths
alias nord="cd ~/Documents/nordenhealth; and rvm use 2.0.0@nord"
alias staging="command ssh deployer@188.226.246.199"
alias NORD="command ssh -p 39011 deployer@37.139.21.15"
function restore_nord
nord
rake db:drop db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U augusts -d nord ~/Desktop/latest.dump
rake db:migrate db:seed
end
# Swisslanguages paths
function sl
cd ~/Documents/SwissLanguages
rvm use 2.1.2@swiss
end
alias SL="ssh SL"
function restore_sl
sl
rake db:drop db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U augusts -d swiss ~/Desktop/latest.dump
rake db:migrate db:seed
end
# Swisslanguages_game paths
function slg
cd ~/Documents/sl_game
rvm use 2.2.3@sl_game
end
alias SLG="ssh -p 7361 deployer@178.62.187.22"
function restore_slg
slg
rake db:drop db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U augusts -d sl_game ~/Desktop/latest.dump
rake db:migrate db:seed
end
# SH Product paths
alias sha="cd ~/Documents/SHProduct; and rvm use 2.1.2@sha"
alias creative_subs="cd ~/Documents/creative_subscriptions; and rvm use 2.1.2@sha"
alias SH="ssh SH"
alias SH_S="ssh -p 57123 deployer@146.185.130.153"
function restore_sha
sha
rake db:drop db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U augusts -d sha ~/Desktop/latest.dump
rake db:migrate db:seed
rake db:migrate db:seed RAILS_ENV=test
end
# ManaBalss
alias manab="cd ~/Documents/manabalss; and rvm use 2.1.3@MB"
alias MB="ssh -p 32541 deployer@37.139.0.211"
alias MB_S="ssh MB_S"
function restore_manab
manab
rake db:drop db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U augusts -d manabalss ~/Desktop/latest.dump
rake db:migrate db:seed
end
# Dokku
alias DOKKU="ssh DOKKU"
# Ja kāds no konteineeriem gļuko, paskaties gist dokku workflow restart pavēles
# Dokku2 (blogs)
alias DOKKU2="ssh root@DOKKU2"
# Mailigen Platform
alias mailigen_platform="cd ~/Documents/mailigen_platform; and rvm use 2.2.2@mailigen"
alias mg="cd ~/Documents/mailigen_platform; and rvm use 2.2.2@mailigen"
alias MG="ssh -p 39222 deployer@146.185.183.196"
function restore_mg
mailigen_platform
rake db:drop db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U augusts -d mailigen_platform ~/Desktop/latest.dump
rake db:migrate db:seed
end
# GeoLocale gem
alias geo_locale="cd ~/Documents/geo_locale; and rvm use 2.0.0@geo_locale"
# CPS gem
alias cps="cd ~/Documents/complete_payment_systems; and rvm use 2.1.5@cps"
# SacPS gem
alias SacPS="cd ~/Documents/SacPS; and rvm use 2.2.0@SacPS"
# Leadersend gem
alias LS="cd ~/Documents/leadersend; and rvm use 2.1.2@LS"
# Priscilla gem
alias PR="cd ~/Documents/priscilla; and rvm use 2.1.2@PR"
# Redirected
alias red="cd ~/Documents/Redirecter; and rvm use 2.1.2@red"
# Redirected
alias nic_red="cd ~/Documents/NicRedirecterTemplate; and rvm use 2.2.3@nic_red"
# Prezidenti path
alias candy="manab; and cd vendor/engines/prezidenti"
# AB_test path
alias ab_test="cd ~/Documents/ab_manager; and rvm use 2.1.3@ab_manager"
# Creative subscriptions path
alias creative_subs="cd ~/Documents/creative_subscriptions; and rvm use 2.1.2@subs"
alias cs="cd ~/Documents/creative_subscriptions; and rvm use 2.1.2@subs"
# Creative tracking path
alias creative_track="cd ~/Documents/creative_tracking; and rvm use 2.1.2@track"
# Eyeglobal app path
alias eyeglobal="cd ~/Documents/eyeglobal_app; and rvm use 2.2.2@eyeglobal"
# Creativegs
alias creativegs="cd ~/Documents/creativegs; and rvm use 2.2.3@hompeage"
# Minichat path (failed)
alias minichat="cd ~/Documents/SitepointMiniChat; and rvm use 2.0.0@minichat"
# test shortcode
alias shortcode_test="cd ~/Documents/shortcode_test; and rvm use 2.2.3@test"
# blogCMS
alias uzveselibu="cd ~/Documents/blogCMS; and rvm use 2.2.3@blogCMS"
####### Aux ############
alias ranger="cd ~/Documents/ranger; and rvm use 2.2.0@ranger"
alias hashrush="cd ~/Documents/hashrush; and rvm use 2.1.2@rush"
alias cru="cd ~/Documents/creative_rails_utilities; and rvm use 2.2.0@cru"
# makes a script globally readable in a bin folder
function scriptize
sudo chmod 744 $argv
sudo chmod -x $argv
end
# prints given string given times `do_str = 8`
function do_str
for i in (seq $argv[2])
printf $argv[1]
end
end
# same. maybe faster `underl` `underl = 8`
function underl -a char -a length
printf '%*s\n' $length "" | tr ' ' $char
end
function down
sudo shutdown -h $argv
end
function antigua
cd ~/.atom/packages/antigua-dark-syntax/
a
end
# Load oh-my-fish configuration.
. $fish_path/oh-my-fish.fish
set -g -x fish_greeting ''
echo -e "Proceed to \033[38;5;208m☣ fishy ☣\033[0;00m business!"
#function fish_prompt
# echo "☣"
#end
rvm default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment