- sudo vim /etc/hostname
- rename
- sudo vim /etc/hosts
- rename
- sudo service hostname restart
- if it does not work, sudo shutdown -r now
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
import subprocess | |
process = subprocess.Popen('pbcopy', env={'LANG': 'en_US.UTF-8'}, stdin=subprocess.PIPE) | |
process.communicate(output.encode('utf-8')) |
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
sudo apt-get update | |
sudo apt-get dist-upgrade | |
sudo apt-get clean | |
sudo apt-get autoclean | |
npm install -g gulp bower yo | |
npm install -g generator-polymer | |
npm install -g firebase-tools |
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
set nocompatible | |
filetype plugin on | |
if has("autocmd") | |
filetype on | |
autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab | |
autocmd FileType javascript setlocal ts=4 sts=4 sw=4 noexpandtab | |
endif | |
set mouse=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
rsync -a --delete \ | |
--delete-excluded .git \ | |
--delete-excluded .gitignore \ | |
--delete-excluded publish.sh \ | |
--delete-excluded CNAME \ | |
~/sites/thesite/src/dist/ . | |
git add --all | |
git commit -m "published on `date`" | |
git push origin master |
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
docker run -it --rm -v ~/sites/savewalnut/src:/src --name webdev --expose 9000 -p 80:9000 hcsoftech/webdev |
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
sudo docker run -it --rm -v /media/data/volumes/projects/go:/go -w /go golang:latest |
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 | |
SSH_REDIR_PORT=12345 | |
SSH_D="cloud_sshd" | |
COMMAND="ssh -R $SSH_REDIR_PORT:localhost:22 $SSH_D -N -f" | |
pgrep -f "ssh -R $SSH_REDIR_PORT:localhost:22" > /dev/null 2>&1 || (eval $COMMAND && echo $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
ifconfig eth0 | grep "inet addr" | cut -d: -f2 | awk '{print $1}' |
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
$ curl -sSL https://get.docker.com/ubuntu/ | sudo sh |
NewerOlder