Skip to content

Instantly share code, notes, and snippets.

View LogIN-'s full-sized avatar
:electron:
Working from space

LogIN-

:electron:
Working from space
  • WWW
View GitHub Profile
@hussius
hussius / kallisto_setup.sh
Last active December 11, 2020 15:45
Kallisto setup
# 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
@ryancdotorg
ryancdotorg / frag32.py
Created August 20, 2015 16:27
A FAT32 fragmenter, because I am a horrible person.
#!/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)
@jriguera
jriguera / 00-openvpn-bittorrent.txt
Last active February 4, 2018 09:39
Split routing for bittorrent in Arch
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
@DonnchaC
DonnchaC / torrent-file-size.py
Last active December 8, 2024 11:04
Get total file sizes of contents for a set of .torrent files
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)
@LogIN-
LogIN- / programming_ext.php
Created October 4, 2014 11:21
PHP list of all programming extensions
<?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
@thomasfr
thomasfr / iptables.sh
Last active October 17, 2024 07:55
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
#!/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
@litan
litan / LSystem-Kojo.scala
Created May 20, 2012 07:51
Playing with LSystems in Kojo
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)
}
@Stubbs
Stubbs / install_jenkins.sh
Created February 3, 2012 10:35
Script to install everything you need for PHP CI on a Debian box.
#!/bin/bash
## Install Git #########################################
apt-get install git
## Install Ant #########################################
apt-get install ant
## Install Jenkins #####################################