Skip to content

Instantly share code, notes, and snippets.

View sodre's full-sized avatar

Patrick Sodré sodre

  • ZeroAE LLC
  • Bethesda, MD
View GitHub Profile
@sodre
sodre / bump
Created July 4, 2017 02:51 — forked from colby/bump
Bumps a git tag and metadata.rb version for a given Chef cookbook, follows SemVer standards.
#!/bin/bash
set -eo pipefail
semver_regex="^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(\-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$"
usage="\
Usage:
$0
$0 show
@sodre
sodre / hxexsa.json
Last active September 25, 2016 05:05 — forked from drscream/linux-vm.json
{
"brand": "kvm",
"alias": "hxexsa",
"resolvers": [
"8.8.8.8",
"8.8.4.4"
],
"ram": "12288",
"vcpus": "2",
"nics": [
@sodre
sodre / pkgin.update.repo.sh
Created May 30, 2016 03:42 — forked from typomedia/pkgin.update.repo.sh
Pkgin Repository Update Script
#!/bin/sh
# Copyright 2014 Typomedia Foundation. All rights reserved.
# Released under GPL version 3.
#
# Pkgin Repo Update Script v1.0alpha
# Update repositories.conf for pkgin, and set $PKG_PATH for pkg_add
export PKG_PATH=http://pkgsrc.joyent.com/packages/SmartOS/2014Q1/x86_64/All
echo $PKG_PATH > /opt/local/etc/pkgin/repositories.conf
@sodre
sodre / install-oracle-jdk-smartos.sh
Last active April 5, 2016 03:22 — forked from sr75/wget-jdk-oracle-install-example.txt
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
#!/bin/bash
# http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u77-b03/server-jre-8u77-solaris-x64.tar.gz" \
-O jdk.tar.gz
mkdir -p /opt/local/java
@sodre
sodre / install.sh
Last active April 4, 2016 05:04 — forked from mattconnolly/install.sh
Pseudo script for installing Jenkins CI on Smart OS. SMF service manifest file included.
#!/bin/pseudo-bash
# Read through this and modify to taste.
# Tested on:
# image_uuid: bad2face-8738-11e2-ac72-0378d02f84de
# smartos base64 1.9.0
#
# jenkins is run as the "admin" user, with its home directory set to /home/admin/jenkins
mkdir ~/jenkins