Skip to content

Instantly share code, notes, and snippets.

@stevenhaddox
stevenhaddox / ds215j_provisioner.md
Last active June 16, 2018 08:35
Bootstrap Synology DS215j DSM 5.x provisioner steps

Boostrap the Synology DS215j with optware, ipkg, and sudo

Inspired mostly from the Bootstrap DS215j blog post

Download & Install ipkg in a persistent manner

# Create a directory that won't get nuked during DSM security updates
mkdir /volume1/@optware
cd /volume1/@optware
@stevenhaddox
stevenhaddox / Capfile
Last active August 29, 2015 14:11 — forked from davidlfox/Capfile
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/rvm'
require 'capistrano/rails'
require "capistrano-resque"
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
@stevenhaddox
stevenhaddox / README.md
Created November 4, 2014 15:48
bl.ocks.org test

bl.ocks.org Fun

Woot!

Keybase proof

I hereby claim:

  • I am stevenhaddox on github.
  • I am stevenhaddox (https://keybase.io/stevenhaddox) on keybase.
  • I have a public key ASAud4NxM9NVS5ZDTN6or3s4B4i_Vf4rPdF9mqbqGznDawo

To claim this, I am signing this object:

@stevenhaddox
stevenhaddox / cacert.md
Created April 3, 2014 04:52
cacert.org setup of root certificate chain for custom OpenSSL source install

Looks like the OpenSSL conf (~/opt/stow/openssl-1.0.1c/ssl/openssl.cnf) has a setting for:

certs		= $dir/cacert.pem	# Certificate chain to include in reply
					# (optional)

As a result:

@stevenhaddox
stevenhaddox / Gemfile
Last active May 7, 2019 02:29
Dynamic Gemfile Sources
# Dynamically load gem sources from YAML config file
require 'yaml'
# See if we have a custom gem_sources.yml file, if not use the .example default.
if File.exist? File.expand_path("../config/gem_sources.yml", __FILE__)
gem_sources_file = File.expand_path("../config/gem_sources.yml", __FILE__)
puts "NOTE: Using the following gem sources from `config/gem_sources.yml`:"
@custom_gem_source = true
else
gem_sources_file = File.expand_path("../config/gem_sources.yml.example", __FILE__)
end
@stevenhaddox
stevenhaddox / group_vars-all.yml
Last active December 29, 2015 06:19
Manually force ansible to prepend sourcing a user's bash environment before executing commands
# {{root_path}}/group_vars/all.yml
---
src_bash: "source {{HOME.stdout}}/.bashrc;"
@stevenhaddox
stevenhaddox / apt_or_yum_ansible_logic.yml
Created November 15, 2013 05:33
Ansible file showing apt or yum logic
---
- name: Unpack JDK7
action: command creates=${jvm_folder}/jdk1.7.0 chdir=${jvm_folder} tar zxvf ${jvm_folder}/$jdk_archive --owner=root
register: jdk_installed
only_if: "'$ansible_pkg_mgr' == 'apt'"
- name: Install JDK7 RPM package
action: command creates=${jvm_folder}/latest chdir=${jvm_folder} rpm --force -Uvh ${jvm_folder}/$jdk_archive
register: jdk_installed
only_if: "'$ansible_pkg_mgr' == 'yum'"
@stevenhaddox
stevenhaddox / init_ansible_on_SUPPORT_vm.txt
Created November 14, 2013 18:57
Vagrant expected output for initial SUPPORT VM provisioning configuration
$ vagrant provision
[default] Running provisioner: ansible...
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
<33.33.33.10> REMOTE_MODULE setup
failed: [33.33.33.10] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/tmp/ansible-1384455237.04-1936301366699/setup", line 98, in ?
@stevenhaddox
stevenhaddox / gist:7112121
Created October 23, 2013 03:20
Create a bootable Linux (Ubuntu, CentOS, Scientific Linux, etc). USB Thumb Drive from OS X
hdiutil convert -format UDRW -o ~/Downloads/SL.59.020213.CD.x86_64.disc1.img /Users/steven/Downloads/SL.59.020213.CD.x86_64.disc1.iso
diskutil list
diskutil unmountDisk /dev/disk2
sudo dd if=~/Downloads/SL.59.020213.CD.x86_64.disc1.img.dmg of=/dev/disk2 bs=1m
diskutil eject /dev/disk2