Skip to content

Instantly share code, notes, and snippets.

View oluceps's full-sized avatar
㊙️
I may be slow to respond.

oluceps oluceps

㊙️
I may be slow to respond.
View GitHub Profile
@RigoLigoRLC
RigoLigoRLC / template.svg
Created April 13, 2024 07:33
红色电音极地大冲击模板 (CC BY-NC 4.0)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@udf
udf / write_up.md
Last active June 28, 2024 06:32
A Trick To Use mkMerge at The Top Level of a NixOS module

The Setup

I wanted to write a module that generates multiple systemd services and timers to scrub some zfs pools at certain intervals. The default scrub config does not support individual scrub intervals for each pool.

I want the config to look like this:

{
  services.zfs-auto-scrub = {
 tank = "Sat *-*-* 00:00:00";
@aejh
aejh / 40-usb-android.network
Created November 1, 2021 15:13
Android USB network tethering with systemd-networkd
[Match]
# Use udevadm info /sys/class/net/INTERFACE_NAME to list the udev properties and pick one or more
Property=ID_MODEL=SAMSUNG_Android "ID_USB_DRIVER=rndis_host"
[Network]
DHCP=ipv4
[DHCPv4]
# Default metric is 1024, setting a value lower makes this the default route
RouteMetric=512
@magnetikonline
magnetikonline / README.md
Last active July 23, 2024 00:23
Cleanup legacy GitHub Actions workflow runs.

Cleanup legacy GitHub Actions workflow runs

Python utility to bulk delete GitHub Actions runs for a given workflow, either current or legacy/since removed. The GitHub web UI currently allows removal of individual workflow runs - but this becomes tedious quickly when performed in bulk.

Usage

Create a new Personal access token allowing the workflow scope:

image

@Scoder12
Scoder12 / json2nix.py
Last active June 10, 2024 06:42
Converts JSON objects into nix (hackishly).
"""Converts JSON objects into nix (hackishly)."""
import sys
import json
INDENT = " " * 2
def strip_comments(t):
@FreddieOliveira
FreddieOliveira / docker.md
Last active July 27, 2024 16:12
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@hadilq
hadilq / NixOS-guide.md
Last active July 20, 2024 18:59
Encypted LUKS LVM Btrfs Root with Opt-in State on NixOS

I'm trying to follow this guide to install NixOS using Btrfs, LUKS and LVM. The main usage of this page for me will be remembering what I did! My laptop is ASUS ROG GL553VD.

Just downloaded Plasma Desktop, 64bit and create a bootable Flash Drive. Then boot up to NixOS Live CD. Using gparted to create two partitions, One 200MB vfat EFI partittion and the rest of SSD drive will be an encrypted partition.

DISK=/dev/nvme0n1
@phlinhng
phlinhng / a-trojan-with-nginx-stream-module.md
Last active March 28, 2024 13:39
Trojan + NGINX 多網站共存

利用 NGINX 的 Stream 模塊 sni_preread 功能,可以做到讓 Trojan 和其他網站在同一台機器上共享 443 端口。

@Tehnix
Tehnix / CI.yml
Created March 30, 2020 21:21 — forked from FedericoPonzi/CI.yml
Ready to use Github workflow for cross-compiling a rust binary to many Linux architectures.
# Instruction + template repo: https://github.com/FedericoPonzi/rust-ci
name: CI
on:
pull_request:
push:
branches:
- master
tags:
- 'v*.*.*'
@thalesmg
thalesmg / readme.org
Created February 15, 2020 17:24
Recursively traverse a directory tree mapping config files for Nix Home Manager
ͳ nix eval '(let f = import ./recurseTree.nix; in f "")' | nixfmt
{
  xdg = {
    configFile = {
      "something/b/d/e" = { source = /tmp/nixtest/b/d/e; };
      "something/c" = { source = /tmp/nixtest/c; };
      "something/recurseTree.nix" = { source = /tmp/nixtest/recurseTree.nix; };
    };
  };