Skip to content

Instantly share code, notes, and snippets.

View pfeiferbit's full-sized avatar

Maximilian Pfeifer pfeiferbit

View GitHub Profile
package semaphore
// Semaphore channel
type Semaphore chan struct{}
// Acquire resource
func (s Semaphore) Acquire() {
s <- struct{}{}
}
@odan
odan / xampp_php7_xdebug.md
Last active April 9, 2025 13:07
Installing Xdebug for XAMPP
@Manishearth
Manishearth / hodor.rs
Last active January 1, 2023 00:34
yo dawg
#![recursion_limit = "300000"]
type CellType = u8;
const MEM_SIZE: usize = 30_000;
macro_rules! Hodor_impl {
/*
# Loop Extraction
@telent
telent / gist:9742059
Last active December 28, 2024 15:25
12 factor app configuration vs leaking environment variables
App configuration in environment variables: for and against
For (some of these as per the 12 factor principles)
1) they are are easy to change between deploys without changing any code
2) unlike config files, there is little chance of them being checked
into the code repo accidentally
3) unlike custom config files, or other config mechanisms such as Java