Skip to content

Instantly share code, notes, and snippets.

Preface:
I don't know how many of you played modded 1.4.2-1.12.2 but things have changed in the modding landscape since Tekkit. It's no longer IndustrialCraft and EU or BuildCraft's Minecraft Joules. It's "Redstone Flux" from Thermal Expansion. All the Grinders, electric furnaces are still available just bigger, better, and arguably easier than IndustrialCraft. IndustrialCraft started following in GregTech's footstep and made many things more complicated. That being said, IndustrialCraft is still in a couple packs. Just really annoying.
-- just wanted to get that out of the way. sorry if you guys already knew all that xd
https://www.feed-the-beast.com/projects/ftb-presents-direwolf20-1-12 - it is fairly similar to most old Tekkit/FTB packs, just with the most up to date mods. Provides a good balance between magic & tech
https://www.feed-the-beast.com/projects/ftb-horizons-iii - Entirely new mods. Doesn't include your traditional mods. Focuses on highlighting under-used and not so popular mods. Some really
@rbrick
rbrick / solutions.cs
Created November 15, 2018 01:39
edabit.com
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
public class Program
{
static char[] VOWELS = new char[] { 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U' };
@rbrick
rbrick / OTP.kt
Last active November 6, 2018 06:48
HOTP/TOTP code generation implementation in Kotlin
import java.nio.ByteBuffer
import java.time.Instant
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
interface Counter {
fun count(): Long
}
class BasicCounter(var x: Long) : Counter {
import java.util.concurrent.TimeUnit;
public final class TestClass {
public static final String LOREM_IPSUM = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " +
"In in pellentesque sem, quis iaculis sapien. Quisque ut velit vel ex facilisis euismod in et " +
"neque. Donec eget ex in nisl dapibus congue id ultricies odio. Nulla et nibh nec nunc pretium aliquet " +
"in quis augue. Aenean sit amet nisi eu tortor malesuada tincidunt. Fusce in pulvinar sapien, vitae mollis orci. " +
"Donec sed purus luctus, convallis metus sit amet, volutpat turpis. Sed quis nunc id nisl fringilla tincidunt a ut urna.";
@rbrick
rbrick / yggdrasil.go
Created September 7, 2016 08:43
Simple implementation of Yggdrasil (Mojang's authentication service)
// This is a client implementation of Yggdrasil (Mojang's authentication server used for their games.)
// Big thanks for documentation provided by http://wiki.vg/Authentication
package main
import (
"bytes"
"encoding/json"
"io"
"io/ioutil"
"log"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define CURSE_ARRAY_SIZE 5
#define CURSE_AMOUNT 100
char* CURSE_WORDS[] = { "SHIT", "FUCK", "DAMN", "DAMMIT", "CRAP" };
void main()
@rbrick
rbrick / login.py
Created July 12, 2016 05:41
Old login system made in Python
import json
import os
import sqlite3
from flask import Flask, render_template, request, flash, session, redirect, url_for
from werkzeug import security
app = Flask(__name__)
app.secret_key = os.urandom(32)
conn = sqlite3.connect('database.db')

Keybase proof

I hereby claim:

  • I am rbrick on github.
  • I am rbrick (https://keybase.io/rbrick) on keybase.
  • I have a public key ASCEy5b7PX-m9B77Dj9mHOrs5R2Ne8V_jkDH8XbnTjnARgo

To claim this, I am signing this object:

function copy(text) {
// create the element
var copy_from = document.createElement('textarea');
copy_from.style.position = 'absolute';
copy_from.setAttribute('readonly', '');
copy_from.value = text;
// add to body
document.body.appendChild(copy_from);
@rbrick
rbrick / merge.go
Created June 19, 2016 06:14
Merges multiple slices into one without duplicates.
// Merges slices into one without duplicates
func merge(slices... []string) []string {
merged := *new([]string)
// Use a map for faster lookup
contains := map[string]bool{}
for _, v := range slices {
for _, s := range v {
if _, ok := contains[s]; ok {
// already contains. Skip!