Skip to content

Instantly share code, notes, and snippets.

View icedream's full-sized avatar

Carl Kittelberger icedream

View GitHub Profile
// @author Carl Kittelberger
// Because I am the only one insane enough to do this voluntarily for a joke.
const n = 0;
function notReallyObfuscateNumber(num) {
return '0' + num.toString(8);
}
const numberArrayObfuscationUnicodeOffset = 0x29;
@icedream
icedream / 0000-Patches-for-verdaccio-gitlab-to-use-CI-job-authentication.md
Last active July 19, 2019 07:48
Patches for verdaccio-gitlab to use CI job authentication

This is a quick and dirty patch I wrote to allow CI job tokens to be used for authentication on Verdaccio.

To use this, patch using git am or git apply, build the code (yarn code:build) and then, when running, use username ci and the job token as password to log in.

The first patch is only there to make the linter stop complaining about bad value coercing. The patches afterwards are the important ones.

@icedream
icedream / source_proxy.go
Created August 20, 2017 17:44
icy thing
package main
import (
"fmt"
"io"
"log"
"net/http"
"github.com/gorilla/mux"
)
@icedream
icedream / README.md
Last active January 14, 2021 22:37
Quick sound posting bot for Telegram

This is just a Golang bot quickly thrown together which connects to the Telegram Bot API, waits for messages with specific words to be sent as messages and replies to them with the corresponding audio file.

Building

Make sure you have a standard Go building environment set up (GOPATH should be set up etc.).

Download main.go, make sure dependencies are available (go get -v -d) and then build with go build -v.

Usage

@icedream
icedream / backup.md
Last active June 26, 2017 09:12
Simple stupid reproducible Linux backup solution

Backup

Just a simple backup solution aimed to allow 100% exact reproduction of all necessary files of a system on an ext4 file system.

This is by far not the fastest solution but it works and can still be expanded with encryption and other inter-device transformations.

As a performance hint, my USB backup drive has a normal throughput around 120 MB/s, iotop reported that rsync ran at 33 MB/s for large files. There's definitely room for optimization, for example because every write I/O to the block device causes a timestamp update on the file itself.

file="/run/media/icedream/Backup/backup-laptop"
@icedream
icedream / list-deb-deps.md
Last active June 9, 2017 09:27
Get deb dependencies for an executable or library file

Before you can use this, you need to

  • install apt-file via apt-get install -y apt-file
  • at least have populated the database once via apt-file update
@icedream
icedream / oxideshop-d3-devmode.sql
Last active March 15, 2017 10:27
Useful SQL snippets
-- Enable developer mode in D3 module connector which disables usage of TMP
UPDATE d3_cfg_mod
SET `OXVALUE` = TO_BASE64(IF(`OXVALUE` = '' OR `OXVALUE` = 'N%3B',
'O%3A8%3A%22stdClass%22%3A1%3A%7Bs%3A29%3A%22d3_cfg_mod__blClrTmp_notmpuse%22%3Bs%3A1%3A%221%22%3B%7D',
REPLACE(FROM_BASE64(`OXVALUE`),
'%22d3_cfg_mod__blClrTmp_notmpuse%22%3Bs%3A1%3A%220',
'%22d3_cfg_mod__blClrTmp_notmpuse%22%3Bs%3A1%3A%221')
))
WHERE `OXMODID` = 'd3modcfg_lib';

Keybase proof

I hereby claim:

  • I am icedream on github.
  • I am icedream (https://keybase.io/icedream) on keybase.
  • I have a public key ASDow6YBcZejUMaYAZUs37emfbs2muM8XKKW_0Q2v-jaTAo

To claim this, I am signing this object:

@icedream
icedream / minekawaii.lua
Last active December 16, 2015 05:19
Package Setup YAML file. I'm using this for a new script I made to make making packages for Craftitude easier. I hope... This example shows a setup for the "Minekawaii" mod.
-- Instructions file for Minekawaii
-- Variables:
-- TARGETFOLDER => The target folder where to install the package. In this case, this will be "mods".
-- TARGETFILE => The target file name under which to install the package. In this case, this will be "minekawaii.jar".
-- URL => The URL from which to download the archive. This is the ZIP/JAR file to the mod online.
function Install()
GetResolver("archive", {
input = GetResolver("download", { url = "$(URL)" })
@icedream
icedream / ExampleInstructions.lua
Last active December 16, 2015 04:29
Example Lua script to describe how to install/uninstall mods.
-- Example instructions file for a mod in the
-- Craftitude Repository system
-- As applicable to draft 0.7 (upcoming)
function Install()
-- Download a file
var download = GetResolver("download", { url="http://this.is.a.websi.te/with/an/archive/on/it.zip" })
-- Convert the download to a usable archive
var archive = GetResolver("archive", { input = download })