Skip to content

Instantly share code, notes, and snippets.

View iaalm's full-sized avatar
🐒
Learning

Kaisheng Xu iaalm

🐒
Learning
View GitHub Profile
@iaalm
iaalm / genCert.sh
Last active September 26, 2023 09:09
Generate self-signed certificate for localhost
openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 3650 -keyout output/localhost.pem -out output/localhost.cer -subj "/CN=localhost" -addext "subjectAltName = DNS:localhost"
@iaalm
iaalm / convert-mat.py
Created October 18, 2018 06:50
Convert between .mat and .h5
#!/usr/bin/python3
import h5py
import numpy
import scipy.io
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("file", help="h5 file or mat file")
args = parser.parse_args()
@iaalm
iaalm / SimonBibtex.bib
Last active November 10, 2017 08:11
SimonBibtex
@article{kadir2001saliency,
title={Saliency, scale and image description},
author={Kadir, Timor and Brady, Michael},
journal={International Journal of Computer Vision},
volume={45},
number={2},
pages={83--105},
year={2001},
publisher={Springer}
}
@iaalm
iaalm / patch-edid.rb
Created June 1, 2016 08:36
MAC HDMI patch
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten