Skip to content

Instantly share code, notes, and snippets.

Avatar

Jason Hutchinson zikes

View GitHub Profile
View kgog-tv.solution
GRAB 300
REPL AZIMUTH
SEEK 1
COPY F M
COPY M T
REPL ELEVATION
SEEK 1
COPY F M
@zikes
zikes / spherical_cap.scad
Created May 22, 2020
OpenSCAD Spherical Cap
View spherical_cap.scad
module spherical_cap(height,diameter) {
R=(pow(diameter/2,2)+pow(height,2))/(height*2);
translate([0,0,-R+height])difference() {
sphere(r=R,$fn=100);
translate([0,0,-height])cube(size=[R*2,R*2,R*2], center=true);
}
}
@zikes
zikes / index.html
Created May 4, 2020
Force-Directed Graph
View index.html
<!doctype html>
<html lang="en">
<head>
<title>Force-Directed Graph</title>
<script src="https://d3js.org/d3.v5.min.js"></script>
</head>
<body>
<script>
var height = 600;
var width = 600;
@zikes
zikes / generate.c
Created Mar 5, 2019 — forked from munificent/generate.c
A random dungeon generator that fits on a business card
View generate.c
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@zikes
zikes / .zshrc
Last active Mar 23, 2022
Using kube-ps1 with P9K
View .zshrc
# Enable the kube-ps1 oh-my-zsh plugin
plugins = (
git
kube-ps1
)
# The output of the kube_ps1 function is text, so it can be used
# directly as a custom p9k segment
POWERLEVEL9K_CUSTOM_KUBE_PS1='kube_ps1'
@zikes
zikes / .zshrc
Created Jul 6, 2018
Powerlevel9k + Google Play Music Desktop Player Custom Segment
View .zshrc
zsh_gpmdp_now_playing(){
local json_file="$HOME/.config/Google Play Music Desktop Player/json_store/playback.json"
local is_playing=$(cat "$json_file" | jq '.playing')
local artist=$(cat "$json_file" | jq -r '.song.artist')
local title=$(cat "$json_file" | jq -r '.song.title')
if [[ "$is_playing" == "true" ]]; then
echo -n "\ufc58 $artist - $title"
fi
}
View index.html
<!DOCTYPE html>
<html>
<head><title>Fizzlefade</title></head>
<body>
<canvas id="framebuffer" width="320" height="200"></canvas>
<script type="text/javascript">
/* Fizzlefade using a Feistel network.
View .vimrc
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

View git-make-remote.sh
#!/usr/bin/env bash
usage() {
cat <<HERE
usage: git make-remote <project-name>
or: git make-remote <path/to/project-name>
HERE
}
GIT_SERVER="git.zikes.me"