Skip to content

Instantly share code, notes, and snippets.

@cmheisel
cmheisel / jobs.sh
Last active April 27, 2017 23:19
Web site comparisons
#!/bin/bash
set -eou pipefail
cd /home/cmheisel/webapps/isittikiseason_static/mc
URL="https://mailchimp.com/about/jobs/all/"
DATADIR="./data"
DIFFDIR="./diffs"
DATE=`date +%Y-%m-%d_%H-%M-%S`

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

import sys
import pprint
# This formats the path into a nicely readable string
readable_path = pprint.pformat(sys.path)
# We'll try importing and catch the exception if it doesn't work
try:
import django
except ImportError, e:
[credential]
helper = osxkeychain
@cmheisel
cmheisel / .profile
Created January 14, 2015 21:20
Docker cleanup commands
# Kill exited containers and orphaned images, the kind, gentle way
alias dockercleancontainers="docker rm \$(docker ps -a --no-trunc | grep 'Exit' | awk '{print \$1}')"
alias dockercleanimages='docker rmi $(docker images -f dangling=true -q)'
alias dockerclean='dockercleancontainers && dockercleanimages'
# Kill all containers and all images with impunity. Dust off and nuke the site from orbit... only way to be sure
alias rmcont='docker rm $(docker ps -a -q)'
alias rmis='docker rmi -f $(docker images -a -q)'
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
settings.INSTALLED_APPS
File "/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 46, in __getattr__
self._setup(name)
File "/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup
@cmheisel
cmheisel / Berksfile
Last active March 5, 2018 21:50
OpsWorks Docker image-based deployment
source "https://supermarket.getchef.com"
metadata
cookbook "apt", '~>2.6.0'
cookbook 'docker', '~> 0.36.0'
cookbook 'windows', '~> 1.34.0'
{
"bold_folder_labels": true,
"caret_style": "solid",
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
@cmheisel
cmheisel / instructions.md
Last active February 23, 2016 19:54
Kabbage Code Sample

User story

As a Kabbage developer, I want to see how you code a lightweight application, so that I can get a feel for your skills and strengths.

Acceptance Criteria:

  1. Given a user, when they access your application, then they should be presented with a search box prompting them for a topic
  2. Given a user, when they enter a topic, results from Twitter should be returned
  3. Given a user, when they enter a topic, results from Wikipedia should be returned
  4. Given a user who's performed a search, when they hit the browser's refresh button, results should be refreshed under the same search criteria.
@cmheisel
cmheisel / treklinks.html
Created October 23, 2014 14:17
treklinks