Skip to content

Instantly share code, notes, and snippets.

@krusynth
krusynth / scrape.js
Created November 28, 2022 22:02
Mastodon scraper to get all of the folks followed by folks that you follow (your second-degree followers). Download your following_accounts.csv and put it in the same folder as this script. DO NOT RUN THIS if you follow lots (1000+) folks!!! That would be rude.
const fs = require('fs');
const readline = require('readline');
const https = require('https');
const reqOptions = {
timeout: 1000,
};
function get(url) {
// console.log(url);
@krusynth
krusynth / font_awesome.rb
Last active February 27, 2021 14:12 — forked from 23maverick23/font_awesome.rb
Jekyll: Font Awesome icons Liquid tag
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Ryan Morrissey
#
# 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
@krusynth
krusynth / PromiseMap.js
Created November 1, 2019 21:16
A wrapper for Promise.all that maps the return data into an object/hash.
'use strict';
/* Promises.all but uses an Object instead of an array.
*
* Usage:
*
* PromiseMap({
* 'a': new Promise((resolve, reject) => resolve(1)),
* 'b': new Promise((resolve, reject) => resolve(2))
* }).then(result => console.log('done', result));
@krusynth
krusynth / serve.sh
Created September 1, 2019 00:30
Tool to serve a local website. Includes plugin for Powerlevel9K.
# Serve a local static website
# Requires jq for node package info! https://stedolan.github.io/jq/
typeset -A KJOBSLIST
KSERVE_ICON_DEFAULT="\uf013"
KSERVE_ICON_SERVE="\uf233"
KSERVE_ICON_BUILD="\uf021"
# Serve the current directory as a website at port 8000
function kserve() {
@krusynth
krusynth / bigfork.zs
Created May 19, 2019 19:50
Minecraft CraftTweaker recipes for BigFork modpack
// Easier clay
recipes.addShapeless('bigfork_clay',<minecraft:clay>*4,[<minecraft:dirt>,<minecraft:dirt>,<minecraft:dirt>,<minecraft:dirt>]);
// Easier leather, replace monster jerky from Tinkers Construct
mods.tconstruct.Drying.removeRecipe(<tconstruct:edible:10>, <minecraft:rotten_flesh>);
mods.tconstruct.Drying.addRecipe(<minecraft:leather>,<minecraft:rotten_flesh>, 100);
// Add back missing Botania flowers with Easy Pickings flowers
mods.botania.Apothecary.addRecipe(<easypickings:flower_daybloom>,[<ore:petalYellow>,<ore:petalYellow>,<ore:petalOrange>,<ore:petalLightBlue>]);
mods.botania.Apothecary.addRecipe(<easypickings:flower_nightshade>,[<ore:petalBlack>,<ore:petalBlack>,<ore:petalPurple>,<ore:petalGray>]);
@krusynth
krusynth / safeobj.md
Last active May 18, 2019 14:32
SafeObj.js : Fancy map/reducer for complex Javascript data objects. Check out the tests below to see all the features.
@krusynth
krusynth / gulpfile.js
Last active April 28, 2019 02:05
RPG Maker MV JavaScript bundling via Gulp
'use strict'
const gulp = require('gulp');
const imageResize = require('gulp-image-resize');
const path = require('path');
const del = require('del');
const concat = require('gulp-concat');
const uglify = require('gulp-uglify-es').default;
const replace = require('gulp-replace');
const clean = require('gulp-clean');
@krusynth
krusynth / SolarizedDarkPatched.itermcolors
Created February 19, 2019 02:38
Patched version of Solarized Dark to work with ZSH + Spaceship. Preserves standard colors.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.25332435965538025</real>
@krusynth
krusynth / Kru_AirshipEvents.js
Created May 9, 2017 18:59
A plugin for RPG Maker MV to allow airships to interact with events.
//=============================================================================
// Airship Events
// Version: 1.0.0
//=============================================================================
var Imported = Imported || {};
Imported.Kru_AirshipEvents = "1.0.0";
//=============================================================================
/*:
* @plugindesc 1.0.0 Allows airships to interact with events.
*
@krusynth
krusynth / Kru_ClearMapPhotos.js
Last active May 2, 2017 01:51
A plugin for RPG Maker MV to remove all photos from the map on load. This is useful when using parallax images for maps.
//=============================================================================
// Clear Map Photos
// Version: 1.0.0
//=============================================================================
var Imported = Imported || {};
Imported.Kru_ClearMapPhotos = "1.0.0";
//=============================================================================
/*:
* @plugindesc 1.0.0 Clear Map Photos - Remove photos from the map on load.
*