Skip to content

Instantly share code, notes, and snippets.

View splaisan's full-sized avatar
🙂
!

Stephane Plaisance splaisan

🙂
!
View GitHub Profile
@yoosuf
yoosuf / stopnremoveall.sh
Created August 14, 2019 01:48
Stop and remove all docker containers and images (Docker)
# List all containers (only IDs)
docker ps -aq
# Stop all running containers
docker stop $(docker ps -aq)
# Remove all containers
docker rm $(docker ps -aq)
# Remove all images
@tabe
tabe / how-to-install-sf-on-macos-with-macports.txt
Created July 24, 2019 02:33
How to install sf 0.7-6 on macOS Mojave with MacPorts
How to install sf 0.7-6 on macOS Mojave with MacPorts
Prerequisites:
- installing R, pkg-config, and gdal via MacPorts.
Note that proj (proj5) is automatically installed as a dependency for gdal.
- downloading the source tarball sf_0.7-6.tar.gz in the current directory
Then:
@jblachly
jblachly / bcl2fastq build ubuntu 16 LTS.md
Last active March 14, 2023 17:33
How to build bcl2fastq2 on Ubuntu 16 LTS

1. Make sure configure can find sys/stat.h:

Modify bcl2fastq/src/cmake/macros.cmake

Find the last block:

#
# Macro to find libraries, with support for static-only search
#
macro(bcl2fastq_find_header_or_die variable file)
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 2, 2024 16:19
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@pkuczynski
pkuczynski / parse_yaml.sh
Last active April 9, 2024 18:36
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@mkweskin
mkweskin / gist:5414303
Last active November 13, 2023 15:52
Convert markdown to mediawiki with pandoc
pandoc -f markdown -t mediawiki test.md -o test.wiki
# Thanks to @tillmanj for the updated formatting
@nathanhaigh
nathanhaigh / deinterleave_fastq.sh
Last active January 22, 2024 15:25
deinterleave FASTQ files
#!/bin/bash
# Usage: deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress]
#
# Deinterleaves a FASTQ file of paired reads into two FASTQ
# files specified on the command line. Optionally GZip compresses the output
# FASTQ files using pigz if the 3rd command line argument is the word "compress"
#
# Can deinterleave 100 million paired reads (200 million total
# reads; a 43Gbyte file), in memory (/dev/shm), in 4m15s (255s)
#