start new:
tmux
start new with session name:
tmux new -s myname
for i in `seq 1 100`; do curl $URL; done | |
## With basic HTTP auth | |
for i in `seq 1 100`; do curl -u username:password $URL; done |
package main | |
imports ( | |
"path/filepath" | |
"strings" | |
"github.com/gorilla/mux" | |
) | |
func main() { | |
server_port := ":3000" |
awk 'FNR==1 && NR!=1{next;}{print}' *.csv > newfile.csv |
#See which files in / are taking up space | |
du -md1 / | sort -n | |
#better way to see which directories in / are taking up space. | |
ncdu -x / | |
#Clean pacman cache | |
pacman -Scc |
#Build image from Dockerfile in same directory. | |
docker build --rm=true -t go_playground . | |
#Run docker image in a container with interactive shell connecting /go on my host machine to /go in docker container | |
# has name go-playgound and is ran from image go_playground. | |
sudo docker run -ti -p 9000:9000 -v /home/cody/projects/go:/go --name=go-playground go_playground /bin/bash -l | |
#Turns out that you don't need we don't need bin/bash. Line 52 in the dockerfile does that | |
#with no command at the end, it automatically uses what's in CMD in the docker file. | |
#Sometimes you still have to add the command on my setup for some reason though |
#create the data/volume container | |
docker run -v /var/lib/pgsql/data -v /home/cody/projects/warrantygenius:/var/www --name=wg_storage ubuntu true | |
#Build postgres image from within the dockerfile directory | |
docker build --rm=true -t wg_postgres . | |
#Create and run postgres container from the image | |
docker run -d --name=wg-postgres --volumes-from=wg_storage wg_postgres | |
#Build ruby image. rm clears cache? and -t tags it as that name |
# Create ghost volume to store our data | |
docker run -v ghost-storage:/ghost-override --name=ghost-storage ubuntu true | |
# Create site volume | |
dockur run -v incoin.io:/var/www/incoin.io --name=site-storage ubuntu true | |
#Create nginx volume to store sites-enabled, logs and certs | |
docker run -v nginx/logs:/var/log/nginx -v certs:/etc/nginx/certs -v sites-enabled:/etc/nginx/sites-enabled --name=nginx-storage ubuntu true | |
# Start the ghost daemon using volume from ghost-storage |
[codelitt@archer ubercms]$ cap deploy | |
* 2013-07-03 12:41:33 executing `deploy' | |
* 2013-07-03 12:41:33 executing `deploy:update' | |
** transaction: start | |
* 2013-07-03 12:41:33 executing `deploy:update_code' | |
executing locally: "git ls-remote ssh://deploy@198.211.112.227/var/www/ubercms.git master" | |
deploy@198.211.112.227's password: | |
command finished in 9435ms | |
* executing "git clone -b master --depth 1 ssh://deploy@198.211.112.227/var/www/ubercms.git /var/www/ubercms/releases/20130703154142 && cd /var/www/ubercms/releases/20130703154142 && git checkout -b deploy 9da296f1e0b22e446a18515b16c0705f76ff83f0 && rm -Rf /var/www/ubercms/releases/20130703154142/.git && (echo 9da296f1e0b22e446a18515b16c0705f76ff83f0 > /var/www/ubercms/releases/20130703154142/REVISION)" | |
servers: ["cms.codelitt.com"] |
# nvidia-xconfig: X configuration file generated by nvidia-xconfig | |
# nvidia-xconfig: version 319.23 (buildmeister@swio-display-x86-rhel47-11) Thu May 16 20:17:21 PDT 2013 | |
# x86-input-mtrack-git package installed las wel | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "Mouse0" "CorePointer" |