Skip to content

Instantly share code, notes, and snippets.

Looking for Senior Ruby Engineers

Chuck J Hardy ChuckJHardy

Block or report user

Report or block ChuckJHardy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ChuckJHardy / localStorageMock.ts
Created Mar 22, 2019
Typescript LocalStorage Mock
View localStorageMock.ts
const localStorageMock = (() => {
let store: IDict = {};
return {
getItem(key: any) {
return store[key] || null;
setItem(key: any, value: any) {
store[key] = value.toString();
View gist:f6aca9ed9bd967bd08178c801d4a8cb1
### Keybase proof
I hereby claim:
* I am chuckjhardy on github.
* I am chuckjhardy ( on keybase.
* I have a public key ASDN6G-JWLU8Pn-F7HdCOeMj2z0URHrG3PbkQYifsUV5wAo
To claim this, I am signing this object:
ChuckJHardy / gist:d4a96885ea6f141ba34658a9ca145522
Created Nov 11, 2017
Verifying my Blockstack ID is secured with the address 1L2WKTJbQV4da4RwRmaSRAx114K8M6Uzg5
View gist:d4a96885ea6f141ba34658a9ca145522
Verifying my Blockstack ID is secured with the address 1L2WKTJbQV4da4RwRmaSRAx114K8M6Uzg5
View Gemfile
# Queue / Workers
gem "sidekiq"
gem "sidekiq-statistic"
gem "sidekiq-failures"
gem "clockwork", git: ""
View command.rb
require 'command'
describe Command do
let(:instance) {, robotic_rover) }
let(:robotic_rover) do
position: '0 0 N',
move: '0 1 N',
ChuckJHardy / static_map_helper.rb
Created Jul 20, 2016 — forked from mcasimir/static_map_helper.rb
Google Maps Static map helper for Ruby on Rails
View static_map_helper.rb
module StaticMapHelper
def static_map_for(location, options = {})
params = {
:center => [, location.lng].join(","),
:zoom => 15,
:size => "300x300",
:markers => [, location.lng].join(","),
:sensor => true
ChuckJHardy /
Last active Jun 1, 2018
Gource Recording for Git

Install Gource

brew install gource

Convert Quicktime Movie to Animated Gif

ffmpeg -i -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif

Record Gource

ChuckJHardy /
Created Feb 1, 2016
Microservices Setup Script
#!/usr/bin/env sh
set -e
function warn {
echo "$1" > /dev/stderr
ChuckJHardy /
Created Feb 1, 2016
Project Developer Build Script
#!/usr/bin/env sh
function warn {
echo "$1" > /dev/stderr
ChuckJHardy / example_activejob.rb
Last active May 17, 2019
Example ActiveJob with RSpec Tests
View example_activejob.rb
class MyJob < ActiveJob::Base
queue_as :urgent
rescue_from(NoResultsError) do
retry_job wait: 5.minutes, queue: :default
def perform(*args)*args)
You can’t perform that action at this time.