Skip to content

Instantly share code, notes, and snippets.

View gotwalt's full-sized avatar

Aaron Gotwalt gotwalt

View GitHub Profile
@gotwalt
gotwalt / config.yml
Last active August 4, 2017 16:14
Circle CI 2.0 building a node app and continuously deploying to Google App Engine
version: 2
jobs:
build:
docker:
- image: circleci/node:8.1
working_directory: ~/web
steps:
- checkout

Keybase proof

I hereby claim:

  • I am gotwalt on github.
  • I am gotwalt (https://keybase.io/gotwalt) on keybase.
  • I have a public key ASDcnKsN49ga0kD77pMlayDOpdyWEAhQW_Hlt1RqdFrm8wo

To claim this, I am signing this object:

@gotwalt
gotwalt / Code of Conduct.md
Last active April 13, 2016 21:46
Projector Community Code of Conduct

If you choose not to abide by the following guidelines, your membership in Projector Community will be revoked.

The Code

  • Any app developer, product manager, or marketing professional with a Projector account may request to join.
  • Assume that these conversations are confidential. If you would like to share someone else’s experience in a more public forum (ie, Twitter), please DM them and get their explicit consent.
  • Be good to one another.
  • Never use @-everyone or @-channel in #announcements. The use of that tool in other channels is on a case-by-case basis, but please consider the following: Does everyone really need to know? Will @-here suffice? Is this time-sensitive information?

We need this to be a safe and welcoming environment for all, regardless of level of experience, gender expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.

@gotwalt
gotwalt / gist:5743651
Created June 9, 2013 13:58
Trying to use Webmock's to_rack functionality and Rails 4 and getting huge errors with the session object? This monkeypatch provides the missing 'rack.session.options' key to the request environment.
require 'webmock/minitest'
module WebMock
class RackResponse < WebMock::Response
def build_rack_env(request)
uri = request.uri
headers = request.headers || {}
body = request.body || ''
class NoChoice < Choice
end
@gotwalt
gotwalt / gist:3837068
Created October 4, 2012 23:16
Late night code comments
# how many posts to we rip on the daily?
def count
# say me say many moni, say me say manymanymany
redis.zcount(key, '-inf', '+inf')
end
8:24:20 AM Aaron Gotwalt: we're having the collection-json vs other api forms argument tomorrow
8:24:36 AM Aaron Gotwalt: or hypermedia types, i suppose
8:25:00 AM Aaron Gotwalt: he's concerned about verbosity and that it presents the data in a format that is not ideal for either the client or the server
8:25:33 AM Larry Marburger: that's a feature
8:26:09 AM Larry Marburger: it's designed to be future proof which hand-rolled json won't be
8:26:19 AM Larry Marburger: it's an interchange format
8:26:31 AM Larry Marburger: i may have just made that up
8:26:34 AM Aaron Gotwalt: right, but it has processing cost on either side
8:26:39 AM Aaron Gotwalt: which is less of a concern in ruby-land
8:26:43 AM Aaron Gotwalt: but on ios
#!/usr/bin/env bash
# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
environment_id="ruby-1.9.3-p125@thumbs"
#
# First we attempt to load the desired environment directly from the environment
# file, this is very fast and efficicent compared to running through the entire
@gotwalt
gotwalt / gist:2892818
Created June 8, 2012 01:13
Install gem bundler 1.2pre
rvm gemset use global
gem uninstall -ax bundler
gem install bundler --pre
bundle --version
rvm gemset use giver
require 'rake/testtask'
require 'cucumber/rake/task'
Rake::TestTask.new(:test) do |t|
t.libs << 'spec'
t.pattern = 'spec/**/*_spec.rb'
t.verbose = true
end