Skip to content

Instantly share code, notes, and snippets.

@aehlke
aehlke / gist:992798
Created May 26, 2011 08:53 — forked from jamesmacaulay/gist:860763
zsh hooks to growl completion of long-running commands
# long-running command growler
# hooks for zsh, built on bash version at http://hints.macworld.com/article.php?story=20071009124425468
preexec_functions+='save_preexec_time'
save_preexec_time() {
export PREEXEC_CMD="$(history $HISTCMD | sed 's/ *[0-9]* *//')"
export PREEXEC_TIME=$(date +'%s')
}
precmd_functions+='growl_about_long_running_commands'
git describe --exact-match 2> /dev/null || git describe --all --long | perl -pe 's/^heads\///'
@aehlke
aehlke / 1. Wrap-up.md
Created February 1, 2016 19:38
Toronto Hack & Tell Round 5
@aehlke
aehlke / .json
Created September 16, 2015 21:00
behave --dry-run --formatter json.pretty --no-summary
[
{
"elements": [
{
"keyword": "Scenario",
"location": "features/test.feature:3",
"name": "Redacted name of a scenario here",
"steps": [
{
"keyword": "Given",
Feature: Basic Test # features/test.feature:1
Scenario: As a student I should be able to blah blah blah # features/test.feature:26
Given I create a student user # None
And I navigate to the base url # None
Then I should see text Login # None
When I login # None
Then I should see text Courses # None
0 features passed, 0 failed, 0 skipped, 9 untested
@aehlke
aehlke / 1. Wrap-up.md
Last active August 29, 2015 14:26
Toronto Hack & Tell Round 3
@aehlke
aehlke / 1. Wrap-up.md
Last active August 29, 2015 14:23
Toronto Hack & Tell Round 2 Wrap-up
@aehlke
aehlke / 1. Wrap-up.md
Last active August 29, 2015 14:22
Toronto Hack & Tell Round 1
@aehlke
aehlke / gist:2021dd34c91b09da36f1
Last active August 29, 2015 14:19
DI example
class SakaiAPI(object):
def authenticate(self, token):
return requests.post(...).json()
class MockSakaiAPI(SakaiAPI):
def __init__():
self.is_authenticated = True
def authenticate(self, token):
@aehlke
aehlke / gist:362d4cfaa94db63a58fa
Last active August 29, 2015 14:13
Temporary Jenkins instructions for QA
Temporary Jenkins instructions for QA
Until we roll Jenkins out to everyone, this is the process that should work for you. This is only because CircleCI
integration is broken until my circle.yml changes are merged ( https://github.com/tophatmonocle/THM/pull/823 which
I need to update shortly), which blocks the nicer workflow I've built in Jenkins.
One requirement is that the branch you are launching is on the upstream tophatmonocle/THM repo, not someone's fork.
We should already be moving over to this now anyway.
To launch a test server: