#!/usr/bin/env python
from __future__ import print_function
import argparse
import json
import sys
def process_args():
parser = argparse.ArgumentParser()
#/usr/bin/env python
import pygame
from pygame.locals import *
BLACK = (0, 0, 0)
View gist:87e2d67769cdae4993319f425afc9983
% python
Python 2.7.10 (default, Feb 7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class A(object):
... pass
>>> a = A()
>>> a.__class__.__dict__ is a.__class__.__dict__
View gist:f009b6a91bfb480f7d1aa4035913668b
% sudo pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (178 candidates): 100%
Processing candidates (178 candidates): 100%
Checking integrity... done (2 conflicting)
- postgresql95-client-9.5.7_1 conflicts with postgresql93-client-9.3.17_1 on /usr/local/bin/clusterdb
- postgresql95-client-9.5.7_1 conflicts with postgresql93-client-9.3.17_1 on /usr/local/bin/clusterdb
Checking integrity... done (0 conflicting)
View gist:82a191702081bcb35d2dc41080b9a861
root 1677 0.0 0.0 108188 1412 ? S 02:33 0:00 /bin/bash -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/sbin/rabbitmq-server
root 1679 0.0 0.0 108188 1480 ? S 02:33 0:00 /bin/sh /usr/sbin/rabbitmq-server
root 1699 0.0 0.0 145024 1608 ? S 02:33 0:00 su rabbitmq -s /bin/sh -c /usr/lib/rabbitmq/bin/rabbitmq-server
rabbitmq 1704 0.0 1.4 581156 30128 ? Ssl 02:33 0:11 /usr/lib64/erlang/erts-5.8.5/bin/beam -W w -K true -A30 -P 1048576 --
View gist:a6a31918ccf1baaa6d3f14abdf803bef

I've an idea for a merge sort variant that's been rattling around my head for a while.

The idea is that sorting is broken up into two phase: run identification and merging. This has some similarities to Timsort, but it's not quite the same thing.

In the run identification phase, runs are identified and recorded. There is some deperturbation to try an identify the longest runs possible near the potential end of runs where if the next element, x[i], is less than x[i-1] and x[i-2], it is swapped with x[i-1].

If no run longer than N can be identified since the last identified run by M elements, those M elements are sorted using insertion sort to create a run.

When we have a list of runs, we start merging adjacent pairs of runs, starting with the smallest adjacent pairs.

View rihannsu.c
/* Romulan word generator. */
/* Created by Diane Duane, */
/* ported to C by Curt Snyder */
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
/* initialize 'r' values */
char r[10][3] = {"H'","Ae","D'","W","U","N'","R'","O","V","Ll"};
View sshd_config
View gist:a45ab3cc4e0146edf29339d2692daf15
certbot tlsa (--pkix-ta|--dane-ta|--pkix-ee|--dane-ee)+ # Usage field
(--cert|--spki) # Selector field
(--full|--sha256|--sha512) # Matching-Type
--port NUM
--transport (tcp|udp|sctp)
$ certbot tlsa --dane-ee --spki --sha256 --port 587 --transport tcp
View mux.xml
<?xml version="1.0"?>
<mux xmlns="foo">
<epp xmlns="...">