Skip to content

Instantly share code, notes, and snippets.

Avatar

Morten Hekkvang artheus

  • SBAB Bank AB
  • Stockholm | Sweden
View GitHub Profile
@artheus
artheus / modpack.sh
Created Jan 30, 2021
Shell script for downloading mods for Curseforge Modpack on Linux clients (using Vanilla Minecraft Launcher)
View modpack.sh
#!/bin/bash
## Usage:
## 1. Download the modpack zip from CurseForge
## 2. Extract zip to where you want your modpacks game directory to be (e.g. ~/minecraft/modpack/gamedir)
## 3. In terminal, run this script in your chosen game directory
## If successful, it should print out which mods its downloading, until it is done
## 4. Create an "Installation" in the Vanilla Minecraft Launcher
## * Version should be set to the correct modded minecraf version installed (eg. 1.16.4-forge-35.1.13)
## * Make sure you are running the correct java version, and are giving an appropriate amount of RAM
@artheus
artheus / inheritance_test.go
Created Sep 22, 2019
Golang inheritance example
View inheritance_test.go
package encoding
import (
"github.com/stretchr/testify/assert"
"testing"
)
type genericEntity struct {
ID int64
Name string
View modlist.txt
actually-additions
ae2-stuff
appleskin
applied-energistics-2
baubles
better-builders-wands
bibliocraft
blood-magic
botania
buildcraft
@artheus
artheus / reactor.lua
Created Oct 28, 2017
BR Reactor controller script.
View reactor.lua
local component = require("component")
local r = component.br_reactor
local capacity = r.getEnergyCapacity();
while true do
s = r.getEnergyStored();
if r.getActive() then
if s/capacity > 0.8 then
@artheus
artheus / wp_function.sh
Last active Oct 26, 2017
My workspace bash function with completion
View wp_function.sh
function wp() {
cd "$HOME/workspace/$1"
}
__wp_path_comp()
{
local cur_word="${COMP_WORDS[COMP_CWORD]}"
local wpcontent
wpcontent=`find $HOME/workspace/${cur_word}* -maxdepth 0 -type d -print 2> /dev/null | sed -e "s|$HOME/workspace/||" `
@artheus
artheus / mobfarm.lua
Last active Oct 25, 2017
mobfarm control script for a ftb server w. opencomputers
View mobfarm.lua
API = require("buttonAPI")
local event = require("event")
local computer = require("computer")
local term = require("term")
local component = require("component")
local gpu = component.gpu
local rs = component.redstone
local colors = require("colors")
local sides = require("sides")
@artheus
artheus / pacman-mirrors-replace.vim
Last active Jun 22, 2020
Vim Country Substitution for pacman.d/mirrorlist
View pacman-mirrors-replace.vim
" This is a substitution command for VIM where you can replace the word´Sweden´ with the country you want to keep.
" Whenever I install Arch linux on my machines, I usually only keep the mirrors from my country. If you do the
" same thing, you can use this to do it fast!
:%s/^##\s\(Sweden\)\@!\(.*\)\nServer = .*\n//
" Do you have any suggestions on making it better? Please comment!
View py3lock.py
#!/usr/bin/python
import os
import xcb
from xcb.xproto import *
from PIL import Image, ImageFilter
XCB_MAP_STATE_VIEWABLE = 2
def screenshot():
@artheus
artheus / api_generation.yaml
Last active Sep 25, 2016
Sample config, API backend generation
View api_generation.yaml
!import "common.groovy"
!import "springboot.groovy"
!import "postgres.groovy"
!merge "moreConfig.yaml" #!dominant
!merge "otherConfig.yaml" #!submissive
springboot:
- db: "postgres"