Skip to content

Instantly share code, notes, and snippets.

View dfrankland's full-sized avatar
🏕️
Catching Pokemon

Dylan Frankland dfrankland

🏕️
Catching Pokemon
View GitHub Profile
#!/bin/bash
# !!WARNING!!
# This will DELETE all efforts you have put into configuring nix
# Have a look through everything that gets deleted / copied over
nix-env -e '.*'
rm -rf $HOME/.nix-*
rm -rf $HOME/.config/nixpkgs
@dfrankland
dfrankland / flake.lock
Last active February 19, 2022 13:23
Nix Flake / Shell for Java Projects
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1634851050,
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c91f3de5adaf1de973b797ef7485e441a65b8935",
"type": "github"
@dfrankland
dfrankland / ascii-pretzel.txt
Created February 14, 2022 21:58
ascii art pretzel
_ _
/ X \
\/_\/
' '
@dfrankland
dfrankland / add-anki-card-with-js-on-ankiweb.js
Last active January 25, 2022 22:01
Quickly add cards with plain text using AnkiWeb
// Go to https://ankiuser.net/edit/
(async ({ cardType, nameOfDeck, data }) => {
const body = [
["nid", ""],
["data", encodeURIComponent(JSON.stringify(data))],
["csrf_token", editor.token],
["mid", editor.mode.notetypes.find(({ name }) => name === cardType).id],
["deck", editor.mode.decks.find(({ name }) => name === nameOfDeck).id],
]
@dfrankland
dfrankland / get-innova-discs.sh
Last active November 11, 2021 00:07
Curl Innova discs available from the factory store
#! env bash
# Checking which full production discs are available in Champion Glow plastic
curl -sL 'https://proshop.innovadiscs.com/full-production/?_bc_fsnf=1&Plastic+Type=Glow+Champion&list_all=Disc%20Model' | grep -ie 'Disc+Model=.*"' | sed 's/.*Disc+Model=\(.*\)"/\1/' | sed 's/+/ /' | perl -pe 's/\%(\w\w)/chr hex $1/ge'
# Checking which full production discs are available in Champion plastic
curl -sL 'https://proshop.innovadiscs.com/full-production/?_bc_fsnf=1&Plastic+Type=Champion&list_all=Disc%20Model' | grep -ie 'Disc+Model=.*"' | sed 's/.*Disc+Model=\(.*\)"/\1/' | sed 's/+/ /' | perl -pe 's/\%(\w\w)/chr hex $1/ge'
# Checking which limited discs are available in Champion Glow plastic
curl -sL 'https://proshop.innovadiscs.com/limited/?_bc_fsnf=1&Plastic+Type=Glow+Champion&list_all=Disc%20Model' | grep -ie 'Disc+Model=.*"' | sed 's/.*Disc+Model=\(.*\)"/\1/' | sed 's/+/ /' | perl -pe 's/\%(\w\w)/chr hex $1/ge'
@dfrankland
dfrankland / flake.lock
Created October 21, 2021 23:42
Nix Flake / Shell for Node.js Projects With Native Dependencies
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1629481132,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "997f7efcb746a9c140ce1f13c72263189225f482",
"type": "github"
@dfrankland
dfrankland / cypress-nix-shell.sh
Created October 5, 2021 03:21
Quickly create an environment to run Cypress within nix
nix-shell -E 'with import <nixpkgs> { }; runCommand "dummy" { buildInputs = [ cypress ]; shellHook = "export CYPRESS_INSTALL_BINARY=0 CYPRESS_RUN_BINARY=${cypress}/bin/Cypress;"; } ""'
@dfrankland
dfrankland / configuration.nix
Created June 19, 2021 19:18 — forked from RobBlackwell/configuration.nix
NixOS on Dell XPS 13
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@dfrankland
dfrankland / LICENSE
Created June 4, 2021 20:32 — forked from binji/LICENSE
pokegb.cc w/o macros
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
@dfrankland
dfrankland / configuration.nix
Created May 10, 2021 05:11
Default configuration files for NixOS with GNOME 3 on a Proxmox VM
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix