Skip to content

Instantly share code, notes, and snippets.

View double-z's full-sized avatar

Zack Zondlo double-z

View GitHub Profile
source 'http://rubygems.org'
ruby '2.3.1'
gem 'tzinfo-data'
gem 'rails', '5.1.1'
gem 'coffee-rails', '~> 4.2.2'
gem 'uglifier', '~> 3.2.0'
@double-z
double-z / plan.sh
Created June 24, 2017 17:36
Experiments to deal with node/npm/react on rails with habitat scaffolding
pkg_name=sharetribe
pkg_origin=zz.
pkg_version="0.1.6"
pkg_deps=(core/node/7.8.0)
pkg_build_deps=(core/node/7.8.0 core/mysql-client core/tzdata)
pkg_scaffolding=zz/scaffolding-ruby-react
# scaffolding_env[SECRET_KEY_BASE]=('4454a5818096fc29cebdb5ad03e619fdd80be79c3d6041ec9ea00b36b00a246143ff391012cf4d54b29377a17dba96d00c19e9d8ab9e3411c57a74607031896b')
# scaffolding_node_pkg_manager=npm
@double-z
double-z / linux-el-capitan-vm.md
Created April 4, 2017 04:20 — forked from nstarke/linux-el-capitan-vm.md
How to create an OS X El Capitan VM that will run on Linux

How to create an OS X El Capitan VM that will run on Linux

VirtualBox only officially supports OS X guests on an OS X host, but it is possible to create one on an OS X host and transfer it over to a Linux host. This tutorial will go over one possible way to accomplish this task.

What you will need

  • An Apple computer running OS X 10.11
  • A Linux computer to transfer the VM over to
  • 20 GB free on the Apple Machine
  • 40 GB free on the Linux Machine
#!/usr/bin/env bash
# Exit if error and pipe any from ctl commands
#set -eo
# Stop Pushy Server
chef-server-ctl stop opscode-pushy-server
# Nuke it from DB
echo "drop database opscode_pushy;" | su -l opscode-pgsql -c "psql"
@double-z
double-z / hooks_health_check.sh
Created August 9, 2016 10:34
Plan to configure Consul with habitat.
#!/bin/sh
#
# Consul Health Check for Habitat
echo "health_check..."
echo ""
# The health_check script must return a valid exit code from the list below.
# 0 - ok
@double-z
double-z / step1.sh
Created August 9, 2016 10:32 — forked from X0nic/step1.sh
Habitat Rails Sample Comands
# hab studio enter
hab pkg export docker core/postgresql
hab pkg export docker core/ruby-rails-sample
# Terminal - 1
docker run -e HAB_POSTGRESQL='initdb_superuser_password = "rails_sample"' -p 9631:9631 -p 5432:5432 -v rails_pg_data:/hab/svc/postgresql/data -it core/postgresql
# Terminal - 2
@double-z
double-z / habitat-quickstart.md
Created August 9, 2016 10:32
Habitat Quickstart Guide
@double-z
double-z / README.rst
Created July 8, 2016 20:28 — forked from massenz/README.rst
Apache Mesos build and install scripts; optionally runs the Master/Slave locally and executes a demo (C++) framework against it, to validate it all went according to plan

Apache Mesos Build scripts

The `Getting started`_ instructions are a good start (no surprise there!) but are somewhat incomplete and currently look a bit outdated (I plan to fix them soon): however, the outcome has been that I have struggled more than I felt necessary in building and running Mesos on a dev VM (Ubuntu 14.04 running under VirtualBox).

Some of the issue seem to arise from the unfortunate combination of Mesos Master trying to guess its own IP address, the VM being (obviously) non-DNS resolvable and, eventually, the Slave and the Framework failing to properly communicate with the Master.

In the process of solving this, I ended up automating all the dependencies installation, building and running the framework; I have then broken it down into the following modules to make it easier to run only parts of the process.

@double-z
double-z / recon.sh
Created March 19, 2016 23:21
get specs
#!/bin/bash
set -ox pipefail
##############
# GET OUR SPEC
#
ARGS_IN="$@"
argone="$1"
[ -n $2 ] && argtwo="$2"