Skip to content

Instantly share code, notes, and snippets.

View jdickey's full-sized avatar
💭
Open to possibilities. Enquire within.

Jeff Dickey jdickey

💭
Open to possibilities. Enquire within.
View GitHub Profile
@kjellm
kjellm / app.rb
Last active July 26, 2021 04:46
Event Source proof of concept. Copyright 2017 Kjell-Magne Øierud. License: MIT https://opensource.org/licenses/MIT
require_relative 'base'
require_relative 'event'
require_relative 'cmd'
require_relative 'crud'
require_relative 'model'
require_relative 'read'
require 'pp'
class Application < BaseObject

New OS X Computer Setup

Below are the programs I install, the Preferences I change, and the configurations I tweak after doing a fresh install of macOS.

Homebrew / Cask

http://brew.sh/

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@rchampourlier
rchampourlier / session_mock.rb
Created April 16, 2017 21:29
SessionMock: a small module to help mocking sessions within Hanami in feature specs
# Session mocking may be used in feature tests to mock a session
# since it's not possible to inject the session through params or
# direct injection.
#
# SessionMock is a module that may be included
# in `Hanami::Web::Action` to override the session
# in feature specs.
#
# Usage (in the controller action):
#
@nodunayo
nodunayo / README.md
Last active December 2, 2018 16:15 — forked from zenorocha/README.md
A template for a code hospitable README

Code Hospitality Guide App

This app helps you transform your team and codebase into code hospitable entities.

Installation

  • Go to the Code Hospitality homepage
  • Click the 'DOWNLOAD RIGHT NOW' button
  • Twiddle thumbs
  • Enjoy
@jgaskins
jgaskins / Gemfile
Created July 27, 2016 23:27
Clearwater app to fetch and render data from the GitHub API
source 'https://rubygems.org'
gem 'clearwater', '~> 1.0.0.rc1'
gem 'opal-rails'
gem 'grand_central'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
@jdickey
jdickey / docker-machine-vmfusion.sh
Last active December 1, 2017 09:43
Basic workflow for docker-machine on Mac with VMWare Fusion
#!/bin/bash
# This is a fork of https://gist.github.com/mcemce/a6ee9b4ab07df9972883 with
# additional variable-based configuration and status hand-holding added by
# myself (@jdickey). Thanks to @mcemce for helping me out of a jam.
# Docker VM name. 'dev' is a recommended name for a development VM; you'll want
# to name a production VM something else.
OUR_DOCKER_VM=dev
echo "Docker will install a machine named $OUR_DOCKER_VM within VMware."
@spilth
spilth / ruby-rails-resources.md
Last active December 1, 2016 12:40
A collection of useful reference and learning resources for Ruby and Rails.
@ream88
ream88 / response_matchers.rb
Created July 21, 2012 10:16
minitest-matchers for controller/functional specs
# Simple minitest matchers which will make your controller/functional specs less pain in the ass.
#
# ==== Dependencies
#
# gem 'minitest'
# gem 'minitest-matchers'
#
# ==== Matchers
#
# +must_have_status+ and its opposite +wont_have_status+ take both one argument which must be one of the following:
module LoadResources
module ClassMethods
def load_resource(resource_class, options = {})
filter_options = options.slice :only, :except, :if, :unless
resource_options = options.except :only, :except, :if, :unless
send(:before_filter, filter_options) do |controller|
ResourceBuilder.new(controller, resource_class, resource_options)
.send(:load_resource)
end
@bgentry
bgentry / sequel_paranoia.rb
Created November 30, 2011 03:20
Sequel Paranoia plugin (i.e. acts_as_paranoid)
module Sequel
module Plugins
# The paranoia plugin creates hooks that automatically set deleted
# timestamp fields. The field name used is configurable, and you
# can also set whether to overwrite existing deleted timestamps (false
# by default). Adapted from Timestamps plugin.
#
# Usage:
#
# # Soft deletion for all model instances using +deleted_at+