Skip to content

Instantly share code, notes, and snippets.

View capoferro's full-sized avatar

Josiah Kiehl capoferro

View GitHub Profile
@capoferro
capoferro / docker-ssl-cert-generate
Last active May 14, 2017 02:09 — forked from cameron/docker-ssl-cert-generate
Generate self-signed SSL certs for docker client <— HTTPS —> daemon
#! /bin/bash
# HEADS UP! Make sure to use '*' or a valid hostname for the FDQN prompt
echo 01 > ca.srl
openssl genrsa -out ca-key.pem
openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem
openssl genrsa -out server-key.pem
openssl req -new -key server-key.pem -out server.csr
{
"accountWide": true,
"criteria": [
{
"description": "To Honor One's Elders",
"id": 7553,
"max": 1,
"orderIndex": 0
},
{
@capoferro
capoferro / ERB_test.rb
Created October 31, 2012 00:51 — forked from anonymous/ERB_test.rb
Struggling ruby loop.
# I am attempting to read all files in an input/ directory
# (index.html.erb, style.css.erb & script.js.erb) and
# compile them into their corresponding files in the
# output/ directory (index.html, style.css & script.js)
# Currently, only one file is rendering correctly and
# the following error is being thrown:
# ERB_test.rb:12:in `read': No such file or directory - script.js (Errno::ENOENT)
# from single_loop.rb:12:in `block in <main>'
module InstanceMethods
def can_moderate_community?
self.community_admin? or self.community_moderator?
end
end