Skip to content

Instantly share code, notes, and snippets.

View iComputerfreak's full-sized avatar

Jonas Frey iComputerfreak

  • JamitLabs GmbH
  • Germany
  • 19:25 (UTC +01:00)
View GitHub Profile
@iComputerfreak
iComputerfreak / update.sh
Last active January 27, 2022 22:48
Marlin Update and Configuration Override
#!/bin/zsh
set -e
# This script assumes the following folder structure:
# .
# ├── .current_version
# ├── Configurations <- clone of https://github.com/MarlinFirmware/Configurations
# ├── Marlin <- clone of https://github.com/MarlinFirmware/Marlin
# ├── Overrides <- Configuration.h and Configuration_adv.h with the overriding values (all lines without any indentation)
@iComputerfreak
iComputerfreak / SwiftEquatableInheritance.swift
Last active July 30, 2020 20:59
Conforming to the Equatable protocol in a class hierarchy
import Foundation
// MARK: - Vehicle.swift
class Vehicle {
let name: String
init(name: String) {
self.name = name
}
}
@iComputerfreak
iComputerfreak / screenshot.py
Created June 17, 2020 15:52
Takes a full page screenshot of a website using Selenium and Firefox with a delay of 1 second.
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
import sys
import time
# Get the url and name
if len(sys.argv) != 3:
print("Usage: " + sys.argv[0] + " <File> <URL>")
sys.exit()
@iComputerfreak
iComputerfreak / Mineralis.zs
Created November 20, 2019 13:45
FTB Interactions config for the AstralSorcery Mineralis ritual.
# Mineralis Ore Dictionary
# Location: scripts/Mineralis.zs
<ore:mineralisEntropyInfused>.add(<gregtech:ore_terra_infused_0:0>);
<ore:mineralisOrderInfused>.add(<gregtech:ore_ordo_infused_0:0>);
<ore:mineralisIgnisInfused>.add(<gregtech:ore_aqua_infused_0:0>);
<ore:mineralisAquaInfused>.add(<gregtech:ore_aqua_infused_0:0>);
<ore:mineralisAerInfused>.add(<gregtech:ore_aer_infused_0:0>);
<ore:mineralisTerraInfused>.add(<gregtech:ore_terra_infused_0:0>);
<ore:mineralisAquamarine>.add(<astralsorcery:blockcustomsandore:0>);
@iComputerfreak
iComputerfreak / chargeDisplay.lua
Last active December 22, 2019 20:45
Displays the values sent by chargeController.lua on a monitor
-- This script displays the information sent by this script: https://gist.github.com/iComputerfreak/077d9c28e0c99f00453d0dc1a6fc8f07
--[[
AN UPDATED VERSION OF THIS SCRIPT IS AVAILABLE HERE: https://github.com/iComputerfreak/OpenComputers-Programs/tree/master/GeneratorControl
]]
local event = require("event")
local term = require("term")
local component = require("component")
local m = component.modem
@iComputerfreak
iComputerfreak / chargeControl.lua
Last active December 22, 2019 20:45
A lua script for the OpenComputers mod that checks the charge of a GregTech Battery Buffer and switches a Redstone signal on/off when the buffer reaches certain charge percentages
-- This script requires the BatteryBufferDriver mod to work: https://github.com/iComputerfreak/BatteryBufferDriver
--[[
AN UPDATED VERSION OF THIS SCRIPT IS AVAILABLE HERE: https://github.com/iComputerfreak/OpenComputers-Programs/tree/master/GeneratorControl
]]
-- To display the charge values sent by this script, use the chargeDisplay.lua script
-- The script can be found here: https://gist.github.com/iComputerfreak/2821836ed3b29a3b1ed2c76c2570b16e
@iComputerfreak
iComputerfreak / microblocks.cfg
Last active November 19, 2019 15:20
Forge Microblocks config for the FTB Interactions modpack
#Configuration file for adding microblock materials for aesthetic blocks added by mods
#Each line needs to be of the form <name>:<meta>
#<name> is the registry key of the block/item enclosed in quotes. NEI can help you find these
#<meta> may be ommitted, in which case it defaults to 0, otherwise it can be a number, a comma separated list of numbers, or a dash separated range
#Ex. "dirt" "minecraft:planks":3 "iron_ore":1,2,3,5 "ThermalFoundation:Storage":0-15
"minecraft:concrete":0-15
"minecraft:bone_block"
"minecraft:white_glazed_terracotta"
"minecraft:orange_glazed_terracotta"
"minecraft:magenta_glazed_terracotta"
body {
font-family: "Helvetica Neue", "Arial";
}
.item {
font-family: "SF Mono", "Menlo", "Courier New";
}
table {
border-collapse: collapse;
@iComputerfreak
iComputerfreak / SettingsViewController.h
Last active August 29, 2015 14:01
SettingsViewController
//
// SettingsViewController.h
// HFG Vertretungsplan
//
// Created by Jonas Frey on 13.05.14.
// Copyright (c) 2014 Jonas Frey. All rights reserved.
//
#import <UIKit/UIKit.h>