Skip to content

Instantly share code, notes, and snippets.

View tachoknight's full-sized avatar
🎯
Focusing

Ron Olson tachoknight

🎯
Focusing
View GitHub Profile
@tachoknight
tachoknight / exa-wrapper.sh
Last active April 10, 2021 01:48 — forked from eggbean/eza-wrapper.sh
Wrapper script for exa to give it nearly identical switches and appearance to ls. Also automatically adds --git switch when in a git repository.
#!/bin/bash
help() {
cat << EOF
Options:
-1 one file per line
-k bytes
-F classify
-R recurse
-r reverse
@tachoknight
tachoknight / 13card.lua
Created December 3, 2020 14:26
Lua function for TableTop Simulator to figure out which player gets an extra card
--[[
This lua script is for a TableTop Simulator game I'm working on called
"May I" that is similar to Rummy. In the game 12 cards are dealt to
all the players, with the player to the left of the dealer getting an
extra card. This is my solution at getting it working, and also as
a way to learn more Lua.
--]]
-- Fixed color array
colors = {}
@tachoknight
tachoknight / getf2bcountries.sh
Last active November 2, 2020 16:50
This is a small script that finds unique countries in fail2ban logs. I was curious where the attacks on my servers were originating from, so I wrote this script to show me all the interesting countries that presumably have bots running 😂
#!/bin/bash
# This script assumes you are running fail2ban (https://www.fail2ban.org)
# and have also installed the "geoiplookup" command
# Note that this script uses sudo because the fail2ban logs are typically
# root-owned
# This is an empty array that will be populated with the names
# of the countries we get from geoiplookup
COUNTRIES=()
@tachoknight
tachoknight / gettin-called.swift
Created April 8, 2020 18:26
Why is callFruit() being called on instantiation?
struct ContentView: View {
static let fruits = ["apple", "pear", "banana"]
func callFruit() -> some View {
print("Getting called!")
return SomeOtherView(fruit: "apple")
}
var body: some View {
NavigationView {

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@tachoknight
tachoknight / build-swift-from-master.sh
Created June 12, 2018 19:40
Bash script to build Apple's Swift Programming Language on Linux
#!/bin/bash
BASE_DIR=/home/tachoknight/apple-swift
BUILDS_DIR=$BASE_DIR/builds
rm -rf $BASE_DIR
mkdir -p $BUILDS_DIR
cd $BASE_DIR
git clone https://github.com/apple/swift.git swift
./swift/utils/update-checkout --clone --scheme master
@tachoknight
tachoknight / rfidtest.go
Last active March 7, 2018 16:59
RFID Tag converter
package main
import (
"fmt"
"strconv"
)
func main() {
var err error
@tachoknight
tachoknight / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console