Skip to content

Instantly share code, notes, and snippets.

@w4tson
w4tson / tar fu
Last active October 25, 2017 10:55
#
# Find all files in the last 45 mins, print them null separated and from that create an new tgz using standard-in as a file
#
find . -cmin -45 -type f -print0 | tar -cvzf ../../foo.tgz --null -T -
#
# Same as above however first searches for .nexus|.meta dir and prunes.
#
find . -not \( -name \.nexus -prune \) -not \( -name \.meta -prune \) -not \( -name central-m1 -prune \) -cmin -45 -type f -print0 | tar -cvzf ../../foo.tgz --null -T -
@avernet
avernet / mssql-server-linux-fts.sh
Created October 23, 2017 17:25
SQL Server Docker instance with full-text search (FTS)
# mssql-agent-fts-ha-tools
# Maintainers: Microsoft Corporation (LuisBosquez and twright-msft on GitHub)
# GitRepo: https://github.com/Microsoft/mssql-docker
# Base OS layer: Latest Ubuntu LTS + mssql-server-linux (SQL Server engine + tools)
FROM microsoft/mssql-server-linux
#Install curl since it is needed to get repo config
# Get official Microsoft repository configuration
RUN export DEBIAN_FRONTEND=noninteractive && \
@vanbroup
vanbroup / ocsp-request-script.sh
Created March 19, 2018 12:43
Make an OCSP request with bash via OpenSSL and and obtain the certificate (chain) from the TLS handshake, replay the request with CURL.
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo
echo "No hostname given to obtain certificate status"
echo "\tuse: $0 www.example.com"
echo
exit 1
fi