Skip to content

Instantly share code, notes, and snippets.

@jodoherty
jodoherty / qwerty.txt
Created November 6, 2022 17:44
Kinesis Advantage2 layout
[caps]>[escape]
[lalt]>[kpshft]
[rwin]>[kpshft]
[home]>[lwin]
[pup]>[rwin]
[intl-\]>[caps]
[end]>[lalt]
[pdown]>[ralt]
[kp-y]>[pause]
[kp-caps]>[escape]
@jodoherty
jodoherty / .gvimrc
Last active July 9, 2020 02:19
VIM settings
if has("win32")
set guifont=Consolas:h10
set guioptions=aegimrL
else
set guifont=Monospace\ 11
set guioptions=imrL
endif
set showtabline=2
set columns=85
@jodoherty
jodoherty / download.go
Created October 6, 2017 21:07
Recursive relative path downloader
package main
import (
"errors"
"fmt"
"golang.org/x/net/html"
"io"
"net/http"
"net/url"
"os"
@jodoherty
jodoherty / gvim
Created September 9, 2017 13:56
Run native Windows gvim from within msys or cygwin
#!/bin/bash
GVIM=/c/Windows/gvim.bat
args=()
TEMP="$(cygpath -w "$ORIGINAL_TEMP")"
for arg in "$@"; do
if [[ $arg == /* ]]; then
args+="$(cygpath -w "$arg")"
@jodoherty
jodoherty / A4Part1.py
Last active October 17, 2016 00:33
Example for easily creating and running test cases for sms-tools assignments
# ...
import numpy as np
def extractMainLobe(window, M):
# ...
return np.zeros(M)
if __name__ == '__main__':
# The check above ensures the following code only runs if we run this
@jodoherty
jodoherty / Dockerfile
Last active September 15, 2016 00:45
eclipse che web recipe
FROM ubuntu:16.04
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
bash sudo unzip curl build-essential git \
subversion openssh-server openjdk-8-jre \
man openssl postgresql-common postgresql-9.5 libpq-dev \
ruby ruby-dev \
libgdbm-dev libncurses5-dev automake libtool bison libffi-dev && \
sudo -u postgres createuser user -s && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 && \
@jodoherty
jodoherty / burnr
Last active December 18, 2015 17:59
burnr xorriso wrapper script
#!/bin/sh
#
# burnr 0.2.0
#
# Copyright (c) 2015 James O'Doherty <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
@jodoherty
jodoherty / burndvd
Created December 17, 2015 17:19
burndvd script
#!/bin/sh
#
# burndvd 0.1
#
# Copyright (c) 2015 James O'Doherty <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
@jodoherty
jodoherty / gvim
Last active January 12, 2016 11:02
gvim wrapper for Cygwin (makes it easy to use the Win32 gvim.exe from the Cygwin shell)
#!/bin/sh
#
# Windows gvim wrapper for Cygwin
#
# Copyright (c) 2016 James O'Doherty
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,