Skip to content

Instantly share code, notes, and snippets.

View KageKirin's full-sized avatar

Christian Helmich KageKirin

View GitHub Profile
@KageKirin
KageKirin / README.md
Last active January 1, 2023 18:13
Running a Git server on a Raspberry Pi (Gitea version)

Running a Git server on a Raspberry Pi (Gitea version)

Gitea is small Git server written in Go that comes with a basic feature set, similar to its resource-hungry cousins GitLab and GitHub.

Since it doesn't need much resources, Gitea is perfect for running on a Raspberry Pi.

Preparation

We want a special user for gitea, and git-related operations: git.

@KageKirin
KageKirin / README.md
Last active December 18, 2022 16:00
Sharing a folder from a Raspberry Pi over multiple network protocols

Sharing a folder from a Raspberry Pi over multiple network protocols

Let's presume we have a specific folder on a Raspi that we want to share over the network, be it for file read/write access as a drive or as a media streaming endpoint.

The following sections explain how to configure the different protocol daemons.

For the sake of consistency, we define our shared folder as /mnt/mountpoint/share and a user account without root priviledges pi.

@KageKirin
KageKirin / README.md
Last active December 4, 2022 21:35
Raspi as AirPrint capable print server -- Setup guide

Raspi as AirPrint capable print server -- Setup guide

This follows the explanations from the sites below (see bottom) in more concentrated fashion.

Before Starting

REMINDER double check your printer is actually supported by CUPS out-of-the-box, or that the Linux drivers are available for ARM64 processors. A number of printer makers DO NOT have drivers for Linux/ARM64. (I see you, Brother!)

In the latter case, this guide might still be valuable, but you have to install a Debian/Ubuntu Linux on a x86_64 PC/NUC instead of Raspbian on a Raspi. (For other Linux distros, just use your the related package manager to install the same packages).

@KageKirin
KageKirin / README.md
Created November 15, 2022 22:58
Python script to get tweets and retweets

Python script to get tweets and retweets

This is super simple, quick & dirty Python script to retrieve all your (recent) tweets, and store them as combined JSON file on your disk.

It's really basic (no lookup/storage of media links, no saving threads, ...).

Usage

Get your Twitter App credentials by registering as a developer.

@KageKirin
KageKirin / README.md
Last active December 11, 2022 23:29
Properly mounting harddrives on Raspi (and by extension Linux)

Properly mounting harddrives on Raspi (and by extension Linux)

This guide is intended mostly for my own reference, but I figured it can be of use to others as well.

Conventions

/dev/sdxy is the device/partition to mount/label/..., eg. /dev/sda or /dev/sdb1.

Listing up what we've got

@KageKirin
KageKirin / helpme.md
Last active July 2, 2022 06:49
Bricked Raspberry PI 4b -- First Aid guide

Bricked Raspberry PI 4b -- First Aid guide

This is intended as a personal memo, but also public service. It contains info I gathered from multiple sites while resurrecting my own Raspi.

A part of the salvation process happens on the Raspi directly, so you need a screen and keyboard attached to it.

Bad /etc/fstab

If you edited /etc/fstab and your Raspi won't go beyond the boot sequence while running hot.

@KageKirin
KageKirin / argus.zig
Last active February 23, 2022 13:45
GENie generated Zig build issue "StreamTooLong"
// argus.zig generated by GENie
const std = @import("std");
const builtin = @import("builtin");
const Builder = std.build.Builder;
pub fn build(b: *Builder, target: std.zig.CrossTarget, mode: std.builtin.Mode) *std.build.LibExeObjStep {
const prj = switch (mode) {
@KageKirin
KageKirin / glheader.h
Last active June 29, 2021 12:47
SDL Test 2 -- WebGL2 compatible fade black -> white
/// Common header to include for OpenGL
#ifndef GL_HEADER_H_INC
#define GL_HEADER_H_INC 1
#ifndef USE_GLEW
#define USE_GLEW 0
#endif
#ifndef USE_GLAD
@KageKirin
KageKirin / svn-git-fix.md
Last active April 25, 2021 15:38
Fix svn-git install

git-svn installation fix

Quick guide (and personal memo) on how to get git-svn to run on macOS with brew.

Issue

git-svn is written in perl and running on the perl5 binary bundled with git.
The issue is: the Perl module "SVN::Core" cannot be found. (Obviously, it hasn't be installed).

The error message looks like this:

@KageKirin
KageKirin / recomment2.cpp
Last active August 20, 2020 15:22
Recomment C89 to C99
//#!`/usr/bin/env clang++` --std=c++17 -I/usr/local/Cellar/boost/1.73.0/include -L/usr/local/Cellar/boost/1.73.0/lib -lboost_wave -orecomment
#include <fstream>
#include <iostream>
#include <sstream>
#include <regex>
#include <cassert>
#include <boost/wave/cpplexer/cpp_lex_iterator.hpp>
#include <boost/wave/cpplexer/cpp_lex_token.hpp>