Skip to content

Instantly share code, notes, and snippets.

View zacbrown's full-sized avatar
💭
💩

Zac Brown zacbrown

💭
💩
View GitHub Profile
@zacbrown
zacbrown / proof.md
Last active March 2, 2024 23:18
keyoxide proof

$argon2id$v=19$m=512,t=256,p=1$yJMsx6LhvfJiSGY+MOui+g$aUFE4ucbD5FG5ZhXJpTqCBYALiDkP6l/YtPBA+njEck

@zacbrown
zacbrown / transformers.rs
Created December 2, 2020 20:24 — forked from snoyberg/transformers.rs
Transformers: Rust in disguise
#![feature(generic_associated_types)]
trait Functor {
type Unwrapped;
type Wrapped<A>: Functor;
fn map<F, B>(self, f: F) -> Self::Wrapped<B>
where
F: FnOnce(Self::Unwrapped) -> B;
}
@zacbrown
zacbrown / block_google_update.sh
Created October 9, 2019 15:40
Google Updater blocker (macOS)
#!/bin/bash
# create folders if they don't already exist
sudo mkdir -p /Library/Google ~/Library/Google
# if they do exist delete everything inside of them
sudo rm -rf /Library/Google/* ~/Library/Google/*
# prevent Google from writing to these folders
sudo chown -R root:wheel /Library/Google ~/Library/Google
sudo chmod -R go-rwx /Library/Google ~/Library/Google

Keybase proof

I hereby claim:

  • I am zacbrown on github.
  • I am zacbrown (https://keybase.io/zacbrown) on keybase.
  • I have a public key ASCLP4E4iJ7XBewCoudgvByNRoulYRZ4o0zq3WC5C4i_jAo

To claim this, I am signing this object:

@zacbrown
zacbrown / 01-mac-profiling.md
Created July 18, 2018 19:57 — forked from loderunner/01-mac-profiling.md
Profiling an application in Mac OS X

Profiling an application in Mac OS X

Finding which process to profile

If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.

The CPU pane shows how processes are affecting CPU (processor) activity:

@zacbrown
zacbrown / synthetic_events.go
Last active December 21, 2017 05:25
golang synthetic event pumping
/*
Compilation & execution instructions:
go get "github.com/satori/go.uuid"
go build
.\<binary name> -cpuprofile cpu.prof -memprofile mem.prof -resultcount 1000000
The -resultcount flag indicates how many elements to hold before
clearing the collection. This is mainly useful in observing the overhead
of a collection of objects.
Verifying I am +zacbrown on my passcard. https://onename.com/zacbrown
#include <stdio.h>
#include <string.h>
struct test {
int a;
int b;
int* c;
};
void main()
10:09:03 zbrown@riemann: ~/Code/reia.git > git fetch && git rebase origin
Current branch master is up to date.
10:09:10 zbrown@riemann: ~/Code/reia.git > rake clean
(in /Users/zbrown/Code/reia.git)
rm -f artifacts/erl/reia_scan.erl
rm -f artifacts/beam/Constant.beam
rm -f artifacts/beam/eval_shim.beam
rm -f artifacts/beam/Exception.beam
rm -f artifacts/beam/fun_shim.beam
rm -f artifacts/beam/ire.beam