Skip to content

Instantly share code, notes, and snippets.

Brad Fults h3h

Block or report user

Report or block h3h

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
@h3h
h3h / rubify_regexp.rb
Created Apr 6, 2012
Perl to Ruby Regular Expression Conversion
View rubify_regexp.rb
POSSIBLE_OPTIONS = "[misxp]"
def rubify_regexp(l)
re = l.gsub(/\(\?(#{POSSIBLE_OPTIONS}*)(?:-(#{POSSIBLE_OPTIONS}*))?:/) do |_|
enabled = $1
disabled = $2
# Perl's `s` option is `m` in Ruby
if enabled.include?('s') && !enabled.include?('m')
enabled.sub!('s', 'm')
else
@h3h
h3h / gist:4437224
Last active Mar 19, 2018
My thoughts on Open Allocation, from Michael O. Church.
View gist:4437224

Original Post

Evaluating Team Members

If people want to move, and the leads of those projects deem them qualified, there’s no reason not to allow this.

Deeming someone qualified is a pretty nuanced and difficult process. I wouldn’t expect all or even most temporary tech leads to get it right (or even be close) for a long time.

@h3h
h3h / 01.elm
Last active Sep 25, 2017
Elm Tutorial Roll Dice with SVG – Start here: http://elm-lang.org/examples/random
View 01.elm
module Main exposing (..)
import Html exposing (..)
import Html.Attributes
import Html.Events exposing (..)
import List
import Random
import Svg exposing (..)
import Svg.Attributes exposing (..)
@h3h
h3h / 01.elm
Last active Dec 18, 2016
Evolving Elm Validation Code
View 01.elm
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (onInput)
import List
import Regex exposing (regex)
main =
Html.beginnerProgram
{ model = model
View hash.rb
class Hash
# Intersection on hash keys (and values) that actually returns a Hash.
# The RHS can be an Array or a Hash.
#
# == Examples:
# >> hsh = {:banana => "elephant", :bar => "foo", :baz => "wuux"}
# >> hsh & [:bar]
# => {:bar=>"foo"}
#
# >> hsh & {:bar => "foo", :baz => "wuux"}
@h3h
h3h / 0-resume-template.md
Last active Jul 28, 2016
Ideal Resume Format for a Software Engineer
View 0-resume-template.md

https://github.com/[yourname]

Ambition

[Describe ambitions: type of work, attributes of team, what you want to learn & teach]

Experience

[in reverse chronological order, list at most 5 positions or 10 years back, whichever is fewer]

@h3h
h3h / adblock.config
Created Jan 28, 2014
Adblock Custom Rules for Cleaner GitHub Pull Requests
View adblock.config
github.com##div#discussion_bucket div.form-actions div.form-actions-protip
github.com##div#discussion_bucket div.previewable-comment-form p.drag-and-drop
github.com##div#discussion_bucket p.push-more
github.com##div#discussion_bucket span.tabnav-right span.tabnav-widget.text
github.com##div#discussion_bucket div.discussion-timeline div.thread-subscription-status
@h3h
h3h / foo.rb
Last active Dec 21, 2015
Sanitizing HTML content in a Rails model.
View foo.rb
class Foo < ActiveRecord::Base
ALLOWED_HTML_ELEMENTS = %w[
a b br blockquote code em h2 h3 hr i li ol p pre s strong sub sup u ul
]
ALLOWED_EMPTY_HTML_ELEMENTS = %w[br hr]
before_validation :sanitize_html
private
@h3h
h3h / GitGutter.sublime-settings
Last active Dec 20, 2015
Preventing OS X’s aggressive git shim prompt when you don’t have Xcode installed.
View GitGutter.sublime-settings
{
// Custom path to git binary when not in PATH
"git_binary": "/usr/local/bin/git"
}
@h3h
h3h / Gemfile
Created Jun 4, 2013
Austin.RB Kata
View Gemfile
source "https://rubygems.org/"
gem 'rack-fiber_pool'
gem 'mysql2'
gem 'activerecord'
gem 'em-synchrony'
gem 'em-http-request'
gem 'grape'
gem 'goliath'
gem 'multi_json'
You can’t perform that action at this time.