Skip to content

Instantly share code, notes, and snippets.

View arvati's full-sized avatar
💭
Studying online

Ademar Arvati arvati

💭
Studying online
View GitHub Profile
@leandronsp
leandronsp / 001-server.bash
Last active May 21, 2025 10:02
A complete yet simple Web server (with login & logout system) written in Shell Script
#!/bin/bash
## Create the response FIFO
rm -f response
mkfifo response
function handle_GET_home() {
RESPONSE=$(cat home.html | \
sed "s/{{$COOKIE_NAME}}/$COOKIE_VALUE/")
}
@marvinhagemeister
marvinhagemeister / bind-plugin.ts
Last active June 8, 2025 06:48
Preact Signals `bind:value`
import { options } from "preact";
import { Signal } from "@preact/signals";
// Add `bind:value` to JSX types
declare global {
namespace preact.createElement.JSX {
interface HTMLAttributes {
"bind:value"?: Signal<string | string[] | number | undefined>;
}
}
@supechicken
supechicken / privileged-crostini.md
Last active January 10, 2026 17:51
[Guide] Obtain full access to the underlying VM inside Crostini containers

Obtain full access to the underlying VM inside Crostini containers

Overview

As you might know, all Crostini containers are running under the "unprivileged container" mode and are kind of restricted, which means:

  • Unable to load any kernel modules
  • Unable to mount any disk/loopback images natively (although you could use FUSE to achieve a similar result, that's complicated to use)
  • Unable to setup device mappers

So what's the solution? This guide will cover things below: