This file contains 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
#!/usr/bin/env python | |
import math | |
import sys | |
def main(argv=None): | |
if argv is None: | |
argv = sys.argv | |
if len(argv) != 3: | |
print >>sys.stderr, "Usage:",sys.argv[0],"<datafile1> <datafile2>" |
This file contains 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
#!/usr/bin/env python3 | |
"""Command generator for setting DHCP Option 119 | |
This script converts the specified domain names to DHCP Option 119 | |
(Domain Search Option) and prints commands for various DHCP servers. | |
USAGE: | |
./dhcp_option119.py DOMAIN ... | |
EXAMPLE: |
This file contains 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
from urllib import quote | |
class SSLRedirect(object): | |
def __init__(self,app): | |
self.app=app | |
def __call__(self,environ,start_response): | |
proto = environ.get('HTTP_X_FORWARDED_PROTO') or environ.get('wsgi.url_scheme', 'http') | |
if proto=='https': |
This file contains 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/sh | |
# This file goes in /etc/sysctl.d to set up a stable-privacy IPv6 Address | |
cat > 50-rfc7217.conf <<EOF | |
# Set up a secret for RFC7217 private static IPv6 address | |
net.ipv6.conf.default.stable_secret = $(hexdump -n 16 -e '7/2 "%04x:" 1/2 "%04x" "\n"' /dev/urandom) | |
EOF |
This file contains 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
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
bind-key a send-keys C-a |
This file contains 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 ( | |
"bytes" | |
"fmt" | |
"os" | |
"os/exec" | |
"strings" | |
) |
This file contains 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 ( | |
"context" | |
"fmt" | |
"math" | |
"time" | |
) | |
func main() { |
This file contains 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
FROM alpine:3.10 | |
RUN apk update && apk upgrade | |
RUN apk add openssl curl ca-certificates | |
RUN printf "%s%s%s\n" \ | |
"http://nginx.org/packages/mainline/alpine/v" \ | |
`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \ | |
"/main" \ | |
| tee -a /etc/apk/repositories | |
RUN curl -o /etc/apk/keys/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub | |
RUN apk add nginx |
This file contains 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" | |
"sync" | |
"time" | |
) | |
func main() { | |
go setter() |
This file contains 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
#!/usr/bin/env python | |
import time | |
import math | |
def main(): | |
#fout = open('spidev','w') | |
fout = open('/dev/spidev2.0', 'w') | |
ctr = 0 |
NewerOlder