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
local io = require "io" | |
local math = require "math" | |
local M = {} | |
M.__index = M | |
function M:reset() |
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
local os = require("os") | |
local ffi = require("ffi") | |
-- luajit ffi declarations | |
ffi.cdef[[ | |
typedef int32_t pid_t; | |
pid_t fork(void); | |
int close(int d); |
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
/* fisher-yates shuffle */ | |
void | |
shuffle(void *base, long nel, long width) | |
{ | |
unsigned char *b, *swap1, *swap2; | |
long i, j, k; | |
b = base; | |
for(i = nel - 1; i > 0; i--){ | |
j = nrand(i); | |
swap1 = &b[i*width]; |
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
package main | |
import ( | |
"flag" | |
"log" | |
"net/http" | |
"os" | |
"golang.org/x/net/proxy" | |
goproxy "gopkg.in/elazarl/goproxy.v1" |
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
# /etc/systemd/system/etcd2.service.d/90-token.conf | |
[Service] | |
Environment="ETCD_DISCOVERY=https://discovery.etcd.io/12345678901234567890123456789012" |
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
# Copyright 1999-2016 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# $Id$ | |
EAPI=5 | |
inherit games versionator | |
DESCRIPTION="Cataclysm - Dark Days Ahead" | |
HOMEPAGE="http://en.cataclysmdda.com/" |
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
set gfxmode=1920x1080 | |
set gfxpayload=keep | |
terminal_output gfxterm |
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
package main | |
import ( | |
"bytes" | |
"compress/bzip2" | |
"flag" | |
"fmt" | |
"io" | |
"net/http" | |
"os" |
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
coreos: | |
update: | |
reboot-strategy: "reboot" | |
locksmith: | |
window-start: "14:00" | |
window-length: "2h" |
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
CTX=etcd.yaml.tmpl.ctx | |
etcd: CONFS=$(addsuffix .json, $(shell cat .hosts)) | |
etcd: $(CTX) $(ROOT)/bin/templater .hosts | |
make $(CONFS) | |
install: CONFS=$(addsuffix .json, $(shell cat .hosts)) | |
install: etcd .hosts | |
scp $(CONFS) $(CONFIG_TARGET)/ignition/ |