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
alias cd..="cd .." | |
alias cd...="cd ../.." | |
alias cd....="cd ../../.." | |
alias cd.....="cd ../../../.." | |
alias cd......="cd ../../../../.." | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias สห="ls" | |
alias แก="cd" |
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 install --reinstall ubuntu-desktop && sudo apt-get install -f | |
#another way | |
sudo apt-get install gnome-desktop-environment metacity metacity-common libmetacity0 compiz-core compiz-gnome compiz python-compizconfig compizconfig-settings-manager compiz-plugins compiz-wrapper libdecoration0 compiz-fusion-plugins-main compiz-fusion-plugins-extra compizconfig-backend-gconf |
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
#export PATH=$PATH:~/bin | |
export PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH | |
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages | |
export PATH=${PATH}:$HOME/gsutil | |
#export EDITOR='subl -w' | |
alias sl="ls" | |
alias สห="ls" | |
alias แก="cd" | |
alias howmuch="tree .|wc" | |
alias prettyjson='python -m json.tool' |
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 relativenumber | |
set number | |
colorscheme elflord | |
filetype plugin indent on | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
" Allow saving of files as sudo when I forgot to start vim using sudo. | |
cmap w!! w !sudo tee > /dev/null % |
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
# edit sources.list | |
sudo vi /etc/apt/sources.list | |
# remove last two lines | |
# add these two line to .bashr | |
sudo echo "export LC_ALL=en_US.utf8" >>~/.bashrc | |
sudo echo "export LANGUAGE=en_US.utf8" >>~/.bashrc | |
sudo apt-get install screen vim openjdk-7-jdk openjdk-7-jre | |
sudo chmod 777 /var/run/docker.sock |
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.packages("RNeo4j") | |
install.packages("igraph") | |
install.packages("jsonlite") | |
install.packages("devtools") | |
library(RNeo4j) | |
library(igraph) | |
library(jsonlite) | |
library(devtools) |
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
#http://stackoverflow.com/questions/19897743/exposing-a-port-on-a-live-docker-container | |
sudo docker ps | |
sudo docker commit <containerid> <foo/live> | |
sudo docker run -i -p 22 -p 8000:80 -m /data:/data -t <foo/live> /bin/bash |
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
# Export Docker Container | |
docker export graphdb | gzip > graphdb.tar.gz | |
docker export rstudio | gzip > rstudio.tar.gz | |
docker export php | gzip > php.tar.gz | |
# Download exported tar.gz | |
python -m SimpleHTTPServer | |
# Download in another machine with wget |
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
setwd("~/Dropbox/CPCU/CP-year4/LargeScale/data-analytics/data") | |
getwd() | |
traindekd<-read.csv('fav_story_train.txt') | |
save(traindekd) | |
#trainingtest | |
head(traindekd) | |
#traindekd | |
length(unique(traindekd$user_id)) | |
length(unique(traindekd$story_id)) |
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
# resolve apt-get problem | |
# remove last two lines from sources.list | |
sudo head -n -2 /etc/apt/sources.list | |
# add these two line to .bashrc to config locale | |
sudo echo "export LC_ALL=en_US.utf8" >>~/.bashrc | |
sudo echo "export LANGUAGE=en_US.utf8" >>~/.bashrc | |
# install necessary packages |
OlderNewer