Skip to content

Instantly share code, notes, and snippets.

Bryan Helmkamp brynary

Block or report user

Report or block brynary

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
brynary / exclusions.yml
Created May 16, 2019
Code Climate Velocity Default Exclusion Patterns
View exclusions.yml
- (^|/)config/
- (^|/)dist/
- (^|/)node_modules/
- (.*)\.lock$
- package-lock\.json$
- npm-shrinkwrap\.json$
- Godeps\/
# Below is from
View default_exclusions.yml
- (^|/)config/
- (^|/)dist/
- (^|/)node_modules/
- (.*)\.lock$
- package-lock\.json$
- npm-shrinkwrap\.json$
- Godeps\/
# Below is from
brynary /
Created Jun 13, 2017
Code Climate Contributor License Agreement (CLA)


This Contribution License Agreement (the “CLA”) is between the individual set forth in the signature block (“You”) and Code Climate, Inc., (“Code Climate”), effective as of the date of Your signature and sets forth the terms pursuant to which You provides Contributions to Code Climate.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Code Climate. In return, Code Climate will not use Your Contributions in a way that is contrary to Code Climate’s business objectives. Except for the license granted herein to Code Climate and recipients of software distributed by Code Climate, You reserve all right, title, and interest in and to Your Contributions.

  1. Definitions. “Contribution” means any original work of authorship, including any modifications or additions to an existing work, that You intentionally submit to Code Climate for inclusion in, or documentation of, any of the products owned or manag
brynary /
Created Mar 24, 2016 — forked from jamtur01/
Kickstarter Engineering Ladder

2010 Modularity Olympics

This is a contest, open to programming languages from all nations, to write modular and extensible code to solve the following problem: Implement a service that can run queries on a database.

The Challenge

Sounds simple right? Wrong! A programmer without control over the source-code of that service must be able to later add enhancements such as statistics collecting, timeouts, memoization, and so forth. There are a few more requirements:

  1. the “enhancements” must be specified in a configuration object which is consumed at run-time (e.g., it could be based on user-input).
  2. The enhancements are ordered (stats collecting wraps timeouts, not the other way around) but it must be possible to reverse the order of the enhancements at run-time.
  3. The enhancements must be “surgical” and not “global”. That is, it must be possible to simultaneously have two query services, one reversed and one not reversed, and even have a query service without any enhancements.
View Dockerfile
FROM ubuntu
MAINTAINER Code Climate <>
RUN echo "deb precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y curl libssl-dev libssl0.9.8 autoconf build-essential
RUN mkdir -p /app/vendor/ruby-1.9.3 && cd /app/vendor/ruby-1.9.3 && curl "" -s -o - | tar zxf -
View gist:5277477
class FooController < ApplicationController
before_filter :api_authenticate
# ...
def api_authenticate
authenticate_or_request_with_http_basic do |username, password|
username == "foo" && password == "bar"
View active_user_policy.rb
class ActiveUserPolicy
LOGIN_PERIOD = 14.days
class Query
def initialize(relation = User.scoped)
@relation = relation
def find_each(&block)
View gist:3454748
$ git ls-remote git://
fatal: remote error: access denied or repository not exported: /d/nw/d8/cc/43/828623/828623.git
brynary / code_locator.rb
Created Jul 19, 2012
This code was used by Code Climate to figure out where classes, modules and methods live
View code_locator.rb
def in_module(name, file, line, last_line)
if Sexp === name then
name = case name.first
when :colon2 then
name = name.flatten
name.delete :const
name.delete :colon2
when :colon3 then
You can’t perform that action at this time.