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
# One command to extract them all | |
extract () { | |
if [ $# -ne 1 ] | |
then | |
echo "Error: No file specified." | |
return 1 | |
fi | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xvjf $1 ;; |
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 | |
// Outputting the widget area on your homepage | |
// Accomodates one to four active widget areas, fits bootstrap columns accordingly | |
// front-page.php | |
$widget_count = 0; | |
for ($i = 1; $i <= 4; $i++){ | |
if ( is_active_sidebar('homepage-widget-area-'.$i) ) $widget_count++; | |
} | |
if ( $widget_count > 0) { |
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
setwd('C:/Your/Directory/Here') | |
files <- list.files(pattern="txt$") | |
i <- 0 | |
values <- list() | |
for(file in files) { | |
i <- i+1 | |
cc <- c(rep("NULL", 12), "numeric") | |
values[[i]] <- as.numeric(unlist(read.delim(file, colClasses = cc, skip=1, header = FALSE))) | |
} |
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/perl | |
use warnings; | |
use strict; | |
############################################################# | |
# Name: Genome RE Sites # | |
# Author: Phil Ewels # | |
# Version 1.0 – 25/05/2011 # | |
# ————————————————————————————————————————————————————————— # | |
# Outputs a file with locations of restriction endonuclease # | |
# sites (not resulting fragments) # |
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/perl | |
use warnings; | |
use strict; | |
use Cwd; | |
use File::Find; | |
#### | |
# FIND UNCOMPRESSED FILES | |
# Prints the full path of any files larger than 50mb which are uncompressed | |
# One file path per newline, so output can be piped to other tools, eg: | |
# perl find_uncompressed_files.pl | xargs gzip |
NewerOlder