Skip to content

Instantly share code, notes, and snippets.

View Meshiest's full-sized avatar
🍰

Isaac Meshiest

🍰
View GitHub Profile
@Meshiest
Meshiest / 4changal.user.js
Last active October 26, 2020 15:51
4chan gallerification w/ the g key
// ==UserScript==
// @name 4changal
// @namespace http://tampermonkey.net/
// @version 0.1
// @description turns 4chan pages into galleries
// @author Meshiest
// @match https://boards.4chan.org/*/thread/*
// @grant none
// @updateurl https://gist.github.com/Meshiest/9d56bc34a3ee3b127e93bb2680ed14e8/raw/4changal.user.js
// ==/UserScript==
@Meshiest
Meshiest / textgen.html
Last active October 25, 2020 06:09
Low effort text generator website for brickadia saves - must adhere to the format
<script src="https://cdn.jsdelivr.net/gh/meshiest/brs-js/dist/dist.js"></script>
<script src="https://gist.githack.com/Meshiest/2a253b88a514610772aa03625d41e23a/raw/bricktool.js"></script>
<h1>cake's 3am low effort text generator for brickadia</h1>
<p>
Click <a href="https://github.com/Meshiest/omegga-textgen/tree/master/fonts" target="_blank">here</a> for demo fonts. This is based on the <a href="https://github.com/Meshiest/omegga-textgen" target="_blank">omegga textgen plugin</a>. Read the code for this <a href="https://gist.github.com/Meshiest/deb920d27531a2fba5bff2befed39a32" target="_blank">here</a>.
</p>
<p>
<!DOCTYPE html>
<script src="https://cdn.jsdelivr.net/npm/brs-js/dist/dist.js"></script>
<!-- Files uploaded will be -->
<input id="fileInput" type="file">
<a id="anchor" download="cloned.brs">Download</a>
<!-- This will be filled with the save object as JSON or the error message -->
<pre id="jsonElem"></pre>
@Meshiest
Meshiest / brstats.html
Last active September 17, 2020 13:56
brickadia save file stats
<!DOCTYPE html>
<script src="https://cdn.jsdelivr.net/gh/meshiest/brs-js/dist/dist.js"></script>
<style>
@import url('https://fontlibrary.org/face/glacial-indifference');
table {border-collapse: collapse;}
body {
margin: 0;
@Meshiest
Meshiest / tweetparse.rs
Last active August 28, 2020 16:37
parses archive.org tweet archives (.tar -> .json.bz2 -> tweet)
use bzip2::read::BzDecoder;
use crossbeam_queue::SegQueue;
use glob::glob;
use serde_json::Value;
use std::{
fs::{remove_file, File},
io::{BufRead, BufReader},
sync::{
atomic::{AtomicIsize, Ordering},
Arc,
@Meshiest
Meshiest / autoyoutubeembed.user.js
Last active August 18, 2020 00:47
Automatically embed youtube videos in google search video results. Click "Raw" to install if you have tampermonkey
// ==UserScript==
// @name Google Search Youtube Video Embedder
// @namespace http://tampermonkey.net/
// @version 0.7
// @description Automatically embed youtube videos in google search results
// @author github.com/meshiest
// @match https://www.google.com/search*
// @updateurl https://gist.github.com/Meshiest/f104af2c0e4b6e589d33cca6a339c398/raw/autoyoutubeembed.user.js
// @grant none
// ==/UserScript==
@Meshiest
Meshiest / brickadia.rs
Created June 18, 2020 19:31
run a brickadia server in rust
extern crate rexpect;
use rexpect::session::spawn_command;
use std::ops::DerefMut;
use std::process::Command;
fn main() {
let folder = "server";
let email = "<email>";
let password = "<password>";
@Meshiest
Meshiest / trianglify.js
Last active June 16, 2020 05:43
Trianglify all images on any webpage
/*
Put this in a bookmark:
javascript:var s=document.createElement('script');s.src='https://gistcdn.githack.com/Meshiest/b9e0b11a742ef340671ac14d69148648/raw/trianglify.js';document.body.appendChild(s);
*/
function trianglify(image) {
const triangles = 40;
const scaleAmt = 0.2;
const slow = 0;
if (image.width === 0 || image.height === 0 || !image.complete)
@Meshiest
Meshiest / easter.html
Last active May 16, 2020 07:46
calculate easter based on moon positions
<h1>Next Easter is <span id="nextEaster"></span></h1>
<h3>Easter is...</h3>
<p>
...the first Sunday after the <i>ecclesiastical</i> full moon that occurs on or soonest after 21 March.
</p>
<p>
In applying the ecclesiastical rules, Christian churches use 21 March as the starting point in determining the date of Easter, from which they find the next full moon, etc.
</p>
<div>above from <a href="https://en.wikipedia.org/wiki/Easter">easter wikipedia page</a></div>
<h3>A full moon is...</h3>
@Meshiest
Meshiest / bricktool.js
Last active October 24, 2020 06:46
tool for scanning bricks in saves
window.$tool = save => {
// shallow equality
const eq = (a, b) => a === b || a.every && a.every((v, i) => v === b[i]);
// Helper function to build dictionaries from arrays, I could technically just use indexOf but w/e
const indexify = (arr, key) =>
Object.fromEntries(Object.entries(arr || []).map(a =>
[key ? a[1][key] : a[1], Number(a[0])]));
// Lookup tables to parse from string to value