Skip to content

Instantly share code, notes, and snippets.

@NeutralKaon
NeutralKaon / keybase.md
Created March 30, 2017 08:19
keybase.io verifcation

Keybase proof

I hereby claim:

  • I am neutralkaon on github.
  • I am neutralkaon (https://keybase.io/neutralkaon) on keybase.
  • I have a public key ASAy_-IdgXI7wv708LBkEvASJzIKGR-k4IVz9qK8AttN7Qo

To claim this, I am signing this object:

#!/bin/bash
# A silly wrapper script to halt University of Oxford file
# transfers to the central Tivoli Storage Manager / HFS Backup / IBM Spectrum Protect
# (take your pick, they're all the same) backup robot place.
#
# Usage: sudo /path/to/script /path/to/backup/location
#
# Requires python3 accessible as python3, and the regex / os modules.
# Tested on MacOS and Linux
#
#Helper function to plot a simple linear regression line over a facet_wrap grid with ggplot2
stat_smooth_func <- function(mapping = NULL, data = NULL,
geom = "smooth", position = "identity",
...,
method = "auto",
formula = y ~ x,
se = TRUE,
n = 80,
span = 0.75,
fullrange = FALSE,
@NeutralKaon
NeutralKaon / iTunes_Control.sh
Created April 7, 2020 08:33
Control iTunes from the command line -- forked from rkumar
#!/bin/bash
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
# edit 2010.06.01 rahul kumar
####################################
showHelp () {
@NeutralKaon
NeutralKaon / hostapd.conf
Created August 28, 2020 20:45
Hostapd.conf configuration for the ath9k-driven TP-Link TL-WDN4800 N900 PCI-e wifi card
##### hostapd configuration file ##############################################
# Empty lines and lines starting with # are ignored
# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for
# management frames with the Host AP driver); wlan0 with many nl80211 drivers
# Note: This attribute can be overridden by the values supplied with the '-i'
# command line parameter.
interface=wlp3s0
# In case of atheros and nl80211 driver interfaces, an additional
#!/usr/bin/python3
# JJM -- parse cvi42 / cmr42 xml reports and extract relevant cardiac parameters
# Plonk them into a csv file for later dealings (in R)
# Supposedly biologist friendly.
import sys
import csv
from bs4 import BeautifulSoup
multiplyFlag = True
@NeutralKaon
NeutralKaon / read_dsv.m
Last active August 3, 2023 06:55
A matlab routine for reading Siemens IDEA / POET .dsv pulse sequence directories / files
function out=read_dsv(pathname)
% Read a Siemens IDEA DSV folder as simulated by POET, for subsequent plotting.
% This just parses a pre-existing text file and plonks it into a struct.
%
% Input: a POET-simulated folder containing .dsv files (check your temp
% files in an IDEA VM)
%
% Output: a returned structure containing the parsed contents present.
%
% Should you wish to plot a pulse sequence diagram, you probably want to
Country Code Population Year
ABW 105366 2017
AFG 36296400 2017
AGO 29816748 2017
ALB 2873457 2017
AND 77001 2017
ARB 411898967 2017
ARE 9487203 2017
ARG 44044811 2017
ARM 2944809 2017
// ==UserScript==
// @name ISMRM Video Fixer
// @namespace ismrm-video-fixer
// @version 8
// @description Removes the attribute controls=false of the video tag in pathable.com for ISMRM's conference in 2021, permitting the user to do useful things, e.g. speed them up.
// @author [email protected]
// @include https://*.pathable.com/*
// @run-at document-idle
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
@NeutralKaon
NeutralKaon / CreateGhidraApp.sh
Last active September 2, 2021 23:49 — forked from saagarjha/CreateGhidraApp.sh
Creates a Ghidra.app bundle for macOS
#!/bin/sh
set -eu
create_iconset() {
mkdir -p Ghidra.iconset
cat << EOF > Ghidra.iconset/Contents.json
{
"images":
[