Skip to content

Instantly share code, notes, and snippets.

View pr1ntf's full-sized avatar

Trent pr1ntf

View GitHub Profile
@pr1ntf
pr1ntf / food.txt
Created December 29, 2018 23:16
Gobble twitter data from a list of users in food.txt
myusername
yourusername
thatdogsusername
yurausername
@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
@pr1ntf
pr1ntf / droid-yabs.sh
Last active January 29, 2019 20:55
Booting Android-x86 under FreeBSD bhyve (Work in progress)
#!/bin/sh
# Yet Another bhyve Script v0.3
# Use this example to boot Android-x86
# Have not tested e1000 network emulation yet
# It will install to hd, but will get stuck in boot loop
# This should get you through the setup in live mode
# Be sure to kldload vmm
name=droid86
@pr1ntf
pr1ntf / mac-yabs.sh
Last active July 20, 2023 20:02
mac-yabs.sh
#!/bin/sh
# Yet Another bhyve Script v0.1.5
# This was once used to test booting MacOS
# Don't expect it to work
name=clover
ram=8192M
cpu=4
disk=clover-capitan.img
@pr1ntf
pr1ntf / leibniz.cc
Created April 30, 2016 08:12
Small C++ program to approximate pi using the Leibniz series.
#include <stdio.h>
// iterations of work unit
// iterprint for output at end of run
long double i = 1000000000;
long long int iterprint = i;
// variables for work unit
// pi starts at 0
// pi1-3 are used by workunit
@pr1ntf
pr1ntf / grub.cfg
Last active August 4, 2018 14:30
Minix3 and bhyve Hints.
set root=(cd0,msdos2)
multiboot /boot/minix_latest/kernel rootdevname=c0d0p0s0 cttyline=0 cttybaud=9600
module /boot/minix_latest/mod01_ds.gz
module /boot/minix_latest/mod02_rs.gz
module /boot/minix_latest/mod03_pm.gz
module /boot/minix_latest/mod04_sched.gz
module /boot/minix_latest/mod05_vfs.gz
module /boot/minix_latest/mod06_memory.gz
module /boot/minix_latest/mod07_tty.gz
module /boot/minix_latest/mod08_mfs.gz
@pr1ntf
pr1ntf / vnet-vimage-iohyve.txt
Created December 10, 2015 22:58
Old iohyve + vimage docs.
### Welcome! ###
# iohyve is an all in one quick start for utilizing built-in FreeBSD and ZFS
# tools for managing bhyve guests. iohyve acts much like @pannon's iocage and it's
# inspiration is drawn from it's ideas. iohyve's aim is to get a solid basis of how bhyve
# will interact with iocage's ideas. This includes resource limiting/management, store data in
# zfs proprieties, vnet, and UUID's in addition to creation, starting, stopping, and destroying
# live guests. Snapshoting and other features might be better saved for iocage integration.
# Big thanks to @pannon and @skarekrow for all their help, their code, and patience. :)
@pr1ntf
pr1ntf / subtilevictories.txt
Last active November 15, 2015 00:56
subtilevictories.txt
Back in July, I posted a series of tweets to our main twitter account - @cryptostorm_is - of a fairly unusual nature. I include a link to the first (https://twitter.com/cryptostorm_is/status/624070397219180544) in the series, because they are public and piddling about by not doing so strikes me as disingenuous and, well... twee. Anything but twee, please. To say that tweet received a bit of notice would be an understatement: in addition to the eighty (80) retweets, it generated scores of DMs, emails, bitmessages, smoke signals... you get the point. Since then, I've been promising a follow-up blog post explaining wtf.
Nearly six months later, this is that post.
~ ~ ~
@pr1ntf
pr1ntf / iohyve8create.txt
Created October 27, 2015 21:54
Build iohyve man page
cat iohyve.8.txt | txt2man -t iohyve -s 8 -v "FreeBSD System Manager's Manual" > iohyve.8
@size = (1920,1080);
@center = (-.743653135,.131826563);
$zoom = .000014628;
$max_it = 700;
open U, "|convert -size $size[0]x$size[1] -depth 8 gray:- mandel.png";
for $py (0..$size[1]-1) {
$y0 = $center[1] + ($py/($size[0]-1) - .5) * $zoom;
for $px (0..$size[0]-1) {
$x0 = $center[0] + ($px/($size[0]-1) - .5) * $zoom;