Skip to content

Instantly share code, notes, and snippets.

View theraphim's full-sized avatar

Paul Komkoff theraphim

View GitHub Profile
@theraphim
theraphim / kg.zone
Created June 9, 2019 16:00
Complete .KG zone circa 1999
[ns.kg]
$ORIGIN KG.
@ 8H IN SOA ns adm.infotel (
3000020308 ; serial
8H ; refresh
2H ; retry
1W ; expiry
1D ) ; minimum
1D IN NS ns
@theraphim
theraphim / kg.zone
Created June 9, 2019 16:00
Complete .KG zone circa 1999
[ns.kg]
$ORIGIN KG.
@ 8H IN SOA ns adm.infotel (
3000020308 ; serial
8H ; refresh
2H ; retry
1W ; expiry
1D ) ; minimum
1D IN NS ns
@theraphim
theraphim / percona-xtrabackup.spec
Created October 31, 2016 17:52
specfile for Percona xtrabackup 2.4.4
%global pxbu_major_minor 24
Summary: Online backup for InnoDB/XtraDB in MySQL, Percona Server and MariaDB
Name: percona-xtrabackup
Version: 2.4.4
Release: 1%{?dist}
License: GPLv2
URL: http://www.percona.com/software/percona-xtrabackup/
Source: https://github.com/percona/%{name}/archive/%{name}-%{version}.tar.gz
Source1: boost_1_59_0.tar.bz2
#define PLUGIN_VERSION ("mIRCAMP 2 (c) 2001, Stingray // (http)stingr.net")
#define WINAMP_WINDOW_CLASS ("Winamp v1.x")
#define WINAMP_PLAYLIST_DEFAULT ("C:\\Program Files\\Winamp\\Winamp.m3u")
#define WINAMP_PLAYLIST_SHORT_DEFAULT ("Winamp.m3u")
// winamp
HWND FindWinampWindow() {
return FindWindow(WINAMP_WINDOW_CLASS, NULL);
}
from db4 import *
import re, sys
fd_re = re.compile("^(\S+)\((\d+)\)$", re.I)
cvt = {
"varchar" : "varbinary",
"char" : "binary",
"text" : "blob",
"tinytext" : "tinyblob",
"mediumtext": "mediumblob",
#! /usr/bin/env python
import sys
from pychart import *
from roundup import instance
# open the instance
if len(sys.argv) < 2:
print 'You need to specify an instance home dir'
instance_home = sys.argv[1]
instance = instance.open(instance_home)
{-#LANGUAGE ScopedTypeVariables#-}
import Text.Read
import System.IO
prompt :: String -> IO String
prompt text = do
putStr text
hFlush stdout
getLine
fib(0, A, _, A).
fib(N, A, B, F) :- N1 is N - 1, Sum is A + B, fib(N1, B, Sum, F), !.
fib(N, F) :- fib(N, 0, 1, F), !.
fib(0, 0).
fib(1, 1).
fib(N, NF) :-
A is N - 1, B is N - 2,
fib(A, AF), fib(B, BF),
NF is AF + BF.
gcd(X, Y, G) :- X = Y, G = X, !.
gcd(X, Y, G) :-
X < Y,
Y1 is Y mod X,
(Y1 = 0 -> G = X; gcd(X, Y1, G)), !.
gcd(X, Y, G) :- X > Y, gcd(Y, X, G), !.