Skip to content

Instantly share code, notes, and snippets.

use macro_rules_attribute::apply;
use macro_rules_attribute::derive;
macro_rules! object_trait {
(@intf $trait_name:ident $trt:path) => {
paste::paste! {
#[allow(missing_docs)]
pub type [<$trt Ref>]<'a, T> = &'a dyn $trt<ID = <T as $trait_name>::ID>;
#[allow(missing_docs)]
pub type [<$trt RefMut>]<'a, T> = &'a mut dyn $trt<ID = <T as $trait_name>::ID>;
@Ryex
Ryex / config.lua
Last active February 23, 2024 00:09
Create computercraft RadialQuary
local CWD = fs.getDir(shell.getRunningProgram())
local tArgs = {...}
local function usage()
print("Usage: config <rotation|level|receiver> <ID>")
print("Start the receiver first and then run rotation and level on respective computers")
print("Use a unique quarry ID and use the same ID on all three computers")
end
local SettingFile = fs.combine(CWD, "settings.cfg")
@Ryex
Ryex / nerdfont.lua
Created January 26, 2023 06:03
iconfont tables from css
local nerdfont = {
nf_fa_free_code_camp = "",
nf_ple_flame_thick = "",
nf_mdi_cube = "",
nf_fae_telescope = "",
nf_oct_file_symlink_file = "",
nf_mdi_chart_line = "",
nf_fa_bar_chart = "",
nf_cod_rss = "",
nf_cod_list_tree = "",
This file has been truncated, but you can view the full file.
[17:02:44] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[17:02:44] [main/INFO]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[17:02:44] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[17:02:44] [main/INFO]: Forge Mod Loader version 14.23.4.2757 for Minecraft 1.12.2 loading
[17:02:44] [main/INFO]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_51, running on Windows 10:amd64:10.0, installed at C:\Users\ryex\Documents\Curse\Minecraft\Install\runtime\jre-x64\1.8.0_51
[17:02:44] [main/INFO]: Searching C:\Users\ryex\Documents\Curse\Minecraft\Instances\Bounds\mods for mods
[17:02:44] [main/WARN]: Found FMLCorePluginContainsFMLMod marker in backpacks 1.12.2 - 3.5.2.jar. This is not recommended, @Mods should be in a separate jar from the coremod.
[17:02:44] [main/WARN]: The coremod BCModPlugin (brad16840.core.BCModPlugin) is not signed!
[17:02:44] [main/WARN]: Found FMLCorePluginContainsFMLMod
@Ryex
Ryex / 1.png
Last active June 3, 2017 18:29
octoprint.log
1.png
@Ryex
Ryex / killseedboxrsync
Created May 22, 2016 21:45
seedbox rsync automation: down load all files from a seed box or other remote server with rsync
#!/bin/bash
pid_file="/path/to/destination/rsync.pid"
rsync_pid=$(cat $pid_file)
if [[ -z "${rsync_pid// }" ]] ; then
echo "[$(date)] no PID for seedbox rsync, exiting"
exit
else
@Ryex
Ryex / ResourceParserWorker.js
Created January 2, 2016 22:20
XML Resource parsing
function Clone() { }
function clone(obj) {
Clone.prototype = obj;
return new Clone();
}
//load sprintf
//importScripts('sprintf.js')
@Ryex
Ryex / RubyMarshal.py
Created July 27, 2015 19:27
Ruby Marshal version 4.8 Reader in Python
from struct import pack, unpack
#============================================================================================
# RubyMarshal
#--------------------------------------------------------------------------------------------
# This class is able to read and write Ruby Marshal format.
#============================================================================================
class RubyMarshal:
@Ryex
Ryex / PygletWX.py
Last active November 11, 2023 08:28
wxPython + Pyglet
"""
LICENSE
Copyright (c) 2014, Rachel Powers All rights reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the BSD license: http://opensource.org/licenses/BSD-3-Clause
"""
import wx