Skip to content

Instantly share code, notes, and snippets.

@jbulow
jbulow / qemu_osx_rpi_raspbian_jessie.sh
Created January 25, 2018 05:55 — forked from hfreire/qemu_osx_rpi_raspbian_jessie.sh
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@jbulow
jbulow / unify.ml
Created October 15, 2018 18:42 — forked from hackwaly/unify.ml
Unify algorithm implemented in ocaml according to Alin Suciu's "Yet Another Efficient Unification Algorithm"
module type TERM = sig
type t
type tvar
val var_opt : t -> tvar option
val compare_var : tvar -> tvar -> int
val same_functor : t -> t -> bool
val args : t -> t list
end
module Make (Term : TERM) = struct
@jbulow
jbulow / install-cuda-10-bionic.sh
Created August 20, 2019 07:02 — forked from bogdan-kulynych/install-cuda-10-bionic.sh
Install CUDA 10 on Ubuntu 18.04
#!/bin/bash
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo apt update
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
@jbulow
jbulow / ast_visitor_template.py
Created June 17, 2021 08:02 — forked from jtpio/ast_visitor_template.py
Template for visiting all Python AST nodes
"""
All the methods were generated based on the list of nodes from the
"Green Tree Snakes" guide:
https://greentreesnakes.readthedocs.io/en/latest/index.html
"""
import ast
class Visitor(ast.NodeVisitor):
@jbulow
jbulow / autobuild-openconnect-8-ubuntu.sh
Created May 24, 2022 14:31 — forked from darrenpmeyer/autobuild-openconnect-8-ubuntu.sh
Autobuild script for OpenConnect 8 (Ubuntu 18/19 bionic/eoan)
#!/usr/bin/env bash
oc_ver="8.10"
echo "Autobuild OpenConnect $oc_ver"
echo " "
echo "This script uses apt-get and make install via sudo rights"
echo "To simplify this, we're going to use sudo -v to pre-authenticate you"
sudo -k
sudo -v
@jbulow
jbulow / build.org
Created November 6, 2024 11:28 — forked from LdBeth/build.org
Build Emacs 31 for Windows

Build Emacs with MSYS2

This document is an up-to-date guide on compile Emacs 31 on windows with MSYS2, and make a installation with native compile that can work without MSYS2.

The idea is after get a working Emacs, you may delete MSYS2 environment to free some disk space, and forget about rebuilding Emacs