I hereby claim:
- I am notslang on github.
- I am slang (https://keybase.io/slang) on keybase.
- I have a public key whose fingerprint is 9A7C 41E7 279F 8032 42FE AF31 F6D1 7F02 3968 6E16
To claim this, I am signing this object:
/** | |
* Subtract timespec `b` from `a`. timespec `a` must be greater than `b`. | |
* @param res Where we put the result | |
* @param a timespec pointer for end time | |
* @param b timespec pointer for start time | |
*/ | |
void get_difference(timespec *res, timespec *a, timespec *b) { | |
if (a->tv_nsec < b->tv_nsec) { | |
res->tv_sec = a->tv_sec - b->tv_sec - 1; | |
res->tv_nsec = a->tv_nsec - b->tv_nsec + 1000000000; |
from datetime import datetime, date | |
from json import dumps | |
import fileinput | |
import re | |
import sys | |
# detect useless "page x of n" lines | |
page_regex = re.compile(r'^Page,[0-9]+,of,[0-9]+') | |
def parse_input(): |
# delete existing rules | |
iptables -F | |
# drop all traffic not explicitly allowed | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT DROP | |
# allow ping from inside | |
iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT |
const { ArgumentParser } = require('argparse') | |
const fs = require('fs') | |
const path = require('path') | |
const mkdirp = require('mkdirp') | |
const packageInfo = require('./package') | |
const argparser = new ArgumentParser({ | |
addHelp: true, | |
description: 'Extract files from an ignition config', | |
version: packageInfo.version |
I hereby claim:
To claim this, I am signing this object:
@ini_set('error_log', NULL); | |
@ini_set('log_errors', 0); | |
@ini_set('max_execution_time', 0); | |
@error_reporting(0); | |
@set_time_limit(0); | |
if(!defined("PHP_EOL")) | |
{ | |
define("PHP_EOL", "\n"); |
length | total | |
---|---|---|
0 | 140 | |
1 | 301 | |
2 | 1014 | |
3 | 2078 | |
4 | 4872 | |
5 | 2486 | |
6 | 2742 | |
7 | 4773 | |
8 | 8379 |
base58 = require 'bs58' | |
{ArgumentParser} = require 'argparse' | |
packageInfo = require '../package' | |
multihash = require '../src' | |
printJSON = (obj) -> | |
# print out one key/value per line, so (for example) piping into `wc -l` gives | |
# a count of the total supported functions | |
console.log JSON.stringify(obj, null, 1).replace(/\s*(\}|\{)\s*/gm, '$1') |
if (isset($_SERVER['HTTP_ORIGIN']) && in_array($_SERVER['HTTP_ORIGIN'], array('http://chazsouthard.com', 'http://localhost:1111'))) { | |
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"); | |
header('Access-Control-Allow-Credentials: true'); | |
header('Access-Control-Max-Age: 86400'); // cache for 1 day | |
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'; | |
} |