Skip to content

Instantly share code, notes, and snippets.

View xguse's full-sized avatar

Gus Dunn xguse

View GitHub Profile
@xguse
xguse / g1kv37_vs_hg19.tsv
Last active June 15, 2016 19:23 — forked from lindenb/FastaMD5.java
md5sums and bash pipeline for confirming chromosome validity for human_g1k_v37.fasta
1b22b98cdeb4a9304cb5d48026a85128 1 dna:chromosome chromosome:GRCh37:1:1:249250621:1 chr1
988c28e000e84c26d552359af1ea2e1d 10 dna:chromosome chromosome:GRCh37:10:1:135534747:1 chr10
98c59049a2df285c76ffb1c6db8f8b96 11 dna:chromosome chromosome:GRCh37:11:1:135006516:1 chr11
06cbf126247d89664a4faebad130fe9c GL000202.1 dna:supercontig supercontig::GL000202.1:1:40103:1 chr11_gl000202_random
51851ac0e1a115847ad36449b0015864 12 dna:chromosome chromosome:GRCh37:12:1:133851895:1 chr12
283f8d7892baa81b510a015719ca7b0b 13 dna:chromosome chromosome:GRCh37:13:1:115169878:1 chr13
98f3cae32b2a2e9524bc19813927542e 14 dna:chromosome chromosome:GRCh37:14:1:107349540:1 chr14
e5645a794a8238215b2cd77acb95a078 15 dna:chromosome chromosome:GRCh37:15:1:102531392:1 chr15
fc9b1a7b42b97a864f56b348b06095e6 16 dna:chromosome chromosome:GRCh37:16:1:90354753:1 chr16
351f64d4f4f9ddd45b35336ad97aa6de 17 dna:chromosome chromosome:GRCh37:17:1:81195210:1 chr17
@xguse
xguse / PKGBUILD
Last active August 29, 2015 14:24 — forked from flying-sheep/PKGBUILD
# Maintainer: Meow < a.li.devtty at gmail dot com >
# Get download links and md5 sums for latest version of RStudio desktop
cat <<_EOF_ >/dev/null
## R code #############
require(XML)
page = htmlTreeParse("http://www.rstudio.com/products/rstudio/download/",useInternalNodes = T)
links = sapply(getNodeSet(page,'//table[@class="downloads"]/thead/tr/th[text()="Installers"]/../../..//a[contains(@href,".deb")]'),xmlGetAttr,'href')
md5sums = sapply(getNodeSet(page,'//table[@class="downloads"]/thead/tr/th[text()="Installers"]/../../..//a[contains(@href,".deb")]/../..//code'),xmlValue)
print(cbind(links,md5sums))

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
@xguse
xguse / clip_magic.py
Last active August 29, 2015 14:15 — forked from nova77/clip_magic.py
Add copy to clipboard from IPython!
"""
Add copy to clipboard from IPython!
To install, just copy it to your profile/startup directory, typically:
~/.ipython/profile_default/startup/
Example usage:
%clip hello world
# will store "hello world"
# Ensure we're in a virtualenv.
if [ "$VIRTUAL_ENV" == "" ]
then
echo "ERROR: not in a virtual environment."
exit -1
fi
# Setup variables.
CACHE="/tmp/install-pygtk-$$"
@xguse
xguse / Backend.py
Last active August 29, 2015 14:07 — forked from bpeck/Backend.py
import multiprocessing
import multiprocessing.queues
from flask import Flask
from flask import request
class Backend(object):
def __init__(self, command_queue, host='0.0.0.0', port=8000, debug=True):
self.command_queue = command_queue
self.flask_app = Flask('Backend')
self.flask_app.add_url_rule('/', "handleRequest", self.handleRequest, methods=['GET'])
@xguse
xguse / flask-upload
Last active August 29, 2015 14:06 — forked from dAnjou/flask-upload
<VirtualHost *>
ServerName example.com
WSGIDaemonProcess www user=max group=max threads=5
WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi
<Directory /home/max/Projekte/flask-upload>
WSGIProcessGroup www
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
@xguse
xguse / 0_reuse_code.js
Created February 2, 2014 23:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@xguse
xguse / noise.sh
Last active November 21, 2022 12:14 — forked from rsvp/noise.sh
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-10-04
#
# _______________| noise : ambient Brown noise generator (cf. white noise).
#
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave]
# ^minutes can be any positive integer.
# Command "noise 1" will display peak-level meter.
#
# Dependencies: play (from sox package)
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: GPGTools - https://gpgtools.org
mQINBFIKB18BEADWZvUf+2taIgGEl+AbZVOEuPt1movmT2KG9qY0354RS4EVJU+s
3edCSm55ynazcJo6ikSEsVFb2LKa9Lmqpf//32Q3Mpt10AX7nLcnxYBrMCu6uVBV
l+9cpPKIFtOLLZQvLN4LhgS39wAi+Azin3on3LrTWc7knRwCeGrx+UupbDdYiExm
sVleD9gjKX9ri/sqEdBlNZV48pXrCGbEC3b50Jh1rdPIUg//KZMAwThuOzXo2Y8l
9pWLWZqbuNXCBNDixq3TVOZAptWrvSSCQDrfA+wJbho9dRR3jurgoF9kb8BiJnsL
CZkf2R8tMUfgG866okRisRCIE8VbRX19bS6is0czKa/1/HJc0NDhLV4hig2aijsP