Skip to content

Instantly share code, notes, and snippets.

View whitmo's full-sized avatar
💭
state 26

Whit Morriss whitmo

💭
state 26
View GitHub Profile
@whitmo
whitmo / cracklepop.py
Created September 24, 2019 17:29
Crakkly Pop
"""
Write a program that prints out the numbers 1 to 100 (inclusive).
If the number is divisible by 3, print Crackle instead of the number.
If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, print CracklePop.
"""
import sys
import io
import base64
@whitmo
whitmo / terraform-review.md
Created December 4, 2018 14:43
Reviewing terraform
@whitmo
whitmo / final-session.md
Last active December 11, 2017 00:06
Poem for my mindfulness facilitator training group

Final Session (on ephemerality)

for PDMF Fall 2017

every day
in fact every single moment is
the end of the world as we know it

On this cold day
#!/bin/bash
apt-get update -qq
apt-get install -qy apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
mkdir -p /etc/apt/sources.list.d/
echo 'deb https://apt.dockerproject.org/repo ubuntu-wily main' > /etc/apt/sources.list.d/docker.list
apt-get update -qq
sudo apt-get -qy install "linux-image-extra-$(uname -r)"

Hi [Recruiter Person],

Some salty (but free) advice from a person who gets alot of recruitment spam: if you are recruiting, you probably want to be overly considerate and communicative (even if recruiting often is a shotgun & dragnet proposition).

Make yourself look like less of rookie and do your best to pass the turing test. IOW treat my time as if it is as precious as your own.

To that end, lead with what you have.

  • where are you?
  • what are you looking for?
@whitmo
whitmo / app_w_predcli.py
Last active December 26, 2015 21:28
Hypothetical predictionio include
from pyramid.config import Configurator
def view(request):
client = request.predcli
client.identify("u100")
client.record_action_on_item("rate", "i200", { "pio_rate": 2 })
return {info:'recorded action'}
def main(global_config, **settings):
config = Configurator(settings=settings)
@whitmo
whitmo / boilerplate.py
Last active December 21, 2015 23:59
problem test
from contextlib import contextmanager
from pyramid.config import Configurator
import wsgi_intercept
class app_ctor(object):
def __init__(self, vc, include='smlib.service', renderer='string', **settings):
settings = settings.copy()
self.config = config = Configurator(settings=settings)
config.include(include)
@whitmo
whitmo / pip.log
Created July 18, 2013 17:43
Failed cornice install
------------------------------------------------------------
/Users/whit/dev/cornice-issue-test/bin/pip run on Thu Jul 18 10:33:45 2013
Downloading/unpacking cornice
Getting page http://pypi.python.org/simple/cornice
URLs to search for versions for cornice:
* http://pypi.python.org/simple/cornice/
Getting page http://pypi.python.org/simple/cornice/
Analyzing links from page https://pypi.python.org/simple/cornice/
Found link https://pypi.python.org/packages/source/c/cornice/cornice-0.5.tar.gz#md5=5aa85f718ae29d08efbbe20e5b3ae721 (from https://pypi.python.org/simple/cornice/), version: 0.5