Skip to content

Instantly share code, notes, and snippets.

View maxrp's full-sized avatar

Max P maxrp

View GitHub Profile
@pr1ntf
pr1ntf / 9front-yabs.sh
Last active September 5, 2023 21:40
Get 9front (Plan9 fork) booted under FreeBSD bhyve
#!/bin/sh
# Yet Another bhyve Script v0.4
# Use this to try and boot 9front, the Plan9 fork.
# Virtio emulation works better (ported drivers)
# PS/2 Mouse emulation requires updated bhyve(8)
# If you don't have it, patch is uploaded with this Gist
# When partitioning, I have had more success with MBR
# GPT may work for some people
@tvlooy
tvlooy / vmm_howto.md
Last active February 28, 2024 15:14
OpenBSD VMM howto

OpenBSD VMM howto

Setup

/etc/rc.conf.local

apmd_flags="-A"
dhcpd_flags=vether0
vmd_flags=
ntpd_flags="-s"
@martijnvermaat
martijnvermaat / nixos.md
Last active May 9, 2024 01:11
Installation of NixOS with encrypted root
@a-dma
a-dma / yubitouch.sh
Last active March 10, 2022 14:43
Bash script for setting or clearing touch requirements for cryptographic operations in the OpenPGP application on a YubiKey 4.
#!/bin/bash
# Bash script for setting or clearing touch requirements for
# cryptographic operations the OpenPGP application on a YubiKey 4.
#
# Author: Alessio Di Mauro <alessio@yubico.com>
GCA=$(which gpg-connect-agent)
DO=0
UIF=0
@umbrellaprocess
umbrellaprocess / gist:7a4ffe994765fc195d95
Created August 16, 2014 04:38
Just intonation MIDI keyboard with SuperCollider
/**
* Just intonation MIDI keyboard with SuperCollider
*/
MIDIIn.connect;
s.boot;
(
SynthDef("umbSimpleFM",{
arg freq=440, gate=1, amp=1, pan=0;
@umbrellaprocess
umbrellaprocess / gist:973d2aa16e95bf329ee2
Last active December 16, 2021 08:53
A simple example of MIDI Keyboard for SuperCollider 3.6.x
/**
* A simple example of MIDI Keyboard for SuperCollider 3.6.x
*/
MIDIIn.connect;
s.boot;
(
SynthDef("umbSinewave",{
arg freq=440, gate=1, amp=1, pan=0;
#!/bin/sed -rf
# How to run:
# echo 'A A<1+B1-C>B<1-A1+B>D<1-B1qC> 0<0>0'
# Note: Your local sed may use a different flag for "extended" regexes; this is written for GNU sed.
#
# tape: [active-state] " " (state-name "<" (write move next-state)_0 (write move next-state)_1 ">")* " " tape... "<" curpos ">" tape...
# State names can be any character not in " <>".
# The tape consists of 0's and 1's.
# The "move" field can be "-" to move left, "+" to move right, or "q" to halt.

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
@jedisct1
jedisct1 / tweetnacl-indented.c
Last active November 12, 2022 18:02
Indented version of @TweetNacl
#include "tweetnacl.h"
#define FOR(i,n) for (i = 0;i < n;++i)
#define sv static void
typedef unsigned char u8;
typedef unsigned int u32;
typedef unsigned long long u64;
typedef long long i64;
typedef i64 gf[16];
@musiKk
musiKk / fileviewer.py
Created April 15, 2012 12:40
Tiny file browser in GTK3
#!/usr/bin/env python2
from gi.repository import Gtk, GObject, GLib
import os
import os.path
class File(object):
def __init__(self, file_name, place_holder=False, directory=True, root=False, empty=False):
self.file_name = file_name