Skip to content

Instantly share code, notes, and snippets.

View xguse's full-sized avatar

Gus Dunn xguse

View GitHub Profile
@xguse
xguse / pacman_backup_restore.txt
Last active December 4, 2016 10:34
pacman backup and restore commands
pacman -Qqe | grep -v "$(pacman -Qqm)" > pacman.lst
cat pacman.lst | xargs pacman -S --needed --noconfirm
========================
$ pacman -Qqe | grep -vx "$(pacman -Qqm)" > Packages
$ pacman -Qqm > Packages.aur
@xguse
xguse / install_ruby_rvm.sh
Last active August 29, 2015 14:07
Install the ruby RVM on a mac
#!/bin/bash
echo ''
echo ''
echo ''
echo "This script automates the instructions found on this webpage: http://code.tutsplus.com/tutorials/how-to-install-ruby-on-a-mac--net-21664"
echo ''
echo ''
echo ''
@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
#!/usr/bin/env python
import re
import fileinput
def this_line_is_useless(line):
useless_es = [
'BEGIN TRANSACTION',
'COMMIT',
'sqlite_sequence',
@xguse
xguse / html_ipython_cell_magic.py
Created September 9, 2014 13:25
From http://localhost:9999/louise/notebooks/YALE/installs/2014-09-08_setup_UNIPROT_PFAM_databases.ipynb
%%html
<iframe src=http://www.medcomp.medicina.unipd.it/Argot2/help/batch.html width=900 height=650></iframe>
@xguse
xguse / .zshrc
Last active August 29, 2015 14:05
# Path to your oh-my-zsh installation.
ZSH=$HOME/.oh-my-zsh/
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="bureau" #"candy" #"agnoster"
# Example aliases
| Loading Grails 2.2.5
| Configuring classpath
Cannot find plugin descriptor for path '/home/gus/src/OLF_upstream/modules/OpenLabBackend'.
| Configuring classpath.
| Environment set to production
| Environment set to production.
| Environment set to production..
| Environment set to production...
| Environment set to production....
Cloning into 'OLF_upstream'...
Submodule 'modules/OpenLabAttachments' (git@github.com:NanoCAN/OpenLabAttachments.git) registered for path 'modules/OpenLabAttachments'
Submodule 'modules/OpenLabBackend' (git@github.com:NanoCAN/OpenLabBackend.git) registered for path 'modules/OpenLabBackend'
Submodule 'modules/OpenLabBarcode' (git@github.com:NanoCAN/OpenLabBarcode.git) registered for path 'modules/OpenLabBarcode'
Submodule 'modules/OpenLabGeneTracker' (git@github.com:NanoCAN/OpenLabGeneTracker.git) registered for path 'modules/OpenLabGeneTracker'
Submodule 'modules/OpenLabNotes' (https://github.com/NanoCAN/OpenLabNotes) registered for path 'modules/OpenLabNotes'
Submodule 'modules/OpenLabStorage' (git@github.com:NanoCAN/OpenLabStorage.git) registered for path 'modules/OpenLabStorage'
Submodule 'prototype' (git@github.com:mlist/grails-prototype.git) registered for path 'prototype'
Cloning into 'modules/OpenLabAttachments'...
Submodule path 'modules/OpenLabAttachments': checked out '2089dc19fb98bc66e5573731cbc9f1
rm -rf $HOME/src/OLF_upstream/
git clone --recursive git@github.com:NanoCAN/OpenLabFramework.git OLF_upstream
cd $HOME/src/OLF_upstream/
grails war > war_output.txt