Instance | Branch |
---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# All command below are for Mac Yosemite 10.10.3 | |
# Homebrew install | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Add Homebrew to System Path - to ~/.bash_profile or ~/.profile | |
export PATH=/usr/local/bin:/usr/local/sbin:$PATH | |
# Install Python for your development (Comes with Pip) | |
brew install python | |
# Pip update | |
sudo pip install --upgrade pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# command to show the list of volumes attached to the instance | |
lsblk # get the device which has no mount point. | |
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
xvdf 202:80 0 100G 0 disk | |
xvda1 202:1 0 8G 0 disk / | |
# Check files system of the volume | |
sudo file -s /dev/xvdf | |
# if the device is not empty to format the volume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
// Terminal plugin | |
"terminal": "iTerm.sh", | |
// OS X only: When files are opened from finder, or by dragging onto the | |
// dock icon, this controls if a new window is created or not. | |
"open_files_in_new_window": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GIT config ref: https://gist.github.com/trey/2722934 | |
# If brew is not installed the paste the link below in terminal and return. | |
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# GIT bash completion | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EL Capitan | |
# For Python devs | |
sudo easy_install pip | |
sudo pip install virtualenv | |
pip install virtualenvwrapper # has some good pre-post scripts for mundane tasks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# El capitan change computer name | |
sudo scutil --set LocalHostName "Name" # Bonjour-based services discovery name () | |
sudo scutil --set ComputerName "Name" # User Friendly computer name | |
sudo scutil --set HostName "Name" # Name to display when connecting over SSH | |
# To check if the above name is set | |
scutil --get HostName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install git scm | |
sudo apt-get install git-core | |
# configure git user details , can be system wide, user specific or repo specific | |
# user name | |
git config --global user.name "John Doe" | |
# user email | |
git config --global user.email johndoe@example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hugo is a static site generator from spf13. | |
# it is really simple, elegant and easy to install once we get around it. | |
# The following commands are mostly tested in OSX | |
brew install hugo | |
mkdir hugo-project | |
cd hugo-project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tailing a big file especially log file | |
tail -f filename | |
# search for content | |
grep 'pattern' | |
# search with OR condition | |
grep -E 'pattern1|pattern2' | |
# search with AND condition |
OlderNewer