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
<?php | |
header("Cache-Control: no-cache, must-revalidate"); | |
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); | |
header("Pragma: no-cache"); | |
function human_filesize($bytes, $decimals = 2) { | |
$sz = 'BKMGTP'; | |
$factor = floor((strlen($bytes) - 1) / 3); | |
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor]; | |
} |
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 | |
# Reads EXIF creation date from all .JPG files in the | |
# current directory and moves them carefully under | |
# | |
# $BASEDIR/YYYY/YYYY-MM/YYYY-MM-DD/ | |
# | |
# ...where 'carefully' means that it does not overwrite | |
# differing files if they already exist and will not delete | |
# the original file if copying fails for some reason. |
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 | |
# Gist mirror script | |
# Jan van Haarst jan@vanhaarst.net | |
# 20150115 | |
# Debug | |
#set -o xtrace | |
#set -o verbose | |
# Stop on error |
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 | |
# Simple script to print: | |
# Size of a directory tree | |
# Number of files in that tree | |
# Number of hard links in that tree | |
# Number of softlinks in that tree | |
import os | |
import sys | |
import datetime |
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 | |
# Script to create bash aliases for hostnames in ssh config and known_hosts files | |
# Original fom http://samrowe.com/wordpress/2008/07/29/bash-ssh-happiness/ | |
# Updated by ja@vanhaarst.net | |
# Example usage: | |
# ALIAS_TEMP=$(mktemp);bash ssh_alias.sh | sort -r > $ALIAS_TEMP;source $ALIAS_TEMP;rm $ALIAS_TEMP;alias | |
set -o errexit # Exit on error | |
set -o nounset # Exit on use of unset variable | |
#set -o verbose # Prints shell input lines as they are read. |
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
[DEFAULT] | |
login = [YOUR LOGIN] | |
password = [YOUR PASSWORD] | |
START_URL = https://slimmemeterportal.nl/login | |
LOGIN_URL = https://slimmemeterportal.nl/user_session | |
DOWNLOAD = [LOCATION TO STORE THE FILES] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import os | |
import sys | |
import gzip | |
filetype="txt" | |
for line in sys.stdin: | |
# {movieName}/{holeNumber}/{qStart}_{qEnd} according to https://pacbiofileformats.readthedocs.io/en/3.0/BAM.html | |
(movieName,holeNumber,subread)=(line.split()[0].split('/')) | |
directory = movieName+'/'+holeNumber[:3] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder