This file contains hidden or 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
# Download Kallisto and sratools (the latter to be able to download from SRA) | |
wget https://github.com/pachterlab/kallisto/releases/download/v0.42.3/kallisto_mac-v0.42.3.tar.gz | |
tar zvxf kallisto_mac-v0.42.3.tar.gz | |
wget http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.5.2/sratoolkit.2.5.2-mac64.tar.gz | |
tar zxvf sratoolkit.2.5.2-mac64.tar.gz | |
# Download and merge human cDNA and ncDNA files from Ensembl for the index. | |
wget ftp://ftp.ensembl.org/pub/current_fasta/homo_sapiens/cdna/Homo_sapiens.GRCh38.cdna.all.fa.gz | |
wget ftp://ftp.ensembl.org/pub/current_fasta/homo_sapiens/ncrna/Homo_sapiens.GRCh38.ncrna.fa.gz | |
cat Homo_sapiens.GRCh38.cdna.all.fa.gz Homo_sapiens.GRCh38.ncrna.fa.gz > Homo_sapiens.GRCh38.rna.fa.gz |
This file contains hidden or 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
#!/usr/bin/env python | |
import random | |
import struct | |
import sys | |
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833 | |
def ppNum(num): | |
return "%s (%s)" % (hex(num), num) |
This file contains hidden or 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
By doing these steps, transmission will be listening only on the VPN interface/network. | |
As debian/ubuntu are now using systemd, the following instructions should work on those distros. | |
1) Copy all shell scripts to /usr/local/bin/ and make them executable | |
2) Copy systemd service unit to /etc/systemd/system/ | |
3) Install transmission: sudo pacman -Syu transmission-cli | |
4) Install openvpn: sudo pacman -Syu openvpn | |
5) Change transmission parameters: sudo vim /var/lib/transmission/.config/transmission-daemon/settings.json | |
6) Create the openvpn client configuration file: /etc/openvpn/client.conf | |
7) Enable the new service: sudo systemctl enable openvpn-bittorrent |
This file contains hidden or 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 os | |
import sys | |
import bencodepy | |
import humanize | |
import argparse | |
def total_size_files_torrent(file_name): | |
try: | |
parsed = bencodepy.decode_from_file(file_name) |
This file contains hidden or 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
<?php | |
$extensions = array(); | |
$extensions = json_decode('{"JavaScript+Mako":[["js+mako","javascript+mako"],[],["application\/x-javascript+mako","text\/x-javascript+mako","text\/javascript+mako"]],"Brainfuck":[["brainfuck","bf"],["bf","b"],["application\/x-brainfuck"]],"HTML+Cheetah":[["html+cheetah","html+spitfire"],[],["text\/html+cheetah","text\/html+spitfire"]],"Bash":[["bash","sh","ksh"],["sh","ksh","bash","ebuild","eclass"],["application\/x-sh","application\/x-shellscript"]],"CSS+Myghty":[["css+myghty"],[],["text\/css+myghty"]],"Coldfusion HTML":[["cfm"],["cfm","cfml","cfc"],["application\/x-coldfusion"]],"Smarty":[["smarty"],["tpl"],["application\/x-smarty"]],"Protocol Buffer":[["protobuf"],["proto"],[]],"ApacheConf":[["apacheconf","aconf","apache"],[".htaccess","apache.conf","apache2.conf"],["text\/x-apacheconf"]],"Java":[["java"],["java"],["text\/x-java"]],"JavaScript+Genshi Text":[["js+genshitext","js+genshi","javascript+genshitext","javascript+genshi"],[],["application\/x-javascript+genshi","text\/x |
This file contains hidden or 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 | |
IPT="/sbin/iptables" | |
# Server IP | |
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')" | |
# Your DNS servers you use: cat /etc/resolv.conf | |
DNS_SERVER="8.8.4.4 8.8.8.8" | |
# Allow connections to this package servers |
This file contains hidden or 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
case class LSystem(axiom: String, angle: Double, len: Int = 100, sf: Double = 0.6)(rules: PartialFunction[Char, String]) { | |
var currVal = axiom | |
var currGen = 0 | |
def evolve() { | |
currGen += 1 | |
currVal = currVal.map { c => | |
if (rules.isDefinedAt(c)) rules(c) else c | |
}.mkString.replaceAll("""\|""" , currGen.toString) | |
} | |
This file contains hidden or 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 | |
## Install Git ######################################### | |
apt-get install git | |
## Install Ant ######################################### | |
apt-get install ant | |
## Install Jenkins ##################################### |