Skip to content

Instantly share code, notes, and snippets.

View orf's full-sized avatar

Tom Forbes orf

View GitHub Profile
@orf
orf / travis-secure-redefine.py
Last active October 15, 2017 02:26 — forked from simon-weber/travis-secure-redefine.py
Python script to allow use of TravisCI secure arg variables that would normally be defined on each line of a build matrix, but are too large for the key size when combined.See https://github.com/travis-ci/travis-ci/issues/1736 for motivation. If you just need to secure a lot of sample data, do something like https://github.com/travis-ci/travis/i…
#!/usr/bin/env python
from __future__ import print_function
"""
./%s 'cmd' <id-argname> <redef-argname> [<redef-argname>...]
Given the current environment:
IDARG=1
FOO1=foovalue
BAR1=barvalue
FOO2=foo-unused
@orf
orf / models.py
Last active April 26, 2016 15:46 — forked from malgorath/models.py
trying to get {{ t.start_stamp }} to display as a date, its saved as a Unix EPOC timestamp
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Make sure each ForeignKey has `on_delete` set to the desired behavior.
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
from __future__ import unicode_literals
from django.db import models
from datetime import datetime