Skip to content

Instantly share code, notes, and snippets.

View zbeekman's full-sized avatar
🏢
New Office, still neck deep in code

Izaak "Zaak" Beekman zbeekman

🏢
New Office, still neck deep in code
View GitHub Profile
@mlund
mlund / doi2bib.sh
Last active March 25, 2018 23:31
Convert Digital Object Identifier (DOI) to BibTeX using crosscite.org
#!/bin/bash
curl -LH "Accept: application/x-bibtex;q=1" http://dx.doi.org/$1
echo
@wpsmith
wpsmith / repl.bat
Created January 16, 2014 17:35
repl.bat: Batch Replacement File
@if (@X)==(@Y) @end /* Harmless hybrid line that begins a JScript comment
::************ Documentation ***********
:::
:::REPL Search Replace [Options [SourceVar]]
:::REPL /?
:::REPL /V
:::
::: Performs a global search and replace operation on each line of input from
::: stdin and prints the result to stdout.
@joeyadams
joeyadams / million-random-lines.c
Created April 19, 2011 20:05
Benchmarking data for line sorting
/*
* Generate 1,000,000 lines of pseudorandom text.
* Each line matches ([\x20-\x7E]|[\xA0-\xFF]){0,127}\n
*
* sha256sum of output:
* 64a9d302d9fc1d0dc9d351c706153dfdd7821182ac8c3d7ed5581850c13ae240
*
* sha256sum of output, sorted with LC_ALL=C sort :
* 6e1e5b2cdb848c02c304d08c565dbd34d394b5ee322019098e10a5b7210f314b
*/
@glennklockwood
glennklockwood / omp_binding.c
Created January 4, 2017 06:12
Test to display how OpenMP threads are bound
#include <stdio.h>
#include <sched.h>
int main( int argc, char**argv )
{
#pragma omp parallel
{
printf( "Hello world from thread %d of %d running on cpu %2d!\n",
omp_get_thread_num()+1,
omp_get_num_threads(),
@Palmr
Palmr / ascii.php
Created November 4, 2011 15:57
Image to ascii art converter (not great)
<?php
if(!isset($_GET['pure'])){
?>
<style>
pre {
line-height: 11px;
font-family:"Courier New", Courier, monospace;
}
#error {
font-family: Arial, Helvetica, sans-serif;
@kylemanna
kylemanna / README.md
Last active August 29, 2018 12:30
Auto phone home reverse SSH port forwarding on Mac OS X using launchd properly

Attempt to phone home with a reverse ssh tunnel every time the OS X is booted. If ssh crashes or returns, then launchd will restart it in 10 seconds.

Assumptions:

  • The user has a .ssh/config as described below
  • The remote host key has been placed in user's known_hosts file
  • A private ssh key is installed at /Users/user/.ssh/user-home-fwd
  • The remote ssh host has the authorized keys file setup as described below

Place the file @ /Library/LaunchDaemons/phone.home.plist

@dstndstn
dstndstn / parallel-build.diff
Created August 31, 2018 14:42
A diff against wcslib-5.19.1 to allow parallel builds (eg, -j8) to work
diff --git a/C/GNUmakefile b/C/GNUmakefile
index eec9389..4631b63 100644
--- a/C/GNUmakefile
+++ b/C/GNUmakefile
@@ -50,8 +50,7 @@ else
endif
endif
-# For building the sharable library.
-PICLIB := libwcs-PIC.a
@robertmaynard
robertmaynard / CMakeLists.txt
Created April 25, 2014 17:44
CMake Compiler Override Example
cmake_minimum_required (VERSION 2.6)
#setup the override file if we are on darwin
#we could also do it based on the hostname
#if we so desired
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_USER_MAKE_RULES_OVERRIDE "DarwinOverrides.cmake")
endif()
Formula Installs Notable
samtools 1736 NA
blast 966 NA
bwa 622 yes
picard-tools 585 NA
bamtools 518 yes
vcftools 424 yes
tophat 422 NA
fastqc 395 NA
bcftools 394 NA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.