Skip to content

Instantly share code, notes, and snippets.

@daz
daz / generate-silence.sh
Created October 23, 2017 07:25
Generate a silent AAC audio with ffmpeg
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a
@nov05
nov05 / 20250618_generative_ai_with_langchain_chapter9_ray.md
Last active June 21, 2025 00:21
20250618_generative_ai_with_langchain_chapter9_ray
root ➜ /workspaces/generative_ai_with_langchain (second_edition) $ cd chapter9/ray
root ➜ /workspaces/generative_ai_with_langchain/chapter9/ray (second_edition) $ python build_index.py
2025-06-19 00:26:35,100 INFO worker.py:1841 -- Started a local Ray instance.
modules.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████| 349/349 [00:00<00:00, 2.21MB/s]
config_sentence_transformers.json: 100%|███████████████████████████████████████████████████████████████████████████████| 116/116 [00:00<00:00, 1.11MB/s]
README.md: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 10.4k/10.4k [00:00<00:00, 2.99MB/s]
sentence_bert_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████| 53.0/53.0 [00:00<00:00, 422kB/s]
config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 571/571 [00:00<00:00, 1.5
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active June 21, 2025 00:19
Conventional Commits Cheatsheet
@davepeck
davepeck / FIREHOSE.md
Last active June 21, 2025 00:15
Zero-dependency Python script to decode the Bluesky firehose

Zero-dependency Python script to decode the Bluesky Firehose

This is a pure Python implementation of code necessary to decode the Bluesky Firehose's low-level binary data format.

It does not depend on any third-party libraries for decoding; we implement DAG_CBOR and CARv1 decoding ourselves.

To run this, install Astral's UV.

Then:

@t3dotgg
t3dotgg / try-catch.ts
Last active June 21, 2025 00:00
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@vay3t
vay3t / breachcompilation.txt
Created December 19, 2017 14:59
1.4 billion password breach compilation wordlist
wordlist created from original 41G stash via:
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt
Then, compressed with:
7z a breachcompilation.txt.7z breachcompilation.txt
Size:

Setup tor proxy on Arch Linux

Copied from this article.

Installation

  1. Install tor

         $ sudo pacman -S tor
         $ ## nyx provides a terminal status monitor for bandwidth usage, connection details and more.

$ sudo pacman -S nyx

@mattmc3
mattmc3 / modern_sql_style_guide.md
Last active June 20, 2025 23:52
Modern SQL Style Guide
layout author title revision version description
default
mattmc3
Modern SQL Style Guide
2019-01-17
1.0.1
A guide to writing clean, clear, and consistent SQL.

Modern SQL Style Guide

@ThoNohT
ThoNohT / dehaskell.md
Last active June 20, 2025 23:50
Cleaning haskell packages from pacman

Cleaning up haskell packages on Arch Linux

In Arch Linux, all haskell packages are dynamically linked. This can be a headache for the user, since it results in a large amount of haskell-* packages being installed on your system, and the possibility for version conflicts. A way around this is to not depend on pacman at all for haskell packages, but manually install them. In this document I explain how I switched from a lot of haskell packages installed with pacman, to a few manually installed packages.

Finding packages to uninstall

To determine which packages to uninstall (and replace), a few tools are useful:

  • pacman itself
  • pacgraph
@IanKeen
IanKeen / EnvironmentValues.swift
Last active June 20, 2025 23:44
SwiftUI: Peek at/extract hidden environment values
import Foundation
import SwiftUI
extension EnvironmentValues {
public func value<T>(_: T.Type = T.self, forKey key: String) -> T? {
guard let value = first(where: { name($0, equals: key) }) else {
print("No EnvironmentValue with key '\(key)' found.")
return nil
}
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy