Skip to content

Instantly share code, notes, and snippets.

@AskPascal
AskPascal / bash.sh
Last active June 23, 2022 11:20
Git: revert files changed in one commit (A) to the state they were in in another commit (B)
git checkout <commitB> $(git diff-tree --no-commit-id --name-only -r <commitA> | grep "_snaps")
@AskPascal
AskPascal / markdown-details-collapsible.md
Created June 18, 2020 11:25 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets

Zoom settings for dissertations

  1. Go to https://uu-se.zoom.us/
  2. use button "Sign in" to sign in
  3. Select "Settings" from menu

Meeting

  • Host video: ON
@AskPascal
AskPascal / lunchbot.py
Created November 1, 2017 15:25 — forked from johandahlberg/lunchbot.py
Small bot that posts the Bikupan menu of the day to
# CC BY-SA 4.0
# http://creativecommons.org/licenses/by-sa/4.0/
import json
import time
import datetime
import requests
from bs4 import BeautifulSoup
@AskPascal
AskPascal / code
Last active April 8, 2016 11:01
Move process to screen
bg
disown $prozess
screen
reptyr $PID
@AskPascal
AskPascal / gitlatexdiff.sh
Created February 26, 2016 09:40
latexdiff between main.tex on two different commits of a git repository
#!/bin/bash -x
git checkout $1
git checkout -b diff_$1_$2
git archive $1 main.tex | tar -x -O > ../$1.tex
git archive $2 main.tex | tar -x -O > ../$2.tex
latexdiff ../$1.tex ../$2.tex > main.tex
latex main.tex
bibtex main.aux
latex main.tex
@AskPascal
AskPascal / README.md
Created December 11, 2015 10:24 — forked from hofmannsven/README.md
My simply Git Cheatsheet
seq 1 200 | parallel -j 32 openssl rand -base64 $(( 2**30 * 3/4 )) -out tmp.{}.tmp

Python script that parses BLAST output in XML (-outfmt 5 option) and converts to SAM. It uses Biopython module Bio.Blast.NCBIXML and has been tested on BLASTN 2.2.30+.

Caveat emptor

  • No check is done (yet?) on whether reads have degenerate mappings.
@AskPascal
AskPascal / iotest
Created May 27, 2015 12:58
IO test with random data
openssl rand -base64 $(( 2**30 * 3/4 )) | while true; do echo -n $(date) " "; dd of=./tmp.out bs=1M count=5000 2>&1 | grep MB; done; rm ./tmp.out