Skip to content

Instantly share code, notes, and snippets.

# original post: http://blog.hostonnet.com/uninstall-gui-from-ubuntu-14-04-lts
sudo apt-get purge -y lightdm
sudo shutdown -r now
sudo apt-get clean
sudo apt-get autoclean
apt-get purge -y unity*
sudo apt-get purge -y unity*
sudo apt-get purge -y gnome-*

Set PRAGMA encoding =“UTF-8” for main database in sqlite

sqlite3 test.db

opens sqlite, nothing is written at that time

pragma encoding=utf8;
#!/bin/sh
fdisk /dev/sda <<EOF
d
d
n
p
1
#!/bin/sh
for i in $(seq 30 60); do
echo "yes \n" | sshpass -p "password" ssh-copy-id -i /home/ubuntu/.ssh/id_rsa.pub node-"$i"
done
NAME="AiyaraOS"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=aiyara
ID_LIKE=ubuntu
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
import org.apache.spark.{SparkConf, SparkContext}
/**
* Created by Mooxx on 9/25/2015 AD.
*/
object TestPipe {
def main(args: Array[String]) {
val conf = new SparkConf().setMaster("local[*]").setAppName("Test Pipe")
val sc = new SparkContext(conf)
time{
import org.bdgenomics.adam.rdd.ADAMContext
import org.bdgenomics.adam.projections.{AlignmentRecordField, Projection}
val ac = new ADAMContext(sc)
val reads = ac.loadAlignments(
"/home/deploy/data/HG00096.unmapped.ILLUMINA.bwa.GBR.low_coverage.20120522.adam",
projection = Some(
Projection(
AlignmentRecordField.sequence,
def time[T](block: => T): T = {
val start = System.currentTimeMillis
val res = block
val totalTime = System.currentTimeMillis - start
println("Elapsed time: %1d ms".format(totalTime))
res
}