###Determine your normal system partition - (the switch is a lowercase "L") sudo fdisk -l
###If you aren't sure, run df -Th
Look for the correct disk size and ext3 or ext4 format.
###Mount your normal system partition:
###Determine your normal system partition - (the switch is a lowercase "L") sudo fdisk -l
###If you aren't sure, run df -Th
Look for the correct disk size and ext3 or ext4 format.
###Mount your normal system partition:
# install 1.3.1 ( stable version ) | |
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
# NEW WAY / EASY WAY | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.deb | |
sudo dpkg -i elasticsearch-1.1.1.deb |
#!/bin/sh | |
case "${1}" in | |
resume|thaw) | |
restart network-manager | |
;; | |
esac | |
# put in /etc/pm/sleep.d/ | |
# chmod 775 /etc/pm/sleep.md/resume_network.sh |
# using apscheduler 2.1.2 since 3.0 version has a problem with importing Scheduler module | |
# sudo pip install apscheduler==2.1.2 | |
from apscheduler.scheduler import Scheduler | |
sched = Scheduler() | |
sched.start() | |
def job_function(): | |
print "Hello World" |
rsync -av --progress sourcefolder /destinationfolder --exclude thefoldertoexclude |
rsync --partial --progress --rsh=ssh user@host:remote_file local_file |
import rawes #install rawes. pip install rawes | |
es = rawes.Elastic('localhost:9200') | |
#index each line | |
with open('sample.json','r') as f: | |
for line in f: | |
es.post('index_name/index_type',data=line) | |
#!/bin/sh | |
# one way (older scala version will be installed) | |
# sudo apt-get install scala | |
#2nd way | |
sudo apt-get remove scala-library scala | |
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb | |
sudo dpkg -i scala-2.11.4.deb | |
sudo apt-get update |