Skip to content

Instantly share code, notes, and snippets.

View russianryebread's full-sized avatar

Ryan Hoshor russianryebread

View GitHub Profile
@russianryebread
russianryebread / FSScrollController.cs
Last active June 25, 2023 04:27
Inertial Scrolling for Unity 3D
using UnityEngine;
using System.Collections;
using Holoville.HOTween;
namespace FS.Handlers
{
public class FSScrollController : MonoBehaviour {
public float contentOverflowY = 0f;
public float contentHeight = 0f;
@russianryebread
russianryebread / README.md
Created February 22, 2023 20:23
Export Simple Git History as CSV / Excel

Export

git log --pretty='format:"%h","%aI","%an <%ae>","%s"' > ./gitlog.csv

Produces:

"20ca61c","2023-02-22T09:33:46-05:00","John Smith <john@smith.com>","Updated Marketing Website...again"
"b3235a5","2023-02-22T09:31:21-05:00","John Smith ","Updated Marketing Website"
@russianryebread
russianryebread / docker_1.13.0.md
Last active December 7, 2022 10:09
Docker Disk Management

See Used Space

docker system df         # Show docker disk usage, including space reclaimable by pruning

Reclaim Disk Space

docker container prune   # Remove all stopped containers
docker volume prune      # Remove all unused volumes

docker image prune # Remove unused images

@russianryebread
russianryebread / bible_books.json
Created November 4, 2015 15:28
Books of the Bible with the number of chapters in them
{
"OT": {
"Genesis" : 50,
"Exodus" : 40,
"Leviticus" : 27,
"Numbers" : 36,
"Deuteronomy" : 34,
"Joshua" : 24,
"Judges" : 21,
"Ruth" : 4,
@russianryebread
russianryebread / index.html
Last active July 15, 2020 18:34
Random string generator written in Vue.js https://hoshor.me/rand/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Random String Generator</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/dark.min.css">
<style type="text/css">
.randomString {
@russianryebread
russianryebread / exec.sh
Created April 18, 2020 17:13
Quick way to exec into a pod in K8s
#!/bin/bash
# Usage:
# ./exec.sh api
NAMESPACE="qa"
CONTAINER_NAME=$(kubectl get pods -n $NAMESPACE | awk -v pattern="$1" '$0 ~ pattern { print $1 }')
kubectl -n $NAMESPACE exec -it $CONTAINER_NAME /bin/bash
@russianryebread
russianryebread / ask_the_duck.md
Created February 7, 2019 22:50
Ask the Duck

Ask the Duck

January 6th, 2012
https://hwrnmnbsol.livejournal.com/148664.html

When I was a younger person, my first full-time adult-type job was designing automatic fire sprinkler systems. It was an eye-opening and educational experience, and even though the job basically sucked, I learned all kinds of crazy stuff in that job that I use daily in my present-day non-sucky job, so I can't complain.

One interesting lesson was learned at the hand of the Chief Superintendant, Bob. Bob was in charge of installing the systems that me and my group designed. People who put things in, I quickly learned, have a wealth of knowledge and experience about things that people who only design never gain. As a result, when I first started in that job, I wound up going and bugging Bob for answers on a regular basis.

This annoyed Bob. Bob liked to sit in his office and shoot the shit with his buddies on the topics of fishing or hunting. He did not like fielding questions from young designers. This was especially true becaus

@russianryebread
russianryebread / index.html
Last active May 13, 2019 22:01
Bare-Bones HTML 5 Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<!-- page content -->
</body>
</html>
@russianryebread
russianryebread / 500.html
Last active April 17, 2019 17:43
Clean Error Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Internal Server Error</title>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
@russianryebread
russianryebread / easing.js
Created January 24, 2019 08:40 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity