Skip to content

Instantly share code, notes, and snippets.

@krusynth
krusynth / font_awesome.rb
Last active Feb 27, 2021 — forked from 23maverick23/font_awesome.rb
Jekyll: Font Awesome icons Liquid tag
View font_awesome.rb
##
# 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 Nov 1, 2019
A wrapper for Promise.all that maps the return data into an object/hash.
View PromiseMap.js
'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 Sep 1, 2019
Tool to serve a local website. Includes plugin for Powerlevel9K.
View serve.sh
# 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
Minecraft CraftTweaker recipes for BigFork modpack
View bigfork.zs
// 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
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 Apr 28, 2019
RPG Maker MV JavaScript bundling via Gulp
View gulpfile.js
'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 Feb 19, 2019
Patched version of Solarized Dark to work with ZSH + Spaceship. Preserves standard colors.
View SolarizedDarkPatched.itermcolors
<?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
A plugin for RPG Maker MV to allow airships to interact with events.
View Kru_AirshipEvents.js
//=============================================================================
// 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
A plugin for RPG Maker MV to remove all photos from the map on load. This is useful when using parallax images for maps.
View Kru_ClearMapPhotos.js
//=============================================================================
// 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.
*
@krusynth
krusynth / Kru_MultitileEvents.js
Created May 2, 2017
A plugin for RPG Maker MV to allow multitile events, instead of the 1x1 tile events that are the default.
View Kru_MultitileEvents.js
//=============================================================================
// Multitle Events
// Version: 1.0.0
//=============================================================================
var Imported = Imported || {};
Imported.Kru_MultitileEvents = "1.0.0";
//=============================================================================
/*:
* @plugindesc 1.0.0 Allows for events that are bigger than 1 tile.
*