Skip to content

Instantly share code, notes, and snippets.

...
# Create a folder, and only copy the Gemfile and Gemfile.lock
RUN mkdir /mnt/somerville-teacher-tool
COPY Gemfile /mnt/somerville-teacher-tool/Gemfile
COPY Gemfile.lock /mnt/somerville-teacher-tool/Gemfile.lock
# Now run bundle install. This step will only be invalidated
# if the Gemfile or Gemfile.lock changes.
RUN bundle install
# This is based off https://docs.docker.com/compose/rails/
rails:
build: .
volumes:
- .:/mnt/somerville-teacher-tool
working_dir: /mnt/somerville-teacher-tool
environment:
DATABASE_URL: postgresql://postgres@postgres # overrides hostname and username
ports:
- "3000:3000"
@kevinrobinson
kevinrobinson / wider.js
Created May 7, 2015 20:28
Wider GitHub pull request diffs
javascript:(function() { $('.container').css({ width: '90%', 'margin-right': 'none', 'margin-left': 'none' }); $('.repository-content').width('auto');$('.repository-sidebar').remove() })();
@kevinrobinson
kevinrobinson / circleci-frontend-walkthrough.md
Last active January 9, 2021 16:09
CircleCI frontend walkthrough

Hello!

This is a commentary and discussion from walking through what happens on startup in [https://github.com/circleci/frontend], looking at this SHA in December 2014: [https://github.com/circleci/frontend/commit/273558250040ce197e44e683d5528381f36c4eea].

The first part is a literal walkthrough, where I'm tracing my reading of how the code works. This is a way to check my understanding, since of course I don't have all of your context. And it's also a way to echo back to you how someone else might experience this code without that context. The second part is about asking questions, making suggestions, and exploring some paths for making it even more awesome. I also mixed in a few asides in the walkthrough part where I jump ahead a bit.

Doing this with colleagues has worked well for me as a way to do in-depth code reviews about more abstract design and architectural questions. The goal of the the first part is to clarify we're all looking at the same thing, which creates the space and shared understa

@kevinrobinson
kevinrobinson / gist:5808736
Created June 18, 2013 19:58
Jasmine beforeEach functions get called for each nested example
describe "setup", =>
@val = 0
beforeEach => @val += 10
afterEach => @val -= 100
describe "when loaded", =>
it "a", => expect(this.val).toEqual 10
it "b", => expect(this.val).toEqual 10
it "c", => expect(this.val).toEqual 10