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 arm32v7/debian:stretch as builder | |
RUN apt-get update && apt-get install -y wget build-essential libffi-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev libffi-dev uuid-dev tk-dev | |
RUN wget -qO- https://github.com/openssl/openssl/archive/OpenSSL_1_1_1j.tar.gz | tar -xz -C /usr/src/ | |
RUN cd /usr/src/openssl-OpenSSL_1_1_1j && ./config -Wl,-Bsymbolic-functions -fPIC shared --prefix=/usr/local/openssl && make && make install && tar cvfz /openssl-1.1.1j.tar.gz /usr/local/openssl | |
ENV CFLAGS="-I/usr/local/openssl/include" LDFLAGS="-L/usr/local/openssl/lib" LD_LIBRARY_PATH="/usr/local/openssl/lib" PATH="/usr/local/openssl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" |
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" | |
"go/ast" | |
"go/parser" | |
"go/token" | |
) | |
var src = `package mypackage |
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/bash | |
# Sign a file with a private key using OpenSSL | |
# Encode the signature in Base64 format | |
# | |
# Usage: sign <file> <private_key> | |
# | |
# NOTE: to generate a public/private key use the following commands: | |
# | |
# openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048 | |
# openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem |
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/bash | |
# downloads latest version of an artifact from artifactory | |
set -e | |
usage(){ | |
echo "Usage: $*" >&2 | |
exit 64 | |
} |
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
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
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 ( | |
"crypto/tls" | |
"crypto/x509" | |
"fmt" | |
"io" | |
"log" | |
) |
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 | |
""" | |
xlsx2tsv filename.xlsx [sheet number or name] | |
Parse a .xlsx (Excel OOXML, which is not OpenOffice) into tab-separated values. | |
If it has multiple sheets, need to give a sheet number or name. | |
Outputs honest-to-goodness tsv, no quoting or embedded \\n\\r\\t. | |
One reason I wrote this is because Mac Excel 2008 export to csv or tsv messes | |
up encodings, converting everything to something that's not utf8 (macroman |