Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sys
import idna
def main():
for line in sys.stdin:
line = line.rstrip()
map $host $host_or_hyphen {
default $host;
"" -;
}
log_format lighttpd
'$remote_addr $host_or_hyphen $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" "$http_user_agent"';
access_log /var/log/nginx/access.log lighttpd;
server {
listen 80;
location /.well-known/acme-challenge/ {
root /path/to/certbot;
try_files $uri @redirect;
}
location @redirect {
return http://xmpp-server.example.com$request_uri;
}
server_name example.com www.example.com;
Source: curl
Section: web
Priority: optional
Maintainer: Ubuntu Developers <[email protected]>
XSBC-Original-Maintainer: Alessandro Ghedini <[email protected]>
Uploaders: Ian Jackson <[email protected]>
Build-Depends: debhelper (>= 9),
autoconf,
automake,
ca-certificates,
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright (c) 2014, 2016 Matt Nordhoff <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
#!/usr/bin/env python
import sys
import argparse
import lzma
def compressor(infile, outfile):
with lzma.open(outfile, 'w') as lzf:
lzf.write(infile)
#!/usr/bin/env python
import sys
import getopt
import lzma
def compressor(infile, outfile):
with lzma.open(outfile, "w") as f:
f.write(infile)
@mnordhoff
mnordhoff / ww.pl
Last active August 29, 2015 13:56
use vars qw($VERSION %IRSSI);
$VERSION = '0.1';
%IRSSI = (
authors => 'Matt Nordhoff',
contact => '[email protected]',
description => "/w/w 10",
name => 'ww',
);
sub send_text {
server {
listen 80;
listen [::]:80;
location / {
return 301 http://www.beta.grundclock.com$request_uri;
}
server_name .beta.grundclock.com;
}
server {
66.249.64.3 1.m0n0wall.pool.ntp.org - [14/Nov/2013:01:43:35 +0000] "GET /?a=b&t=z&s=1GiB HTTP/1.1" 301 184 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
2001:470:5:932:2e0:b8ff:febb:161b mtr-atlanta.mn9.us - [14/Nov/2013:02:21:36 +0000] "GET / HTTP/1.1" 200 892 "-" "Mozilla/5.0 (X11; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0"
2001:470:5:932:2e0:b8ff:febb:161b mtr-atlanta.mn9.us - [14/Nov/2013:02:21:37 +0000] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (X11; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0"
2001:470:5:932:2e0:b8ff:febb:161b mtr-atlanta.mn9.us - [14/Nov/2013:02:21:37 +0000] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (X11; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0"