Skip to content

Instantly share code, notes, and snippets.

Les Fletcher hmcfletch

Block or report user

Report or block hmcfletch

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
hmcfletch / application.rb
Created Jan 1, 2012
Automatic Observer Registration
View application.rb
module AppName
class Application < Rails::Application
config.encoding = "utf-8"
config.filter_parameters += [:password]
config.assets.enabled = true
config.assets.version = '1.0'
# registers any file in the app/observers directory as an observer
observers = [] # Register all observers in the observers folder.
pattern = File.join(Rails.application.config.root, 'app', 'observers', '**', '*.rb')
View AFRailsHTTPClient.h
// AFRailsHTTPClient.h
// TopHatter
// Created by Leslie Fletcher on 1/30/12.
// Copyright (c) 2012 Blippy. All rights reserved.
#import "AFHTTPClient.h"
hmcfletch / ColorHelper.h
Created Jan 23, 2012
A bunch of objective-c color helpers
View ColorHelper.h
#import <Foundation/Foundation.h>
#import <QuartzCore/QuartzCore.h>
// generate a UIColor from rgb and alpha values
#define RGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
#define RGB(r, g, b) RGBA(r, g, b, 1.0)
// generate a UIColor
#define GRAYSCALEA(rgb, a) RGBA(rgb, rgb, rgb, a)
#define GRAYSCALE(rgb) GRAYSCALEA(rgb, 1.0)
// generate a UIColor from a hex and an alpha value
View git-branch-status
# git-branch-status
# * originally by
# * "s'all good!" message by
# * ANSI colors by
# * column formatting, filters, and usage by
# this script prints out pretty git branch sync status reports
hmcfletch / config.yml
Created Sep 21, 2018
An example Circle CI workflow for a Ruby on Rails app
View config.yml
version: 2
- image: circleci/ruby:2.5.1-node-browsers
- checkout
- run:
You can’t perform that action at this time.