Skip to content

Instantly share code, notes, and snippets.

@qpowell
qpowell / unicorn_setup.md
Last active October 17, 2017 11:39
Unicorn setup for local development environment and Heroku

Unicorn setup for local development environment and Heroku

More info can be found on Heroku: Deploying Rails Applications with Unicorn

  1. Add unicorn, rack-timeout, and foreman to your 'Gemfile'.

     gem 'unicorn'
     gem 'rack-timeout'
    

group :development do

@qpowell
qpowell / gist:9166429
Created February 23, 2014 03:30
Quick-start CodeCombat developer environment with iTerm and zsh in OSX.

In order to run the dev server, CodeCombat needs you to run the following scripts:

  • coco/bin/coco-mongodb (starts MongoDB, which stays running and awaits connections)
  • coco/bin/coco-brunch (starts brunch, which stays running and watches for file changes, may need to be run as sudo to increase the ulimit if brunch fails)
  • coco/bin/coco-dev-server (starts your local webserver, which stays running and watches for file changes)

I don't trust myself to remember that every time, so I made this alias and function to help me (added to my ~/.zshrc):

# This should point to wherever you have the folder for your code climate repo.
@qpowell
qpowell / cukedates.md
Last active August 29, 2015 14:07
Handling Dates and Times in Cucumber

Handling Dates and Times in Cucumber

If you have to write an integration test that includes a specific date or time, there's an extra step you need to take to ensure that your tests don't break when the date/time changes. Take the following example for instance:

Scenario (cash_discounts_list.feature):

  Scenario: List the cash discounts sorted by status, type, end date
    Given there are some cash discounts
    When I list the "cash_discounts"
```
__ __ __ ___ ____ ____ _______ .___________. ______ __ ______ ______ __ ___ ___ .___________.
| | | | | | / \ \ \ / / | ____| | | / __ \ | | / __ \ / __ \ | |/ / / \ | |
| | | |__| | / ^ \ \ \/ / | |__ `---| |----`| | | | | | | | | | | | | | | ' / / ^ \ `---| |----`
| | | __ | / /_\ \ \ / | __| | | | | | | | | | | | | | | | | | < / /_\ \ | |
| | | | | | / _____ \ \ / | |____ | | | `--' | | `----.| `--' | | `--' | | . \ / _____ \ | |
|__| |__| |__| /__/ \__\ \__/ |_______| |__| \______/ |_______| \______/ \______/ |__|\__\ /__/ \__\ |__|
jQuery('.page-part__folks .staff-padding-box img').each(function(i) {
var $image = jQuery(this);
setInterval(function() {
var imageSource = $image.attr('src');
if (imageSource.match(/-1/)) {
$image.attr('src', imageSource.replace('-1', '-2'));
} else {
$image.attr('src', imageSource.replace('-2', '-1'));
}
}, ((500) + i*25));
@qpowell
qpowell / keybase.md
Created May 29, 2018 00:16
keybase.md

Keybase proof

I hereby claim:

  • I am qpowell on github.
  • I am qtangclan (https://keybase.io/qtangclan) on keybase.
  • I have a public key ASBsNNC28_-vRAvKOkvTdZ_i6dyqVTNoWYgN0PUvXwELJwo

To claim this, I am signing this object:

import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
export default class extends Component {
constructor() {
super(...arguments);
this.eventuallyUpdate();
}
@tracked personOne = "I";