Skip to content

Instantly share code, notes, and snippets.

@ukutaht
ukutaht / migration.sql
Created November 18, 2021 09:34
[Plausible Analytics] Clickhouse primary key migration
-- new events table
CREATE TABLE events_v2
(
`timestamp` DateTime Codec(DoubleDelta, LZ4),
`name` String,
`domain` String,
`user_id` UInt64,
`session_id` UInt64,
`hostname` String,
`pathname` String,
@Shoozza
Shoozza / install_luarocks_windows_10.md
Last active March 10, 2024 09:34
Installing Luarocks on Windows with MSYS2 and gcc

Installing Luarocks on Windows

Getting Luarocks to work on Windows 8.1/10 with MSYS2 gcc (mingw64)

1. MSYS2 installation

  1. Visit https://www.msys2.org/
  2. Click on the link next to "Download the installer"
  3. Run the installer
  4. Add "C:\msys64\usr\bin" to path
@gekigek99
gekigek99 / get process tree pids.go
Last active September 4, 2024 21:13
Get the child processes pids of a process (retrieve the complete process tree)
// This is a script to retrieve the child processes pids of a process (retrieve the complete process tree)
// Tn this example the process identified by pid 7400 is used
// (please to run the test chose a process pid that has at least 1 child process)
// (tested on windows)
package main
import (
"fmt"
"syscall"
@ityonemo
ityonemo / test.md
Last active March 12, 2025 13:39
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@rgl
rgl / http-server-shutdown.go
Created December 23, 2020 07:02
go http server with graceful shutdown
package main
import (
"context"
"flag"
"log"
"net/http"
"os"
"os/signal"
"time"
@probonopd
probonopd / Wayland.md
Last active March 15, 2025 19:01
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:

@charly-k
charly-k / debloat-lenovo.sh
Created April 12, 2020 17:24
Android debloat for Lenovo Smart Tab M10 (X605L)
pm disable-user --user 0 com.android.chrome
pm disable-user --user 0 com.google.android.apps.docs
pm disable-user --user 0 com.google.android.apps.maps
pm disable-user --user 0 com.google.android.apps.photos
pm disable-user --user 0 com.google.android.apps.tachyon
pm disable-user --user 0 com.google.android.gm
pm disable-user --user 0 com.google.android.googlequicksearchbox
pm disable-user --user 0 com.google.android.music
pm disable-user --user 0 com.google.android.talk
pm disable-user --user 0 com.google.android.videos
@thales17
thales17 / msys2-SDL2-Setup.md
Last active November 27, 2024 12:17
msys2 sdl2 setup

Download and install msys2 64bit

Update msys2

  • Update msys2 64bit after install by running pacman -Syu if pacman needs to be updated you might have to close and reopen the terminal and run pacman -Syu again

Install build tools

  • pacman -S git mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_mixer mingw64/mingw-w64-x86_64-SDL2_image mingw64/mingw-w64-x86_64-SDL2_ttf mingw64/mingw-w64-x86_64-SDL2_net mingw64/mingw-w64-x86_64-cmake make

Compile Hello World

@chexxor
chexxor / TEA_Wrong_For_Web.md
Last active February 10, 2025 20:45
The Elm Architecture is the wrong abstraction for the web

The Elm Architecture is the wrong abstraction for the web

In this article, I'd like to explain why I think The Elm Architecture is fine for small components, but quite harmful for websites based on pages.

Definition and Pros/Cons

First, let's clarify what I mean by "The Elm Architecture".

The Elm Architecture's webpage describes it pretty well.

@nzec
nzec / README.MD
Last active March 11, 2025 06:29
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb