Skip to content

Instantly share code, notes, and snippets.

@ncfavier
ncfavier / gaston.S
Last active June 4, 2019 20:40
GASton serves index.html on port 8080.
# to compile:
# gcc gaston.S -nostdlib -no-pie
#define SYS_WRITE 1
#define SYS_OPEN 2
#define SYS_CLOSE 3
#define SYS_LSEEK 8
#define SYS_SENDFILE 40
#define SYS_SOCKET 41
#define SYS_ACCEPT 43
@martijnvermaat
martijnvermaat / nixos.md
Last active May 6, 2025 02:13
Installation of NixOS with encrypted root
@mbbx6spp
mbbx6spp / 00README.adoc
Last active February 8, 2021 01:39
My ${HOME}/.nixpkgs/config.nix to setup my dev and desktop environments the way I like them :)

User env setup

Setup your user environment just the way you want with Nix.

  1. Add packageOverrides to the attrset returned by your ${HOME}/.nixpkgs/config.nix (see my example above).

  2. Then with one command you can setup your whole environment: nix-env -i desktop-mbbx6spp.

Then all you need is a simple ~/.bash_profile script like so:

#!/usr/bin/env bash
# depends: dmenu slop xdotool
# assumes next spawned window will be floating/moveable by xdotool.
# get program name to launch using dmenu cache:
cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
if [ -d "$cachedir" ]; then
cache=$cachedir/dmenu_run
else
cache=$HOME/.dmenu_cache # if no xdg dir, fall back to dotfile in ~
@kevashcraft
kevashcraft / daily_backup
Last active December 2, 2018 22:43
Recursive backup w rsync - bash script
#!/bin/bash
DESTINATION="/Backup"
SOURCE="/var/www"
#Todays date in ISO-8601 format:
DAY0=`date -I`
#Previous backup date:
@xero
xero / irc.md
Last active May 6, 2025 20:51
irc cheat sheet
@romainl
romainl / _rnb.md
Last active November 24, 2024 19:50
RNB, a Vim colorscheme template
@muse
muse / Meowipsum
Last active June 1, 2022 19:29
Basically cat speak.
#!/usr/bin/env python
# Made by 'Mirko van der Waal'
# Distributed under terms of the MIT license.
from random import randint
from sys import argv, exit
import getopt
mews = [
# 3

Mac OS X 10.13 High Sierra

Custom recipe to get OS X 10.11 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a fresh install. On average, I reinstall each computer from scratch just... whenever, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@nilsding
nilsding / jsonfs.rb
Created November 17, 2014 18:40
JSONfs - the JSON file system
#!/usr/bin/ruby
# JSONfs - the JSON file system
# (c) 2014 nilsding
# License: GPLv2
#
# Requires RFuse, install it via `gem install rfuse`
#
# Based on the RFuse sample file system:
# https://github.com/lwoggardner/rfuse/blob/master/sample/test-ruby.rb
# (c) 2014 lwoggardner