Skip to content

Instantly share code, notes, and snippets.

View dvbportal's full-sized avatar

Hans J Schroeder dvbportal

View GitHub Profile
@dvbportal
dvbportal / two_factor_ssh.rb
Created September 24, 2011 12:51 — forked from moomerman/two_factor_ssh.rb
Two Factor SSH Authentication
#!/usr/bin/env ruby
require 'rubygems'
require 'rotp'
require 'time'
user = ..hard coded..
secret = ..hard coded..
abort unless user and secret
@dvbportal
dvbportal / app.rb
Last active December 30, 2015 13:09 — forked from troelskn/app.rb
require 'gollum/app'
require 'digest/sha1'
class App < Precious::App
User = Struct.new(:name, :email, :password_hash, :can_write)
before { authenticate! }
before /^\/(edit|create|delete|livepreview|revert)/ do authorize_write! ; end
helpers do
@dvbportal
dvbportal / coreos-docker-veertu.md
Last active June 11, 2016 19:09 — forked from ilja/coreos-docker-veertu.md
How to connect Docker to CoreOS in Veertu