Skip to content

Instantly share code, notes, and snippets.

View cstrahan's full-sized avatar

Charles Strahan cstrahan

  • Fullstory
  • Dallas, TX
View GitHub Profile
@cstrahan
cstrahan / setupYubikey.sh
Created August 29, 2018 00:59 — forked from rpardini/setupYubikey.sh
Automated-ish setup of Yubikey for SSH logins (replace ssh-agent with gpg-agent from brew)
#! /bin/bash
set -e
GPGCONF_PATH=$(which gpgconf)
if [[ "$GPGCONF_PATH" != "/usr/local/bin/gpgconf" ]]; then
echo "You don't have gnupg installed from brew, lets install it."
brew install gnupg pinentry-mac ykpers
else
@cstrahan
cstrahan / config-ayufan
Created February 19, 2018 03:30
Kconfig differences between nix and ayufan (for Rock64 kernel)
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.4.103-rockchip-ayufan-1 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
CONFIG_ARCH_MMAP_RND_BITS_MAX=24
@cstrahan
cstrahan / install.sh
Last active December 13, 2017 07:05
Install NixOS on Hetzner(PX60-SSD)
set -x
wget http://archive.zfsonlinux.org/debian/pool/main/z/zfsonlinux/zfsonlinux_2%7Ewheezy_all.deb
dpkg -i zfsonlinux_2~wheezy_all.deb
apt-get update
apt-get install -y debian-zfs
DISK_SIZE=$(parted /dev/sda unit MB print | grep '^Disk' | sed -r 's/.* ([0-9]+)MB.*/\1/')
# Partitions
@cstrahan
cstrahan / README.md
Created November 28, 2012 17:02
Jad formula
brew install https://raw.github.com/gist/4162546/jad.rb
@cstrahan
cstrahan / SMBDIS.ASM
Created October 16, 2017 22:51 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@cstrahan
cstrahan / example.go
Created October 5, 2017 20:18 — forked from kavu/example.go
Minimal Golang + Cocoa application using CGO. Build with `CC=clang go build`
package main
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Cocoa
#import <Cocoa/Cocoa.h>
int
StartApp(void) {
[NSAutoreleasePool new];
@cstrahan
cstrahan / example.go
Created October 5, 2017 20:18 — forked from kavu/example.go
Minimal Golang + Cocoa application using CGO. Build with `CC=clang go build`
package main
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Cocoa
#import <Cocoa/Cocoa.h>
int
StartApp(void) {
[NSAutoreleasePool new];
@cstrahan
cstrahan / main.hs
Created October 2, 2017 07:31 — forked from cocreature/main.hs
{-# LANGUAGE MagicHash, UnboxedTuples #-}
module Main(main) where
import GHC.Exts ( addrToAny# )
import GHC.Ptr ( Ptr(..) )
import System.Info ( os, arch )
import Encoding
import ObjLink
main :: IO ()
@cstrahan
cstrahan / bridged.conf
Created August 3, 2017 02:47 — forked from gdamjan/bridged.conf
bridged openvpn with networkd
# /etc/openvpn/bridged.conf
comp-lzo
persist-key
persist-tun
dh /etc/openvpn/dh1024.pem
ca /etc/openvpn/ca.crt
cert /etc/openvpn/bridged.crt
key /etc/openvpn/bridged.key
@cstrahan
cstrahan / Deriv.idr
Created July 20, 2017 07:14 — forked from paf31/Deriv.idr
Calculus of types in idris
module Deriv
import Control.Isomorphism
--
-- A type constructor df is the derivative of the type constructor f if for all x and e there exists d such
-- such that
--
-- f (x + e) ~ f x + e * (df x) + e^2 * d
--