Skip to content

Instantly share code, notes, and snippets.

@necrobious
necrobious / gist:32263ca6cb5dfb6fcd82
Created January 22, 2015 17:39
TLS expiration date report
#!/bin/bash
doTLSCheck () {
echo [$1]
echo | openssl s_client -connect $1:443 -servername $1 2>/dev/null | openssl x509 -noout -dates | grep 'notAfter' | sed 's/notAfter=/expires: /g'
echo ''
}
for dom in "$@";
do
doTLSCheck "$dom";

Keybase proof

I hereby claim:

  • I am necrobious on github.
  • I am necrobious (https://keybase.io/necrobious) on keybase.
  • I have a public key whose fingerprint is E062 8562 9BD3 89E8 7A1B 3000 C3E2 9DA8 8290 E681

To claim this, I am signing this object:

@necrobious
necrobious / gist:02901a360795465366d3
Created September 17, 2014 23:50
Docker file for getting recent Oracle JDK installed on Ubuntu 14.04
# build with
# docker build -t 'necrobious/base-ubuntu-oracle-jdk' .
FROM ubuntu:14.04
MAINTAINER necrobious@gmail.com
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y upgrade
@necrobious
necrobious / gist:14d78ee9b4caff766152
Created July 12, 2014 18:56
Ubuntu 14.04 + GHC 7.8.3 + cabal-install 1.20.0.3
# build with
# docker build -t 'necrobious/haskell-ghc-7.8-64' .
FROM ubuntu:14.04
MAINTAINER necrobious@gmail.com
ENV DEBIAN_FRONTEND noninteractive
####### Install Dependencies ###################################################
RUN apt-get -y update
@necrobious
necrobious / gist:313e83a1932da1d63d41
Created June 30, 2014 23:14
Ubuntu 14.04 + GHC 7.8.2 + cabal-install 1.20.0.3
# build with
# docker build -t 'necrobious/haskell-ghc-7.8-64' .
FROM ubuntu:14.04
MAINTAINER necrobious@gmail.com
ENV DEBIAN_FRONTEND noninteractive
####### Install Dependencies ###################################################
RUN apt-get -y update
@necrobious
necrobious / gist:ed00120ff60478839154
Last active August 29, 2015 14:02
Scrape all of your instagram's standard size photos into an SQLite3 database.
#!/bin/bash
if [ "$#" -ne 1 ]; then
PROG=$(basename $0)
echo "Usage: $PROG <instagram_user_id>"
exit 1
fi
IGUSER=$1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My first program </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<script type="text/javascript">
// PRODUCTION MODE
$start = microtime(true);
return withWorkflowGateway($callback);
$duration = microtime(true) - $start;
$this->log(sprintf('withWorkflowGateway() took %.2f sec', $duration);