Skip to content

Instantly share code, notes, and snippets.

@jpkrohling
jpkrohling / hugo
Last active March 9, 2019 03:29
hugo vs. jekyll
$ docker run --rm --name hugo -i -t fedora /bin/bash
[root@4cb109a331f9 /]# time dnf install hugo git -y > /dev/null 2>&1
real 0m44.956s
user 0m29.467s
sys 0m3.592s
[root@4cb109a331f9 /]# time git clone https://github.com/theute/kiali.io.git > /dev/null 2>&1
real 1m23.461s
user 0m3.596s
@psychemedia
psychemedia / nblunr.html
Created May 10, 2018 17:07
Simple test of lunr search over lunr indexed Jupyter notebook markdown cells
<html><head>
<script type="application/javascript" src="assets/js/jquery-3.3.1.js"></script>
<script type="application/javascript" src="assets/js/showdown.min.js"></script>
<!--
https://markjs.io/
@leoherzog
leoherzog / *Setup.md
Last active April 27, 2022 14:13
Setting Up Aerial Screensaver on Linux
  • sudo apt install xscreensaver jq aria2 notify-osd
  • Make a directory in $HOME called Aerial
  • Copy aerial-downloader.sh below into $HOME/Aerial
  • Run it once
  • crontab -e
  • 00 10 * * * sh $HOME/Aerial/aerial-downloader.sh to download new stuff (if any) at 10:00 every day
  • nano ~/.xscreensaver and add the code in the file below
  • Open up the XScreensaver app and pick "Apple Aerial"
  • gnome-session-properties and add xscreensaver -nosplash to the list
  • If you want, go into the System Settings and add a keyboard shortcut for Shift + Win + L to launch the command xscreensaver-command -lock
@satra
satra / fs_gifti_xfm.py
Created December 11, 2011 10:04
freesurfer gifti transformation to native space
#DOES NOT WORK: GIFTI READ/WRITE is broken
import nibabel as nb
import nibabel.gifti as gifti
# load combined file
# created with: mris_convert --combinesurfs lh.pial rh.pial ./pial.gii
surf = gifti.read('pial.gii')
#load orig affine transform
ao = nb.load('orig.nii').get_affine()