Skip to content

Instantly share code, notes, and snippets.

View hauleth's full-sized avatar
Click! Clack!

Łukasz Jan Niemier hauleth

Click! Clack!
View GitHub Profile
kconner / macOS
Last active November 28, 2023 18:53
macOS Internals
View macOS

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

angerman /
Last active July 26, 2023 20:36
Installing nix on macOS BigSur

The website suggests to use:

sh <(curl -L

For macOS on Intel (x86_64) or Apple Silicon (arm64) based macs, we need to use

sh <(curl -L --darwin-use-unencrypted-nix-store-volume
xirixiz / pihole-macvlan-synology-docker.txt
Last active October 22, 2023 11:58
Add a PiHole instance on a macvlan enabled Docker network (Synology eth0 example)
View pihole-macvlan-synology-docker.txt
# NAS IP: in this example
# DHCP scope reservation for macvlan: (Details below)
## Network:
## HostMin:
## HostMax:
## Hosts/Net: 14
# Create a Synology macvlan0 bridge network attached to the physical eth0, and add the ip range scope (sudo)
timcharper /
Last active October 22, 2023 13:05
Macvlan using systemd


yum install -y systemd-networkd
modprobe macvlan # make sure this returns no errors

Put config files in place and mac0.{netdev,network} go in /etc/systemd/network/

thequux /
Last active May 31, 2016 22:35
Multirust-compatible racer wrapper

This wrapper automatically sets the RUST_SRC_DIRECTORY environment variable for whatever rust compiler is currently active, automatically creating a new checkout whenever necessary. This should be compatible with all of the multirust-alike tools, but it has only been tested with


Simply place this somewhere on your path before the main racer binary and set the execute bit.


paragonie-scott /
Last active November 9, 2023 18:59
An Open Letter to Developers Everywhere (About Cryptography)
andkerosine / raskell.rb
Created August 15, 2012 05:56
Haskell-like list comprehensions in Ruby
View raskell.rb
$stack, $draws = [], {}
def method_missing *args
return if args[0][/^to_/]
$stack << { |a| a or $stack.pop }
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :<
class Array
def +@
piscisaureus /
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

isa / gist:2571012
Created May 1, 2012 20:10
Convert in less than 30 lines
View gist:2571012
Question: Convert following into the latter data structure in less than 30 lines:
A, B, C
A, C, E
E, F, D
D, A, J
E, D, J
amscotti / mongo_urlshortener.rb
Created April 2, 2012 20:04
Example of using MongoMapper and Sinatra to make an url shortener -
View mongo_urlshortener.rb
require "rubygems"
require "sinatra"
require "haml"
require "mongo_mapper"
class Shorten
include MongoMapper::Document
key :url, String
key :shorten_id, String