Skip to content

Instantly share code, notes, and snippets.

Zack Zatkin-Gold zg

Block or report user

Report or block zg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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:

@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 5, 2020
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");
View gist:9776652
37107287533902102798797998220837590246510135740250
46376937677490009712648124896970078050417018260538
74324986199524741059474233309513058123726617309629
91942213363574161572522430563301811072406154908250
23067588207539346171171980310421047513778063246676
89261670696623633820136378418383684178734361726757
28112879812849979408065481931592621691275889832738
44274228917432520321923589422876796487670272189318
47451445736001306439091167216856844588711603153276
70386486105843025439939619828917593665686757934951
You can’t perform that action at this time.