Skip to content

Instantly share code, notes, and snippets.

View components.my-component\.js
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
export default class extends Component {
constructor() {
super(...arguments);
this.eventuallyUpdate();
}
@tracked personOne = "I";
View 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:

View gist:46beab99cacdca729ac3f644b1120347
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));
View gist:5c3f874f3c237834815d
```
__ __ __ ___ ____ ____ _______ .___________. ______ __ ______ ______ __ ___ ___ .___________.
| | | | | | / \ \ \ / / | ____| | | / __ \ | | / __ \ / __ \ | |/ / / \ | |
| | | |__| | / ^ \ \ \/ / | |__ `---| |----`| | | | | | | | | | | | | | | ' / / ^ \ `---| |----`
| | | __ | / /_\ \ \ / | __| | | | | | | | | | | | | | | | | | < / /_\ \ | |
| | | | | | / _____ \ \ / | |____ | | | `--' | | `----.| `--' | | `--' | | . \ / _____ \ | |
|__| |__| |__| /__/ \__\ \__/ |_______| |__| \______/ |_______| \______/ \______/ |__|\__\ /__/ \__\ |__|
@qpowell
qpowell / cukedates.md
Last active Aug 29, 2015
Handling Dates and Times in Cucumber
View cukedates.md

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"
@qpowell
qpowell / gist:9166429
Created Feb 23, 2014
Quick-start CodeCombat developer environment with iTerm and zsh in OSX.
View gist:9166429

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 / unicorn_setup.md
Last active Oct 17, 2017
Unicorn setup for local development environment and Heroku
View unicorn_setup.md

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