Skip to content

Instantly share code, notes, and snippets.

@turley
turley / gist:5596974
Last active December 17, 2015 10:48
baconify
require 'yaml'
module Baconification
module Baconifier
def self.included(base)
base.class_eval do
alias_method :nonbaconified_method_missing, :method_missing
def method_missing meth, *args, &block
if respond_to?(:to_yaml) && meth.to_s =~ /\A(?!un)(.+)ify\z/
to_yaml.unpack('c*').map{|c| "#{$1} " * c }.join($1 * 2 + " ").strip
@turley
turley / dokku_stackscript.sh
Last active March 4, 2021 19:57
Linode StackScript for creating a Dokku server
#!/bin/bash
# <UDF name="hostname" label="The hostname for the new Linode" example="apps">
# <UDF name="fqdn" label="The new Linode's Fully Qualified Domain Name" example="apps.example.com">
# <UDF name="adminuser" label="Username for new admin user (cannot be dokku)">
# <UDF name="adminpass" label="Password for new admin user">
# <UDF name="adminkey" label="SSH public key authorized for admin user (password SSH auth will be disabled)">
# <UDF name="dokkukey" label="SSH public key authorized for dokku user (used when deploying apps)">
# Turn off password authentication and root login for SSH