Skip to content

Instantly share code, notes, and snippets.

View sokai's full-sized avatar
💭
I may be slothy, while looking on 🐑

sokai

💭
I may be slothy, while looking on 🐑
View GitHub Profile
@zuphilip
zuphilip / README.md
Last active December 24, 2022 10:43
Bookmarklet to prepare a toot from any website

Usage

This JavaScript bookmarklet will copy the selected text on any website and prepare a toot with that for you. It can be used as it is for the openbiblio.social and some other instances but can be easily adapted. To use it in your browser go through the following steps:

  1. Create a new bookmark in your browser
  2. Choose any name, e.g. Toot this!
  3. Copy the content of *.bookmarklet.js as its adress
  4. Save it
@giuseppe998e
giuseppe998e / nixos-btrfs-tmpfs.md
Last active February 26, 2025 10:06
Install NixOS with BTRFS and IN-RAM root

Install NixOS with BTRFS and IN-RAM root

1. Format and partition the hard drive

  1. Create the GPT partition table
    • $ parted /dev/sdX mklabel gpt
  2. Create the UEFI FAT32 partition (which will be /dev/sdXY)
    • $ parted /dev/sdX mkpart esp fat32 1MiB 512MiB
    • $ parted /dev/sdX set 1 esp on
    • $ parted /dev/sdX set 1 boot on
  • $ mkfs.fat -F 32 -n UEFI /dev/sdXY
@probonopd
probonopd / Wayland.md
Last active April 16, 2025 20:29
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@PhrozenByte
PhrozenByte / PicoRedirect.php
Last active February 19, 2025 22:33
A simple Pico plugin to create redirection pages to arbitrary URLs.
<?php
/**
* Pico redirect plugin
*
* Adds a `Redirect` meta header to redirect to other URLs. The meta header
* supports URL substitution variables, namely %base_url%, %plugins_url%,
* %themes_url%, %assets_url% and %theme_url%.
*
* Example:
@pweldon
pweldon / bootstrap.sh
Last active June 17, 2023 13:29
zfs nixos bootstrap
#!/usr/bin/env bash
# credit: https://github.com/a-schaefers/themelios
set -euxo pipefail
die() {
[ $# -gt 0 ] && printf -- "%s\n" "$*"
exit 1
}
@blushingpenguin
blushingpenguin / free_email_provider_domains.txt
Last active June 29, 2019 17:54 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@vv01f
vv01f / backup-android-app.md
Created August 19, 2017 21:24
backup for conversations account data

When creating an accoutn in conversations the account data often is nor well remebered and some servers do not provide the option to retrieve the missing information. This worked today for two people that wanted to replace the f-droid version by the one from play store and reuse their accounts after the fresh installation.

#!/bin/sh
####
# howto backup conversations account data
####
@max-mapper
max-mapper / readme.md
Created February 4, 2017 06:09
my book duo (16tb) linux format
  1. install WD Drive Utilities on Mac OS
  2. convert to JBOD/EXFAT and turn off Drive Sleep
  3. plug into linux
sudo parted /dev/sd<num>
print
rm 1 (and others)
mklabel gpt
unit TB
@linktohack
linktohack / index.php
Created June 20, 2016 07:20
Adminer 4.2.5 loader without password for SQLite
<?php
function adminer_object() {
class AdminerSoftware extends Adminer {
function login($login, $password) {
return true;
}
}
return new AdminerSoftware;
}
include "./adminer-4.2.5.php";