Skip to content

Instantly share code, notes, and snippets.

View LastContinue's full-sized avatar

LastContinue

  • USA
View GitHub Profile
@LastContinue
LastContinue / QuickNDirtyHackinginFirefish.md
Last active September 9, 2023 20:46
Quick N Dirty Hacking in Firefish

Quick N Dirty Hacking in Firefish

Quick disclaimer - Don't count on any Types to save you here. Sure the files are called .ts but :oof: It's a mess. You'll see lots of stuff that ctrl/cmd + click'ing on will just lead to nowhere, and yet it still works somehow.

If there's a URL for the page you're on...

This will show up in packages/client/src/router.ts

This will show you the route and then the appropriate packages/client/src/pages/x.vue that the code lives in.

How Pages Are Setup

@LastContinue
LastContinue / illumicon-docker-compose.yaml
Created July 28, 2022 14:53
Docker-compose file to run Illumicon stack
#This assumes that "bidoof" and "illumicon" are both in the same dir as
#composer file
version: "3.8"
services:
bidoof:
image: bidoof
build: bidoof/
container_name: bidoof
depends_on:
- rabbitmq
@LastContinue
LastContinue / ransomNote.py
Created October 13, 2021 17:32
Ransom Note from Magazine exercise
#Apologies if Github eats the formatting here.
#I just wanted something quick and easy.
from collections import Counter
#needs docblock-ing
def canConstructRansomNote(note, magazine):
#this creates a dict of letter frequencies such that
#"hello world" would be become {'l': 3, 'o': 2, 'h': 1, 'e': 1, ' ': 1, 'w': 1, 'r': 1, 'd': 1}
letterFrequency = Counter(magazine.lower())
@LastContinue
LastContinue / cockatoo.fish
Last active October 20, 2020 16:53
Fish Lighting Talk Demo
#!/bin/env fish
function cockatoo_speaks
set cockatoo " &*(@#)!@"
echo "cockatoo says '$cockatoo'"
end
cockatoo_speaks
echo "what did that bird just say? "
echo "cockatoo: $cockatoo"
@LastContinue
LastContinue / fish_prompt.fish
Created August 5, 2019 02:40
Opinionated (lazy) port of the ZSH Sorin theme for Fish Shell
# name: zsh-sorin
# author: LastContinue <lastcontinue@protonmail.com>
# opinionated (lazy) port of the ZSH Sorin theme, mostly focused on "close enough" Git prompt support
# sources and inspiration:
# <https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/sorin.zsh-theme>
# <https://github.com/fish-shell/fish-shell/pull/2243>
# I know there's a Sorin example (https://github.com/fish-shell/fish-shell/blob/988283c7177d8496f18c1fea1a1007aa8d45d984/share/tools/web_config/sample_prompts/sorin.fish)
# in the Fish repo, but I find this easier to grok
@LastContinue
LastContinue / wk-jisho.js
Created March 24, 2019 17:13
Tampermonky script to work with WaniKani. Allows you to open current item in Jisho.org.
// ==UserScript==
// @name WaniKani Jisho Lookup
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Allows hotkey to look entry in Jisho
// @author LastContinue
// @match https://www.wanikani.com/review
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @grant GM_openInTab
// ==/UserScript==
@LastContinue
LastContinue / ctrl-bootstrap-windows.ps1
Last active October 3, 2018 06:17
Powershell script for Windows users to download everything needed for basic flashing of CTRL keyboard.
$desktop = [System.Environment]::GetFolderPath('Desktop')
$newDir = $desktop+'\ctrl'
New-Item -Path $newDir -ItemType Directory -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12'
Invoke-WebRequest -UseBasicParsing -Uri https://github.com/Massdrop/mdloader/releases/download/0.0.1/mdloader_windows.exe -OutFile $newdir"\mdloader_windows.exe"
Invoke-WebRequest -UseBasicParsing -Uri https://github.com/Massdrop/mdloader/releases/download/0.0.1/applet-flash-samd51j18a.bin -OutFile $newdir"\applet-flash-samd51j18a.bin"
Invoke-WebRequest -UseBasicParsing -Uri https://gist.githubusercontent.com/LastContinue/5f8fb23b41b1611e49d4aced8a44101e/raw/986083d1020f8b1d8ac50e6e822bb0872f96734e/pwr-ldr.ps1 -OutFile $newdir"\pwr-ldr.ps1"
$w = New-Object -ComObject WScript.Shell
@LastContinue
LastContinue / pwr-ldr.ps1
Last active October 3, 2018 04:19
Powershell verison of ctrl-ldr.sh
#Windows version of the ctrl-ldr script.
#this will all you to flash the board without having to have two keyboards
#and only running one command
#Make sure you can run PS scripts by running
#Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
#beforehand
#or use companion .bat file
param(
[Parameter(ValueFromRemainingArguments=$true)]$fileName
)
@LastContinue
LastContinue / pwr-ldr.bat
Created October 3, 2018 02:24
Bat file to enable drag-n-drop for Powershell Version of ctrl-ldr.sh
@ECHO OFF
set args=%1
Powershell.exe -ExecutionPolicy Bypass -Command "& '%~dpn0.ps1' '%args%'"
PAUSE
@LastContinue
LastContinue / cask_update.sh
Last active March 6, 2020 01:53
Brew Cask Update
#!/bin/sh
#This uses the contents of `brew cask info X` to check if the newest version available
#(FIRSTLINE) is found more than once in the rest of the info statement. Finding more than
#one match usually means the newest version is installed...usually...
#apps that do a good job of updating themselves, such as Atom, won't work exactly as expected...
function check {
INFO=$(brew cask info $1)
FIRSTLINE=$(echo $INFO | sed -n 1p)
NAME=$(echo $FIRSTLINE | awk '{print $1}')