Skip to content

Instantly share code, notes, and snippets.

View nitz's full-sized avatar
less bitter more glitter

Chris Dailey nitz

less bitter more glitter
View GitHub Profile
@nitz
nitz / keybase_proof.md
Created July 2, 2015 18:32
Keybase Proof

Keybase proof

I hereby claim:

  • I am nitz on github.
  • I am cmd (https://keybase.io/cmd) on keybase.
  • I have a public key whose fingerprint is 0219 59C4 ED7E AF7A DEA1 16FB DAB2 C9E0 E926 E40D

To claim this, I am signing this object:

@nitz
nitz / gist:dd5189a6032cce17516268388f732b1d
Created September 13, 2016 18:08 — forked from AnnaCrumina/gist:71c837eab6e30538dd19
Smooth scroll for anchor links
<script>
jQuery('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') || location.hostname == this.hostname) {
var target = jQuery(this.hash);
target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
if (target.length) {
var top_offset = '100';
jQuery('html,body').animate({
scrollTop: target.offset().top - top_offset
@nitz
nitz / JS-LINQ.js
Last active January 22, 2020 12:50 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
{ name: "Judy", age: 42 },
{ name: "Tim", age: 8 }
@nitz
nitz / Easing.cs
Last active November 2, 2020 02:20 — forked from xanathar/Easing.cs
Robert Penner's easing equations for Unity
/**
* Easing
* Animates the value of a float property between two target values using
* Robert Penner's easing equations for interpolation over a specified Duration.
*
* Original Author: Darren David darren-code@lookorfeel.com
*
* Ported to be easily used in Unity by Marco Mastropaolo
*
* Credit/Thanks:
@nitz
nitz / tmate-daemon.sh
Created November 4, 2020 20:34 — forked from 89luca89/tmate-daemon.sh
Simple daemon to use tmate to control a remote machine behind NAT. Uses tmate to generate sessions and save them in a cloud-sync provider folder (ex Dropbox or GDrive)
#!/bin/bash
IP=$(ip a s wlp3s0 | grep inet | awk '{print $2}' | head -n 1)
while true; do
ping -q -w 1 -c 1 `ip r | grep default | awk '{print $3}'` > /dev/null
# No internet connection
if (( $? != 0 )); then
sleep 20s
ping -q -w 1 -c 1 `ip r | grep default | awk '{print $3}'` > /dev/null
if (( $? != 0 )); then
#!/bin/sh
sleep .1; printf "⣽⣩⣺⣻⣾⣺⣻⣿⣿⡿⠟⠙⠀⢀⣀⡀⠀⢀⣠⣨⣨⣨⣼⣿⣿⣿⣿⣿⣿⣿⣿⣸⠀⠀
⣿⣿⣿⣿⣿⣿⣿[4
@nitz
nitz / EntitlementsPostprocessStep.cs
Created September 20, 2021 14:33
Unity iOS com.apple.developer.networking.multicast entitlement plist generation.
// SPDX-FileCopyrightText: © 2021 Chris Marc Dailey (nitz)
// SPDX-License-Identifier: MIT
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using UnityEngine;
public class EntitlementsPostprocessStep : MonoBehaviour
@nitz
nitz / victor-mono.css
Created November 3, 2021 20:56 — forked from pyrho/victor-mono.css
A font file for Blink Shell with the Victor Mono font
@font-face {
font-family: "VictorMono Nerd Font";
font-style: normal;
font-weight: 200;
src: url(https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/VictorMono/Light/complete/Victor%20Mono%20Light%20Nerd%20Font%20Complete%20Mono.ttf?raw=true);
}
@font-face {
font-family: "VictorMono Nerd Font";
font-style: normal;
font-weight: 400;
@nitz
nitz / whh.Xresources
Last active November 4, 2021 14:51
witch-hazel-hypercolor
! special
*.foreground: #e5e5c8
*.background: #433f55
*.cursorColor: #e5e5c8
! black
*.color0: #282634
*.color8: #716898
! red
@nitz
nitz / fsm.c
Created March 24, 2022 17:26 — forked from ankurs/fsm.c
FSM in C
/**
* @file fsm.c
* @brief an implementation for a FSM in C, this file contains
* implementation of definations.
* License GPLv3+
* @author Ankur Shrivastava
*/
#include "fsm.h"
#include<stdlib.h>