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 | |
# this script should be run as root with "sudo" | |
if [ `id -u` != "0" ]; then | |
echo "Sorry, you are not root." | |
exit 1 | |
fi | |
# add the freenx ppa repository list | |
add-apt-repository ppa:freenx-team | |
# update software information | |
apt-get update |
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
<script src="http://github.com/jeresig/processing-js/raw/master/processing.min.js" type="text/javascript"></script> | |
<script src="http://github.com/jeresig/processing-js/raw/master/examples/init.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
Array.max = function( array ) { | |
return Math.max.apply( Math, array ); | |
}; | |
Array.min = function( array ){ | |
return Math.min.apply( Math, array ); | |
}; | |
</script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://github.com/jeresig/processing-js/raw/master/processing.min.js"></script> | |
<script src="http://github.com/jeresig/processing-js/raw/master/examples/init.js"></script> | |
<script type="text/javascript"> | |
Array.max = function( array ){ | |
return Math.max.apply( Math, array ); | |
}; |
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/sh | |
# author: Michael Chelen http://mikechelen.com http://twitter.com/mikechelen | |
# license: Creative Commons Zero Public Domain http://creativecommons.org/publicdomain/zero/1.0/ | |
# requires curlftpfs | |
# mirrors the XML files from Pubmed Central Open Access Subset FTP | |
# tested with Ubuntu Server 10.04 | |
# ftp server and remote path | |
ftp=ftp.ncbi.nlm.nih.gov | |
ftppath=pub/pmc |
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/sh | |
# author: Michael Chelen http://mikechelen.com http://twitter.com/mikechelen | |
# license: Creative Commons Zero Public Domain http://creativecommons.org/publicdomain/zero/1.0/ | |
# requires curlftpfs | |
# mirrors the XML files from Pubmed Central Open Access Subset FTP | |
# tested with Ubuntu Server 10.04 | |
# ftp server and remote path | |
ftp=ftp.ncbi.nlm.nih.gov | |
ftppath=pub/pmc |
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
for I in A-B C-H I-N O-Z; | |
do | |
curfile=articles.$I.tar.gz | |
cururl=ftp://$ftp/$ftppath/$curfile | |
echo "Downloading $cururl to $tempdir" | |
# download file to temporary directory | |
wget -P $tempdir $cururl | |
# use up to 5 concurrent connections | |
# aria2c -d $tempdir -s 5 $cururl | |
echo "Exctracting $tempdir/$curfile to $filedir" |
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
preg_match('/[0-9]+/', $_GET["pmcid"],$matches); | |
$pmc = $matches[0]; | |
// generate list files command | |
$cmd = "ls $filepath/*/*-$pmc.nxml"; | |
// run command and save results (trim whitespace) | |
$output = trim(shell_exec($cmd)); |
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
if (strlen($output)>0) { | |
// set http header type | |
header ("Content-Type:text/xml"); | |
// output requested file | |
readfile($output); | |
} |
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 | |
// enter API key | |
$key = "****************"; | |
?> |
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
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDQFSzet/Qu8SLklDQyNbX5k16MwOBVKuaY9bNJhb99BkIRIVbNpr61eHUG3gP6haNC6qreTbpHscq4AQV21gLvCgVmHsTci0QAK44weFyDzVwIBFH9uUN+f/k2NTY9zV8FaBqK9CW8hS2f50EB38mGYvE7/0/S1u7/jtxnKqwAgw== htc_aria" >> authorized_keys |
OlderNewer