Skip to content

Instantly share code, notes, and snippets.

View chartjes's full-sized avatar

Chris Hartjes chartjes

View GitHub Profile
'''
bug_data is a dict like {'product': 'Cloud Services', 'version': 'Unspecified'}
Is there a better way to do look for specific keys in that dict so I can say
"You are missing one of the default fields
'''
if 'product' not in bug_data:
return "Missing 'product' field"
elif 'component' not in bug_data:
return "Missing 'component' field"
elif 'summary' not in bug_data:
@chartjes
chartjes / gist:d2a09f35bddbcab124ffc677b90f526b
Created December 4, 2017 15:47
Question about Flysystem
In OpenCFP we store the generated name of speaker images that people upload
and then assume the path is always '/uploads/<name of file>'
I have plans to want to allow OpenCFP to be deployed on Heroku where we could
not write image files to the filesystem. I have already played around with
Flysystem and have it writing files locally but I want to add the ability to
have those files exist on S3 and the app find them.
Is there a method where I can ask an adapter "what is your path" and then
prepend that to the image name we're storing in the database.
FROM frolvlad/alpine-python3
RUN apk add --update make gcc git python3-dev musl-dev libffi-dev openssl-dev py-pip
RUN pip install -r requirements.txt
COPY . /app
WORKDIR /app
CMD pytest --env=$TEST_ENV config-test/ -s

Keybase proof

I hereby claim:

  • I am chartjes on github.
  • I am chartjes (https://keybase.io/chartjes) on keybase.
  • I have a public key ASDD8qbzrBLb6_id_Cu-ALYTI42BT1uXCfDeKgCOo5Svcgo

To claim this, I am signing this object:

https://web.archive.org/web/20120928234200/http://www.truenorthphp.ca:80/
https://web.archive.org/web/20130925043449/http://www.truenorthphp.ca:80/
https://web.archive.org/web/20141005191248/http://www.truenorthphp.ca:80/
https://web.archive.org/web/20151023073631/http://www.truenorthphp.ca:80/
https://truenorthphp.ca/speakers.php
chartjes@grumpiermbp:~/S/atthekeyboard:master$ composer require sculpin/sculpin
Using version ^2.1 for sculpin/sculpin
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package dflydev/embedded-composer (locked at 1.0.x-dev) is satisfiable by dflydev/embedded-composer[1.0.x-dev] but these conflict with your requirements or minimum-stability.
Problem 2
<?php
class Game extends Model {
public $name = 'Game';
public $belongsTo = array(
'HomeTeam' => array(
'className' => 'Franchise',
),
'AwayTeam' => array(
'className' => 'Franchise')
);
{
"swagger": "2.0",
"externalDocs": {
"description": "Full Documentation",
"url": "http://kinto.readthedocs.io"
},
"info": {
"title": "kinto",
"version": "",
"description": "Kinto is a minimalist JSON storage service with synchronisation and sharing abilities. It is meant to be easy to use and easy to self-host.\n\n**Note:** This OpenAPI specification is not fully compliant with the Kinto API and contain some undocumented Swagger schemas. For a list of known limitations please refer to the [Oficial Kinto documentation](kinto.readthedocs.io/en/stable/api/1.x/openapi.html).",
@chartjes
chartjes / gist:c9d595a888c8bde970a089346d134114
Created November 29, 2016 14:23
Didn't Want To Give Grumpy My Email Coupons
https://leanpub.com/grumpy-hack/c/nogrumpyemail
https://leanpub.com/grumpy-testing/c/nogrumpyemail
https://leanpub.com/grumpy-phpunit/c/nogrumpyemail
https://leanpub.com/minimumviabletests/c/nogrumpyemail

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: