Skip to content

Instantly share code, notes, and snippets.

View icedream's full-sized avatar

Carl Kittelberger icedream

View GitHub Profile
@icedream
icedream / Dockerfile
Created August 12, 2020 18:32
mkp224o in Docker image
###
# DOWNLOAD
FROM alpine AS source
RUN apk add --no-cache git
RUN git clone --recursive https://github.com/cathugger/mkp224o.git /usr/src/mkp224o
###
@icedream
icedream / README.md
Last active March 29, 2024 20:57
Adjusting SELinux to change SSH port in Fedora CoreOS

See coreos/fedora-coreos-tracker#396 (comment) for a bit of explanation.

Warning: The script will trigger warning messages in the systemd journal log that look like this:

systemd[1]: sshd.service: Found left-over process 4270 (conmon) in control group while starting unit. Ignoring.
systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.

This is probably a side effect of the script booting up podman containers to run semanage - I don't know how to get rid of this properly if it's possible at all but I think this can be ignored for now.

SSH daemon can take quite a long while to start for the first time due to the one-time image build.

// @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: