Skip to content

Instantly share code, notes, and snippets.

View cjheath's full-sized avatar

Clifford Heath cjheath

View GitHub Profile
@donalod
donalod / submit_to_rekognition.rb
Created June 12, 2019 20:09
submit_to_rekognition.rb
#!/usr/bin/env ruby
require "aws-sdk-rekognition"
require "catpix"
# Images from https://thispersondoesnotexist.com/image and https://archive.org/details/1mFakeFaces
p "Running face rekog script at #{Time.now.to_s}"
image_ids = Array.new(10) { rand(1...482) }
@drbrain
drbrain / nightmares.rb
Last active July 25, 2017 17:40
A method that has a default argument that defines a method that contains a here-document
def a l = def b; <<-NIGHTMARES; end; puts send l; end
😱😱😱
NIGHTMARES
a
@benhoskings
benhoskings / application_controller.rb
Created September 1, 2011 00:04
A git ref in every response!
class ApplicationController < ActionController::Base
before_filter {
headers['X-Refspec'] = TC::Services.refspec
}
end