Skip to content

Instantly share code, notes, and snippets.

View Interfiber's full-sized avatar
🔨
Working

Interfiber Interfiber

🔨
Working
View GitHub Profile
@Interfiber
Interfiber / BOOKMARKLETS.md
Last active December 22, 2022 22:40
Blooket Mod library + mods

Bookmarklets

Why is the code minified and obuscated?

To keep the javascript: url smaller :). You can read the source code in the files linked in this gist

It dosent work in firefox!

Make sure to create a bookmark with the url set to the bookmarklet code, dont just copy-paste into the URL bar

Blooket lib [MINIFIED + OBUSCATED]

@Interfiber
Interfiber / main.js
Last active April 5, 2021 20:43
Main.js for something...
const fs = require('fs');
const dir = fs.opendirSync('json')
let dirent
let db_out = [];
while ((dirent = dir.readSync()) !== null) {
let json = JSON.parse(fs.readFileSync(`json/${dirent.name}`));
json.forEach((f) => {
let ts = new Date(f.ts * 1000);
// Get attachment title
if (f.attachments == undefined){
@Interfiber
Interfiber / lua_yum.sh
Last active April 25, 2021 14:56
Lua Yum: A Quick start script to get you rolling with lua
echo "Copyright Interfiber 2020-2021"
echo "Lua quickstart script."
echo "This script will download, and compile lua from source"
echo "Lua is very lightweight so this should not take that long"
echo ""
echo ""
echo ""
echo "stage: downloading lua..."
curl -#L https://www.lua.org/ftp/lua-5.4.2.tar.gz -o LUA_STAGE_DOWNLOAD.tar.gz
if ! test -f LUA_STAGE_DOWNLOAD.tar.gz; then
@Interfiber
Interfiber / better-xplane-forum.user.js
Last active October 12, 2020 19:50
Makes the Xplane Form located at x-plane.org look better
// ==UserScript==
// @name Better XPlane Fourm
// @namespace https://interfiber.github.io
// @version 0.0
// @description Make The XPlane Forum Better
// @author Interfiber
// @match https://forums.x-plane.org/*
// @updateURL https://gist.github.com/Interfiber/581f656b5b48f304cb019e214d9d259a/raw/better-xplane-forum.user.js
// @downloadURL https://gist.github.com/Interfiber/581f656b5b48f304cb019e214d9d259a/raw/better-xplane-forum.user.js
// @grant none
@Interfiber
Interfiber / create-gist.sh
Created September 27, 2020 18:27
Create a Github Gist with the github api
# Generate a Github Token Under Settings/Developer Settings/Personal Access Tokens Create A New one with
# The gist premisson and copy and paste the string it gitves you in the place of "YOUR_AUTH_TOKEN_HERE"
#
curl -X POST -H "Authorization: token YOUR_AUTH_TOKEN_HERE" https://api.github.com/gists -d '{"public":true,"files":{"file1":{"content":"File One Content"}, "file2":{"content":"File2 content"}}}'
@Interfiber
Interfiber / lsx.rs
Created August 5, 2020 19:45
A version of ls that adds file and file icons
use std::fs;
use std::env;
fn printIcon(fileType: String, icon: String, file: String){
if file.contains(&fileType){
println!("{} {}", icon, file);
}
}
fn main() {
let args: Vec<String> = env::args().collect();
let mut paths = fs::read_dir(".").unwrap();