Skip to content

Instantly share code, notes, and snippets.

Ian Mariano ianmariano

Block or report user

Report or block ianmariano

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ianmariano
ianmariano / git-sync-all-upstream
Last active Jun 14, 2019
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
ianmariano / baconscan.py
Last active Sep 21, 2017
little thing to scan files for urls and get you a status about them
View baconscan.py
# for the love of bacon!
# by Ian Mariano @ianmariano https://twitter.com/ianmariano https://github.com/ianmariano
#
# Free and provided AS-IS with no warranty. No license required.
#
import os
import mimetypes
import re
import sys
@ianmariano
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
#!/bin/bash
VERSION="20170125"
OUTPUT_FILE="./RELEASE_NOTES.md"
usage() {
cat << __EOF
git tagrelease usage:
git tagrelease [options]
View gist:9c0d5005e9ed58fb36add56d5d1f3507
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
@ianmariano
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
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
#!/bin/bash
CASSANDRA_HOME=/opt/apache/cassandra
OPSCENTER_HOME=/opt/apache/opscenter
CASS_LOG_DIR=$CASSANDRA_HOME/logs
CASS_LOGFILE=$CASS_LOG_DIR/system.log
CASS_PIDFILE=$CASSANDRA_HOME/cassandra.pid
OPSCENTER_LOGFILE=$CASS_LOG_DIR/opscenter.log
@ianmariano
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
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
#!/bin/bash
usage() {
echo "$0 usage:"
echo " $0 name new_name new_email"
exit 1
}
if [ "$#" -ne 3 ]; then
usage
@ianmariano
ianmariano / solrcloud.md
Last active Aug 20, 2018
Setting up SolrCloud (Solr 4.6.0)
View solrcloud.md

Setup SolrCloud

These instructions are for Ubuntu 13.10 x64. Each server should have a proper resolvable hostname!

Environment Setup

Java 7

sudo aptitude install openjdk-7-jre-headless java7-runtime-headless
You can’t perform that action at this time.