Skip to content

Instantly share code, notes, and snippets.

View haze's full-sized avatar
💭
If it's not a challenge I’m not interested

haze

💭
If it's not a challenge I’m not interested
View GitHub Profile
@arch1t3cht
arch1t3cht / video_noob_guide.md
Last active January 8, 2026 03:32
What you NEED to know before touching a video file

What you NEED to Know Before Touching a Video File

Hanging out in subtitling and video re-editing communities, I see my fair share of novice video editors and video encoders, and see plenty of them make the classic beginner mistakes when it comes to working with videos. A man can only read "Use Handbrake to convert your mkv to an mp4 :)" so many times before losing it, so I am writing this article to channel the resulting psychic damage into something productive.

If you are new to working with videos (or, let's face it, even if you aren't), please read through this guide to avoid making mistakes that can cost you lots of computing power, storage space, or video quality.

@Juke34
Juke34 / guix.md
Last active October 19, 2024 11:30
Guix installation on Mac M2

How to install GUIX on M2 Mac computer

Downloading & installing UTM

You need to install the UTM virtual machine manager In your browser, go to mac.getutm.app, and click on the Download button.

Mount the downloaded UTM.dmg disk-image and drag the UTM app to the Applications folder. Next, launch the UTM app from your Mac’s local Applications folder. (Depending on your Mac’s security settings, you may get a confirmation dialog when you launch UTM for the first time. If such a dialog appears, choose Open.)

@mikdusan
mikdusan / commands.sh
Created October 3, 2021 05:09
llvm13 build on macos
# ### THIS IS A LINE-SPLIT OF THE FOLLOWING COMMAND ###
#
# export PATH=/usr/bin:/bin:/usr/sbin:/sbin
# export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
# export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
#
# /opt/local-2021.02/bin/cmake -G Ninja \
# -DCMAKE_MAKE_PROGRAM=/opt/local-2021.02/bin/ninja \
# -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_INSTALL_PREFIX=/opt/llvm-macos11.0-x86_64-13.0.0-release \
@vi
vi / interesting_crates.md
Last active November 7, 2025 12:53
List of crates that improves or experiments with Rust, but may be hard to find

Let's list here crates that enhance Rust as a language.

It not "batteries" like in stdx, but Rust-specific crates for workarounds for various missing features and experimental ideals from non-accepted/postponed RFCs, or just hacky tricks.

The list is supposed to contain (mostly) crates that are internal to Rust, not ones for making Rust deal with "external world" like other languages bindings, file formats, protocols and so on.

Primary focus should be on crates that are not easy to find by conventional means (e.g. no algorithm name, format or protocol to search for).

Note that quality of the listed crates may vary from proof-of-concept to stable-and-widely-used.

@kprotty
kprotty / AutoResetEvent.cfg
Last active January 11, 2021 02:05
Formally proving the correctness of synchronization primitives
INIT Init
NEXT Next
CONSTANT Setters = 3
INVARIANTS
IsEventuallySet
NoWaiterDeadlock
@a1ip
a1ip / hostname.md
Last active April 24, 2025 13:33
How to set the Mac hostname or computer name from the terminal

How to set the Mac hostname or computer name from the terminal

  1. Open a terminal.
  2. Type the following command to change the primary hostname of your Mac: This is your fully qualified hostname, for example myMac.domain.com
sudo scutil --set HostName <new host name>
  1. Type the following command to change the Bonjour hostname of your Mac: This is the name usable on the local network, for example myMac.local.
@LnL7
LnL7 / configuration.nix
Last active September 2, 2025 20:07
NixOS configuration overlays
{ config, pkgs, ... }:
let
# Import unstable channel.
# sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
# sudo nix-channel --update nixpkgs-unstable
unstable = import <nixpkgs-unstable> {};
in
{
@DeflatedPickle
DeflatedPickle / MinecraftEnergyTypes.md
Last active December 8, 2025 22:06
A simple table for Minecraft energy types and a matrix for conversion rates.

Minecraft Energy Types


Energy Name Abbreviation Original Mod Version
Anima AM Anima-Mundi 1.11.2
Blutricity BE (NO) Redpower 1.6.4
Charge RP (NO)/Fz? Factorization 1.7.10
Crystal Flux CF Actually Additions 1.12
@andrewrk
andrewrk / 3let.py
Created February 15, 2016 03:27
origin of the zig programming language name. https://github.com/andrewrk/zig/
import string
import random
vowels = "aoeuiy"
def m():
c1 = vowels[random.randint(0,len(vowels)-1)]
c2 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)]
c3 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)]
print('z' + c1 + c2 + c3)
m()