Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Clif Reeder clifff

🏠
Working from home
View GitHub Profile
@lizthegrey
lizthegrey / attributes.rb
Last active Jul 2, 2020
Hardening SSH with 2fa
View attributes.rb
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active May 28, 2020
Byte formatting for Google Sheets
View Byte Formatting for Google Sheets.md
@gjtorikian
gjtorikian / homepage_spec.rb
Last active Dec 5, 2019
Basic Capybara testing with Jekyll + Rack
View homepage_spec.rb
require 'spec_helper'
describe "Homepage" do
before :each do
visit "/index.html"
end
it "has a title" do
expect(page).to have_css("h1", text: "GitHub Help")
@deepak
deepak / Dockerfile
Created Jul 5, 2013
Dockerfile to install ruby using brightbox deb
View Dockerfile
# DOCKER-VERSION 0.4.8
FROM ubuntu:12.04
MAINTAINER Deepak Kannan "deepak@codemancers.com"
RUN apt-get -y install python-software-properties
RUN apt-add-repository -y ppa:brightbox/ruby-ng-experimental
RUN apt-get -y update
@igrigorik
igrigorik / webapp.rb
Created Nov 13, 2010
Inspired by @JEG2's talk at Rubyconf... Any ruby object, as a webapp! 'Cause we can. :-)
View webapp.rb
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?)
[200, {}, send(func, *attrs)]
end
You can’t perform that action at this time.