Skip to content

Instantly share code, notes, and snippets.

View brynary's full-sized avatar

Bryan Helmkamp brynary

View GitHub Profile

Keybase proof

I hereby claim:

  • I am brynary on github.
  • I am bhelmkamp (https://keybase.io/bhelmkamp) on keybase.
  • I have a public key ASA89PzO7BMxuiOLcTEKJPzQZidZab1TVGSnpXvreWRrOQo

To claim this, I am signing this object:

@brynary
brynary / exclusions.yml
Created May 16, 2019 12:49
Code Climate Velocity Default Exclusion Patterns
- (^|/)config/
- (^|/)dist/
- (^|/)node_modules/
- (.*)\.lock$
- package-lock\.json$
- npm-shrinkwrap\.json$
- Godeps\/
# Below is from https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml
#
- (^|/)config/
- (^|/)dist/
- (^|/)node_modules/
- (.*)\.lock$
- package-lock\.json$
- npm-shrinkwrap\.json$
- Godeps\/
# Below is from https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml
#
@brynary
brynary / code_climate_cla.md
Created June 13, 2017 18:35
Code Climate Contributor License Agreement (CLA)

CODE CLIMATE CONTRIBUTION LICENSE AGREEMENT

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
brynary / ladder.md
Created March 24, 2016 04:05 — forked from jamtur01/ladder.md
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.
FROM ubuntu
MAINTAINER Code Climate <ops@codeclimate.com>
RUN echo "deb http://archive.ubuntu.com/ubuntu 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 "https://s3.amazonaws.com/heroku-buildpack-ruby/ruby-1.9.3.tgz" -s -o - | tar zxf -
class FooController < ApplicationController
before_filter :api_authenticate
# ...
def api_authenticate
authenticate_or_request_with_http_basic do |username, password|
username == "foo" && password == "bar"
end
end
end
class ActiveUserPolicy
LOGIN_PERIOD = 14.days
class Query
def initialize(relation = User.scoped)
@relation = relation
end
def find_each(&block)
@relation.
$ git ls-remote git://github.com/floere/picky.git
fatal: remote error: access denied or repository not exported: /d/nw/d8/cc/43/828623/828623.git