Skip to content

Instantly share code, notes, and snippets.

Typing a status

pfg pfgithub

Typing a status
View GitHub Profile

(written on zig version 0.7.1+d96f5b38a)


zig build <step> runs a specified step from the build.zig file. build.zig is a file written in zig that describes all the available things that can be built

An empty build file:

const std = @import("std");
pfgithub /
Last active Sep 30, 2020
download the latest zig (fish script oops) (requires: `fish`, `jq`, `curl`, `tar`)
#!/usr/bin/env fish
function start_of_line
echo -ne "\r"(tput el)
function fail_error
echo (set_color red)$argv
View discord-font-switcher.js
window.buttonarea && window.buttonarea.remove();
const buttonarea = document.createElement("div");
window.buttonarea = buttonarea;
const ttl = document.querySelector("#app-mount > > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > div.scroller-2TZvBN.none-2Eo-qx.scrollerBase-289Jih > div:nth-child(2)");
if(!ttl) alert("Uh oh! discord class hashes or app layout changed!");
const mkbtn = (txt, ffmly, onev) => {
const btn = document.createElement("button");
btn.textContent = txt;
pfgithub /
Created Aug 10, 2020
check if a password has been pwned on haveibeenpwned
#!/usr/bin/env fish
set password (read -s)
set sha1hash (echo -n $password | sha1sum)
set firstfiv (string sub -s 1 -l 5 $sha1hash)
set lastpart (string sub -s 6 -l 35 $sha1hash)
curl -s$firstfiv | grep -i "^"$lastpart":"
View yy.js
function makeBoard(fill) {
// it would be useful if board could center at 0,0 and expand infinitely
let board = [];
let limits;
let reso = {
clear: () => {
board = [];
pfgithub / zig
Last active Apr 1, 2020
zig suggestions for the first day of the month
View zig

zig suggestions for the first day of the month

only one number type

zig is very confusing because it has so many number types. u16, i64, f32? what does all this mean‽ zig should follow the path of similar languages and simplify this down to one number type. I propose u0 because it can fill in for any other number type with a minimal loss of precision and takes less memory to store.


instead of the confusing explicit error returns, zig should have untyped exceptions. that way, you have to be on edge every time you call a function and you have to worry if it might decide to error. it's especially nice because the errors shouldn't be mentioned in the docs. this makes programming more fun and exciting whenever you encounter a new error that you didn't know about.

View video time.js
let video = document.querySelector("video");
let frameTime = 0.01;
let timeElem = document.createElement("div");
let q = document.createTextNode("---"); = "fixed"; = "0"; = "0"; = "10px"; = "24pt"; = "#fff";
pfgithub / iroAceToMonarch.js
Last active May 16, 2019
Convert an ace syntax highlighter generated with iro to a monarch one
View iroAceToMonarch.js
let ace = {/*your syntax highlighter here*/}
let tokens = {/*your syntax highlighter tokens and values*/}
console.log(JSON.stringify((() => {
let monarchTokenizer = {}
Object.keys(acerules).forEach(key => {
let value = acerules[key];
monarchTokenizer[key] = [];
pfgithub / plistthing.js
Created Oct 16, 2018
simple plist thing
View plistthing.js
var bplistCreator, bplistParser, plist;
bplistParser = require('bplist-parser');
bplistCreator = require('bplist-creator');
plist = require('plist');
// reveal the underlying modules
exports.plist = plist;
View pfgs goi

pfgs mods

You Are The Hammer:

PlayerControl Start() Bottom:

base.GetComponent<PolygonCollider2D>().isTrigger = true;
base.transform.Find("PotCollider").GetComponent<PolygonCollider2D>().isTrigger = true;