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
############################## Historic BASH stuff############################ | |
# don't put duplicate lines or lines starting with space in the history. | |
# See bash(1) for more options | |
HISTCONTROL=ignoreboth | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# show command before running it when you type | |
# !?<some text froma previously run command> |
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
# tutorials | |
## https://www.digitalocean.com/community/tutorials/configuration-management-101-writing-ansible-playbooks | |
## https://github.com/leucos/ansible-tuto | |
# hosts file - /etc/ansible/hosts | |
[uhosts] | |
192.168.11.101 | |
192.168.11.105 | |
192.168.11.107 |
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
# Videos - Hello World - Machine Learning Recipes - YouTube | |
# https://www.youtube.com/playlist?list=PLOU2XLYxmsIIuiBfYad6rFYQU_jL2ryal | |
# software to use | |
# http://scikit-learn.org/stable/install.html | |
# algos | |
# https://en.wikipedia.org/wiki/K-means_clustering | |
# http://scikit-learn.org/stable/auto_examples/cluster/plot_cluster_iris.html | |
# https://pythonprogramming.net/flat-clustering-machine-learning-python-scikit-learn/ |
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
cat > /usr/local/bin/show_docker_ips | |
------------------------------------- | |
#/bin/bash | |
# shows the IPs of all the dockers on the host | |
# in a format that is accepted by /etc/hosts | |
for i in `docker ps|sed 1d|awk '{print $NF}'`; | |
do | |
DIP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $i) | |
echo "$DIP $i" | |
done |
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
#To replace empty lines | |
# replace empty trailing lines | |
%s/\S\zs\s\+$//g | |
# replace empty lines with spaces | |
%s/\s\+$//g | |
# to add some content 'grep -v..' at the end of each line matching a a pattern (eg. that starts with zgrep...) | |
:g/^zgrep.*/s/$/ | grep -v ':0' |
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
#!/bin/bash | |
# get directly from sources | |
git clone https://github.com/pypa/virtualenv.git | |
cd virtualenv | |
python2.7 virtualenv.py venv | |
cd venv | |
source bin/activate | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
python2.7 get-pip.py | |
pip install ansible |
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
1. EzHandle: Create a easy name/handle -> ph number reference registry. | |
A user owns the handle and can change references as and when he feels like. | |
He can change the visibility as and when he likes as well | |
The system can later be used to scale to store and pass other info as and when needed with the help of an API key | |
It will be audited to know who is accessing what and the user will be in complete control of that data and who can see it. | |
2. DoMoreWithLess: A retail furniture room in Bangalore that showcases and sells space saving furniture: | |
Like Murphy beds, foldable dining tables, mezzanine beds | |
The logo will be : Do more with less | |
3. A simple tracking and invoicing software to hekp small businesses keep track of their tax liabilities, P&L, etc. | |
4. A storage name->location indexer that will output results based on frequency of data accessed. |
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
$ cat main | |
#!/bin/bash | |
rm -v /tmp/eject | |
i=0 | |
while true | |
do | |
if [ -f /tmp/eject ] | |
then | |
exit 0 | |
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
# cheat sheet | |
https://github.com/wsargent/docker-cheat-sheet | |
#cmds | |
docker --version | |
docker info | |
docker images | |
docker ps | |
docker system prune -a |
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
https://www.digitalocean.com/community/tutorials/how-to-install-go-1-7-on-centos-7 |
OlderNewer