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 / gilding.linq
Created July 5, 2023 16:14
Pet Simulator X Gild / Rainbow Sim Tests v0
<Query Kind="Program">
<NuGetReference>RandN</NuGetReference>
<Namespace>ChartSeries = System.Windows.Forms.DataVisualization.Charting.Series</Namespace>
<Namespace>CountType = System.Int64</Namespace>
<Namespace>CurrencyType = System.Int64</Namespace>
<Namespace>OddsType = System.Double</Namespace>
<Namespace>RandN</Namespace>
<Namespace>RandN.Distributions</Namespace>
<Namespace>RandN.Distributions.UnitInterval</Namespace>
<Namespace>RandN.Extensions</Namespace>
@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>
@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 / 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
#!/bin/sh
sleep .1; printf "⣽⣩⣺⣻⣾⣺⣻⣿⣿⡿⠟⠙⠀⢀⣀⡀⠀⢀⣠⣨⣨⣨⣼⣿⣿⣿⣿⣿⣿⣿⣿⣸⠀⠀
⣿⣿⣿⣿⣿⣿⣿[4
@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 / tmate_for_ssh.md
Created November 4, 2020 20:34 — forked from iskolbin/tmate_for_ssh.md
Ubuntu(systemd) tmate service for ssh

The motivation is: ssh to remote computer without port forwading, dynamic DNS and so on, the only thing needed is that the remote is connected to the Internet.

  1. On remote get tmate, put it in /usr/local/bin (apt version as of 18.04LTS is too old):
curl -L https://github.com/tmate-io/tmate/releases/download/2.4.0/tmate-2.4.0-static-linux-amd64.tar.xz|tar xJv
sudo mv tmate-2.4.0-static-linux-amd/tmate /usr/local/bin
  1. Put public keys in ~/.ssh/authorized_keys
@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
@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: