Skip to content

Instantly share code, notes, and snippets.

View 641i130's full-sized avatar
🦀
Rewrite it in rust!

Caret 641i130

🦀
Rewrite it in rust!
View GitHub Profile
@martijnvermaat
martijnvermaat / nixos.md
Last active November 3, 2025 16:08
Installation of NixOS with encrypted root
@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active March 11, 2026 23:59
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
@mbostock
mbostock / .block
Last active December 8, 2025 18:16
Polar Clock III
license: gpl-3.0
height: 960
@JLeClerc
JLeClerc / Python Subprocess - tailing output (the best way)
Last active April 8, 2024 18:47
Python Subprocess - tailing output (the best way)
# Run a subprocess and parse output line-by-line in real-time
# Note: if running Python in Bash file, use unbuffered mode (python -u).
proc = subprocess.Popen(['bash', 'my_file.bsh'], bufsize=0, stdout=subprocess.PIPE)
for line in iter(process.stdout.readline, b''):
log.info(line.decode('utf-8')[:-1]) # [:-1] to cut off newline char
proc.stdout.close()
proc.wait()
result = proc.returncode
@mjohnsullivan
mjohnsullivan / http_server.rs
Last active October 19, 2025 16:19
Simple HTTP server example for Rust
// Updated example from http://rosettacode.org/wiki/Hello_world/Web_server#Rust
// to work with Rust 1.0 beta
use std::net::{TcpStream, TcpListener};
use std::io::{Read, Write};
use std::thread;
fn handle_read(mut stream: &TcpStream) {
let mut buf = [0u8 ;4096];
@stvhwrd
stvhwrd / website-dl.md
Last active July 2, 2025 22:31
Download an entire website for offline use with wget. Internal inks will be corrected so that the entire downloaded site will work as it did online.

The best way to download a website for offline use, using wget

There are two ways - the first way is just one command run plainly in front of you; the second one runs in the background and in a different instance so you can get out of your ssh session and it will continue.

First make a folder to download the websites to and begin your downloading: (note if downloading www.SOME_WEBSITE.com, you will get a folder like this: /websitedl/www.SOME_WEBSITE.com/)


STEP 1:

@Brainiarc7
Brainiarc7 / fstab-generate-arch.md
Last active March 24, 2026 03:14
Generate fstab in Arch Linux

First, install arch-install-scripts:

sudo pacman -S --needed arch-install-scripts

Secondly, mount your partitions in all the internal hard drives.

Thirdly, generate and validate your config by piping it out to stdout:

@felixjones
felixjones / pmx21.md
Last active May 12, 2026 12:00
PMX (Polygon Model eXtended) 2.0, 2.1 File Format Specifications

PMX (Polygon Model eXtended) 2.1

This is an English description of the .PMX file format used in Miku Miku Dance (MMD).

PMX is the successor to the .PMD format (Polygon Model Data).

This is work-in-progress! Please leave feedback in the comments.

Todo

@lirenlin
lirenlin / gist:9892945
Last active April 21, 2026 02:02
i3 wm, hide window title bar
@torkildr
torkildr / chromelight.py
Created January 28, 2014 09:13
Quick hack to make make Philips Hue light bulbs dim down when using Chromecast (or, more specifically, when certain apps are open).
#!/usr/bin/env python
import os
import requests
import libxml2
import time
import phue
import daemon
import lockfile
import signal