Skip to content

Instantly share code, notes, and snippets.

View russianryebread's full-sized avatar

Ryan Hoshor russianryebread

View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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
@russianryebread
russianryebread / conn_count.sql
Created December 24, 2018 21:27
Get connection counts by user in MySQL
SELECT USER, count(*) AS connection_count
FROM information_schema.processlist
GROUP BY USER
ORDER BY connection_count DESC;
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABgWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAAKJF1kc8rRFEUxz8zQ8RMiIWFxUtYDflRExtlJJSkMcpgM/PMDzVv5vXemyRbZTtFiY1fC/4CtspaKSIlCytrYoOe8zw1kjm3c8/nfu89p3vPBW80q2pmRTdoOcuIjIaV2dicUvWInwYq6SUQV019aGpqgrL2doPHiVedTq3y5/612sWkqYKnWnhQ1Q1LeEx4YtnSHd4UblIz8UXhY+GgIRcUvnb0hMtPDqdd/nDYiEaGwVsvrKR/ceIXqxlDE5aX06ZlC+rPfZyX+JO5mWmJreItmEQYJYzCOCMME6KHAZlDdEp/umRFmfzu7/xJ8pKryqyzgsESaTJYBEUtSPWkxJToSRlZVpz+/+2rmerrdav7w1D5YNsv7VC1AZ9F237ft+3PA/Ddw1mulJ/fg/5X0YslrW0X6tbg5LykJbbgdB2a7/S4Ef+WfOLeVAqejyAQg8ZLqJl3e/azz+EtRFflqy5gewc65HzdwhdEiWfWzqHdKwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAA3NJREFUWIW11m9MG2UcwPHvtde7Ky1MMuMLQtFXiwuMwVJRNzWD4Mb/UWKMiW81vvOFL4ElvhBQ3/lib0xm4htjohulGGPc4gZjpWywfyYmEg3/shfTOFeEPr1b2/NFr10LbVlp+yT36rnc5/t77ppUMk2TSi+nqjiBr4FW4B2hG0vpTdM0K3ppiqNKUxyXuryN5sjQG6amOB5qiuNYal+u8ORVwPTJ5kMd377bgmqTkG1S7WeB4GWnqnQK3bglVeoVpPC3Tx7uONd7BBkpvTcxu8Hn08F/gc6KBFj4D68fe759clhH2TxM/J/nsu75+MoaX/wY+sNWIXz6tdaG9slhnSqXjuPFEHLd3+l7wkaC+T8fANwr6wlk4B3+EYMql450IAqSCY8dGM

Keybase proof

I hereby claim:

  • I am russianryebread on github.
  • I am russianryebread (https://keybase.io/russianryebread) on keybase.
  • I have a public key ASC4FhSiTzX7QH7KPHz0N9L-qEBfxpQs0X10F4ItgI65MAo

To claim this, I am signing this object:

@russianryebread
russianryebread / phptags.php
Created July 14, 2017 23:17
PHP Whitespace Detector (phptags) [Requires PHP 5]
#!/usr/bin/php -qCdshort_open_tag=1
<?php
/**
* api: cli
* type: application
* title: PHP tag tidier
* description: Rewrites PHP scripts' short/long open tags, close tags, apply whitespace fixes
* version: 1.1
* license: Public Domain
* author: mario <mario#include-once:org>