Skip to content

Instantly share code, notes, and snippets.

View cgm616's full-sized avatar

Cole Graber-Mitchell cgm616

View GitHub Profile
@cgm616
cgm616 / sketch.js
Created January 9, 2022 05:01
Statistically self-similar fractal
// needs p5.js to run
const DIM = 400;
const LOWER = 0.8;
let iter = 1;
let tree;
function setup() {
createCanvas(DIM, DIM);
tree = { x: 0, y: 0, scale: 1 };
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
export PROVIDER=${PROVIDER:-"dnsimple"}
export LEXICON_DNSIMPLE_USERNAME="[USERNAME]"
export LEXICON_DNSIMPLE_TOKEN="[TOKEN}"
UIStatusBar *statusBar = MSHookIvar<UIStatusBar *>([UIApplication sharedApplication], "_statusBar");
if(statusBar) {
UIStatusBarForegroundView *view = MSHookIvar<UIStatusBarForegroundView *>(statusBar, "_foregroundView");
if(view) {
view.hidden = NO;
}
}
@cgm616
cgm616 / MPVolumeSlider.h
Created August 31, 2016 04:13
Header files for use with VolumeBar9, $THEOS/include/MediaPlayer/
@interface MPVolumeSlider : UISlider
-(NSString *)volumeAudioCategory;
-(void)setVolumeAudioCategory:(NSString *)arg1;
@end

Keybase proof

I hereby claim:

  • I am cgm616 on github.
  • I am cgm616 (https://keybase.io/cgm616) on keybase.
  • I have a public key whose fingerprint is EFB6 3C79 9C68 8130 A12A D820 D688 4CD4 F09C FE94

To claim this, I am signing this object:

@cgm616
cgm616 / file-replicator.py
Created February 4, 2016 23:29
Simple python script that will replicate itself
import os
import binascii
def replicate(path):
#
# Replicate a file given the path of the current file. Opens current file
# and new file and reads all lines into new file.
#
with open(get_new_filename(path), "w") as newfile, open(path) as program:
for line in program: