Skip to content

Instantly share code, notes, and snippets.

Zack Zatkin-Gold zg

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am zg on github.
  • I am zg (https://keybase.io/zg) on keybase.
  • I have a public key whose fingerprint is 4BEB 7AD4 AEAA FFAF 2E6C BE9A F886 05CB ACE8 3706

To claim this, I am signing this object:

View spam.mail
Return-Path: <info@piecepod.jp>
X-Original-To: zg@zk.gd
Delivered-To: zg@zk.gd
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Description: Mail message body
Subject: INVESTMENT
To: Recipients <info@piecepod.jp>
From: "Mr. Arkamani" <info@piecepod.jp>
Date: Sun, 21 Aug 2016 09:31:16 +0000
@zg
zg / debian-xhyve.sh
Created May 13, 2016 — forked from lloeki/debian-xhyve.sh
Running debian 8.1 in xhyve
View debian-xhyve.sh
#!/bin/bash
# unfortunately debian currently panics in xhyve
tmp=$(mktemp -d)
pushd "$tmp"
iso="$HOME"/Downloads/debian-8.1.0-amd64-netinst.iso
#iso="$HOME"/Downloads/debian-8.1.0-i386-netinst.iso
echo "fixing disk"
dd if=/dev/zero bs=2k count=1 of=tmp.iso
@zg
zg / arch-xhyve.sh
Created May 13, 2016 — forked from lloeki/arch-xhyve.sh
Run Arch Linux in xhyve
View arch-xhyve.sh
#!/bin/bash
tmp=$(mktemp -d)
pushd "$tmp"
iso=/Users/lloeki/Downloads/archlinux-2015.08.01-dual.iso
echo "fixing disk"
dd if=/dev/zero bs=2k count=1 of=tmp.iso
dd if=$iso bs=2k skip=1 >> tmp.iso
echo "mounting disk"
@zg
zg / freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Last active Feb 7, 2019
Create FreeBSD virtual machine using qemu. Run the VM using xhyve.
View freebsd-qemu-xhyve-mac-os-x-virtual-machine.md

TL;DR

  • Create 10GB FreeBSD image using QEMU.
  • Run the VM using xhyve.
  • Mount host directory.
  • Resize the image.

Requisites

@zg
zg / TagCloud.java
Created Nov 9, 2015
Used for Lobsters tag cloud generated at tagcrowd.com
View TagCloud.java
import java.util.HashMap;
import java.util.Map;
public class TagCloud {
private HashMap<String, Integer> tags;
public static void main(String[] args) {
TagCloud tagcloud = new TagCloud();
}
public TagCloud(){
View font_check.c
// The four boxing wizards jump
#include <stdio.h> // <= quickly.
int main(int argc, char **argv) {
long il1[]={1-2/3.4,5+6==7/8};
int OxFaced=0xBAD||"[{(CQUINE";
unsigned O0,l1,Z2,S5,G6,B8__XY;
printf("@$Hamburgefo%c`",'\n');
return ~7&8^9?0:l1|!"j->k+=*w";
}
View gist:34658b9a34aa7a21710a
Verifying I am +zg on my passcard. https://onename.com/zg
View gist:06bbe6ed855aead73761
48 87 15 43 25
65 91 19 19 76
21 46 72 29 8
22 55 7 95 55
11 36 11 33 3
39 9 49 66 52
95 97 44 96 82
53 44 1 86 11
48 45 26 3 9
54 98 83 86 20
View endian.c
#include <stdio.h>
int main(){
unsigned int i = 1;
char *p = (char *)&i;
if(*p == 0)
printf("big endianness");
else
printf("little endianness");
You can’t perform that action at this time.