Skip to content

Instantly share code, notes, and snippets.

View alex-sysoev's full-sized avatar

Alexander Sysoev alex-sysoev

View GitHub Profile
@alex-sysoev
alex-sysoev / .bash_profile
Created February 1, 2017 12:06 — forked from gonzalo-bulnes/.bash_profile
Bash configuration to get its prompt to display the current Git branch.
# ...
# Add these lines at the end of your ~/.bash_profile
# Git functions (used to define a custom prompt)
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
@alex-sysoev
alex-sysoev / gist:aa472d1fd0f25e5a1ced
Last active February 26, 2018 22:12 — forked from p404/gist:f0d37cb4b4912543f5a5
Server configuration for a rails application
# User: ubuntu
sudo apt-get update
sudo apt-get upgrade
# Access keys
vim .ssh/authorized_keys
# Hostname
sudo vim /etc/hostname
sudo vim /etc/hosts
# safe merge
#
# merge the branch XXXXXXXX-add-example-feature into master
# make sure the feature is properly tested and
# doesn't break anything in its original context
git checkout XXXXXXXX-add-example-feature
rake # the test suite MUST NOT raise any error
# make sure your local copy of master is up-to-date