Skip to content

Instantly share code, notes, and snippets.


Ian Mariano ianmariano

View GitHub Profile
ianmariano / pfxextract
Created Mar 12, 2020
pfxextract to extract unencrypted key and certs from a pfx certificate file. Copy somewhere in your path and chmod +x it.
View pfxextract
#!/usr/bin/env bash
set -Eeuo pipefail
_usage() {
cat <<__EOF
$0 usage:
$0 [options]
ianmariano / git-sync-all-upstream
Last active Mar 27, 2020
Sync (reset) your local and origin branches to canonical upstream branches. For when you want to hard reset everything to upstream. Add to your PATH and make executable. Do git sync-all-upstream
View git-sync-all-upstream
#!/usr/bin/env bash
set -Eeuo pipefail
_die() {
echo "$*" >&2
exit 1
bold=$(tput bold)
ianmariano /
Last active Sep 21, 2017
little thing to scan files for urls and get you a status about them
# for the love of bacon!
# by Ian Mariano @ianmariano
# Free and provided AS-IS with no warranty. No license required.
import os
import mimetypes
import re
import sys
ianmariano / git-tagrelease
Last active Jan 28, 2017
Quick and dirty tag and release notes git plugin. Put in path and chmod +x it. git tagrelease -h for instructions.
View git-tagrelease
usage() {
cat << __EOF
git tagrelease usage:
git tagrelease [options]
View gist:9c0d5005e9ed58fb36add56d5d1f3507
wget -q -O - | sudo apt-key add -
sudo sh -c 'echo deb binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
ianmariano / genhash
Created Dec 4, 2014
generate a base-64 encoded sha-256 password hash with openssl on the command line
View genhash
# generate an SHA-256 password hash base64 encoded
echo -n "password" | openssl dgst -sha256 -binary | openssl base64
# better yet, use pepper (suffix the password with the pepper)
echo -n "passwordpepper" | openssl dgst -sha256 -binary | openssl base64
# better yet, use salt (prefix the password with the salt)
echo -n "saltpassword" | openssl dgst -sha256 -binary | openssl base64
ianmariano / cassandra-service
Last active Aug 29, 2015
Firing up Cassandra, OpsCenter and a DataAgent locally on OS X for development. This has some presumptions like the install locations (change to suit your purposes). This also presumes these services have already been configured and run properly without resorting to this script. Add to your path and chmod a+x it.
View cassandra-service
ianmariano / install-oracle-java-8-ubuntu
Created Oct 26, 2014
Install Oracle Java 8 Ubuntu
View install-oracle-java-8-ubuntu
sudo add-apt-repository ppa:webupd8team/java
sudo aptitude update
sudo aptitude install oracle-java8-installer oracle-java8-set-default
View nokogiri cygwin
Make sure libxml2-devel, libxslt-devel and libiconv-devel are installed:
$ gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib --with-xslt-dir=/usr/include/libxslt --with-iconv-include=/usr/include --with-iconv-lib=/usr/lib
ianmariano / git-change-committer
Created Jun 19, 2014
Rewrite an author/committer in your git history. Place on your path and do: git change-committer name new_name new_email
View git-change-committer
usage() {
echo "$0 usage:"
echo " $0 name new_name new_email"
exit 1
if [ "$#" -ne 3 ]; then
You can’t perform that action at this time.