This file contains 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 ruby | |
# | |
# CFengine command-line test utility. | |
# | |
# Diego Zamboni, December 27th, 2011 | |
# | |
# Run as "cf-cmd help" to see usage information. | |
require 'readline' | |
require 'tmpdir' |
This file contains 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
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
main(argc,argv) | |
int argc; | |
char **argv; | |
{ | |
char *array; | |
unsigned long long int n_bytes,t,i,j; |
This file contains 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
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
main(argc,argv) | |
int argc; | |
char **argv; | |
{ | |
char *array; | |
unsigned int n_bytes,t,i,j; |
This file contains 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 python3 | |
import re, argparse | |
#NE2 HIS -> HSE | |
#standard fields = [ 'record', 'serial', 'name', 'altLoc', 'resName', 'chainID', 'resSeq', | |
# 'iCode', 'x', 'y', 'z', 'occupancy', 'tempFactor', 'element', 'charge' ] | |
parser = argparse.ArgumentParser(description='Changes HIS to HSE in PDB file where "NE2 HIS" found, outputs to sdout') | |
parser.add_argument("file", type=str) |
This file contains 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
exists() { | |
if [ -z "$1" ]; then | |
return 99; | |
fi | |
type -t "$1" 2>&1 1>/dev/null | |
} | |
if ! exists _command && ! shopt -oq posix; then | |
if [ -f /etc/bash_completion ]; then |
This file contains 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 | |
from __future__ import division | |
# a bar plot with errorbars | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import random | |
from collections import Counter |
This file contains 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 | |
# To backup a directory, and then replace it with a git version | |
# that is already available remotely | |
# Conflicting file versions will be overwritten with the remote version | |
# Files which existed locally but not in the git repo will be preserved (*not* removed) | |
set -e | |
PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:$PATH |
This file contains 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 | |
#Notifies you when a watch/build script dies on OS X (easy to modify for linux though) | |
#Installation: put this into e.g. ~/bin/ (make sure your PATH variable points there) | |
#run e.g. `fw gulp` | |
trap exit SIGINT | |
while [ 0 ]; do | |
"$@" |
This file contains 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
find . -iname '*.png' -exec pngcrush -brute -reduce -ow {} \; | |
find . \( -iname '*.jpg' -o -iname '*.jpeg' \) -exec jpegoptim {} \; |
This file contains 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 | |
#This is a workaround for Overland 2000 tape devices (via FC), /dev/sgx, /dev/nstx not being added automatically in RHEL4. | |
#For more information see notes at end of file | |
# | |
# chkconfig: 235 71 25 | |
# description: Workaround for Overland 2000 tape devices (via FC) \ | |
# being added as device nodes. | |
DEBUG = 9 | |
import os, re, time | |
qla_search_path = '/proc/scsi/qla2xxx' |
OlderNewer