This file contains hidden or 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
| host = unix.gethostname() | |
| c1, c2, c3 = string.byte(GetRandomBytes(1)), string.byte(GetRandomBytes(1)), string.byte(GetRandomBytes(1)) | |
| function OnHttpRequest() | |
| Write([[<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Hello World!</title> | |
| </head> |
This file contains hidden or 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
| const std = @import("std"); | |
| pub fn build(b: *std.build.Builder) void { | |
| // Standard target options allows the person running `zig build` to choose | |
| // what target to build for. Here we do not override the defaults, which | |
| // means any target is allowed, and the default is native. Other options | |
| // for restricting supported target set are available. | |
| const target = b.standardTargetOptions(.{}); | |
| // Standard release options allow the person running `zig build` to select |
This file contains hidden or 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
| # To unbundle, run this file | |
| echo tis/as.y | |
| sed 's/.//' >tis/as.y <<'//GO.SYSIN DD tis/as.y' | |
| -%{ | |
| -#include <u.h> | |
| -#include <libc.h> | |
| -#include <bio.h> | |
| -#include <ctype.h> | |
| - | |
| -#include "tis.h" |
This file contains hidden or 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 DNS fuckery | |
| do-not-query-localhost: no | |
| private-domain: "home.arpa" | |
| local-zone: "0.0.10.in-addr.arpa." nodefault | |
| domain-insecure: "home.arpa" | |
| domain-insecure: "0.0.10.in-addr.arpa" | |
| private-address: 10.0.0.0/8 | |
| stub-zone: |
This file contains hidden or 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 ( | |
| "fmt" | |
| "github.com/miekg/dns" | |
| ) | |
| func negrcode(w dns.ResponseWriter, r *dns.Msg) { | |
| m := new(dns.Msg) |
This file contains hidden or 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/ksh | |
| daemon="/usr/local/bin/node_exporter" | |
| rc_bg=YES | |
| . /etc/rc.d/rc.subr | |
| rc_reload=NO | |
| rc_cmd $1 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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" |