As a highly trained academic researcher, I spend a lot of time trying to advance the frontiers of human knowledge. However, as someone who was born in the South, I secretly believe that true progress is a fantasy, and that I need to prepare for the end times, and for the chickens coming home to roost, and fast zombies, and slow zombies, and the polite zombies who say "sir" and "ma'am" but then try to eat your brain to acquire your skills. When the revolution comes, I need to be prepared; thus, in the quiet moments, when I'm not producing incredible scientific breakthroughs, I think about what I'll do when the weather forecast inevitably becomes RIVERS OF BLOOD ALL DAY EVERY DAY. The main thing that I ponder is who will be in my gang, because the likelihood of post-apocalyptic survival is directly related to the size and quality of your rag-tag group of associates. There are some obvious people who I'll need to recruit: a locksmith (to open doors); a demolitions expert (for when the locksmith has run out of i
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# From http://hewo.xedoloh.com/2015/04/base-256/ | |
# Usage: | |
# name256 | |
# Generate a random base256 word | |
# Example: | |
# $ name256 | |
# vic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$(id -u)" != 0 ]; then echo "This script needs to run as root so that it can execute MySQL" >&2; exit 1; fi | |
# Start MySQL (in the background) | |
runuser -u mysql -- /usr/sbin/mysqld --pid-file=/run/mysqld/mysqld.pid & | |
sleep 5 | |
# Need to set this to avoid apachectl talking to systemd | |
export APACHE_STARTED_BY_SYSTEMD=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Source of MySQL Raytracer -- https://www.pouet.net/prod.php?which=83222 | |
* Pasted here for convenience, see original for copyright information */ | |
/* MySQL raytracing engine by Nick (holtsetio@gmail.com) */ | |
Select if(repeat(char( | |
/* Parameters */ | |
@w := 100, /* width of the output in pixels */ | |
@h := 100, /* height of the output in pixels */ | |
@cam.x := 0.0, /* x-position of the camera */ | |
@cam.y := 0.0, /* y-position of the camera */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Block domains from duckduckgo | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description A userscript to remove search results from specific domains | |
// @author Remi Rampin <remirampin@gmail.com> | |
// @match https://duckduckgo.com/* | |
// ==/UserScript== | |
// https://gist.github.com/remram44/407be77a5649e2c816064a7ac0132ac0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Readable version of https://ctrlc.hu/~stef/jails.txt
From this comment: https://news.ycombinator.com/item?id=30824936
function | bwrap | nsjail | minijail |
---|---|---|---|
LoC | 3K c | 15K c, 4K c++ | 12K c, 3K c++, 3K py, 1K rust |
vendor | redhat | (not)google | |
user ns | default / disable with --share-user | --disable_clone_newuser | -U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def listdir_relative(path): | |
result = [] | |
cwd = os.getcwd() + '/' | |
for entry in listdir(path): | |
if not entry.startswith(cwd): | |
fail('Unexpected entry ' + entry) | |
entry = entry[len(cwd):] | |
result.append(entry) | |
return result |
NewerOlder