Skip to content

Instantly share code, notes, and snippets.

View c17r's full-sized avatar

Christian Sauer c17r

  • Northern Virginia, USA
  • 16:59 (UTC -04:00)
View GitHub Profile
@c17r
c17r / build.cake
Created August 17, 2020 21:27 — forked from michaelkc/build.cake
A real-world example of using CAKE, TeamCity and Octopus together
#tool "nuget:?package=NUnit.ConsoleRunner&version=3.10.0"
#tool "nuget:?package=NUnit.Extension.TeamCityEventListener&version=1.0.6"
#tool "nuget:?package=JetBrains.dotCover.CommandLineTools&version=2019.2.1"
#tool "nuget:?package=OctopusTools&version=6.12.0"
#addin "nuget:?package=Octopus.Client&version=7.0.4"
#addin "nuget:?package=Newtonsoft.Json&version=12.0.2"
#addin "nuget:?package=Cake.Json&version=4.0.0"
#addin "nuget:?package=Cake.Git&version=0.21.0"
#addin "nuget:?package=Cake.FileHelpers&version=3.2.1"
#addin "nuget:?package=Cake.Http&version=0.7.0"
@c17r
c17r / models.py
Last active August 4, 2016 04:54
simple billing strategy
import arrow
class Org(models.Model):
last_bill = models.DateTimeField(auto_now_add=True)
class User(models.Model):
org = models.ForeignKey('Org')
last_login = models.DateTimeField() # needs to be updated as part of login process
@c17r
c17r / ubuntu-global-pyenv.md
Last active June 9, 2016 17:44
Ubuntu 14.04, pyenv globally w/ 2.7.11 & 3.5.1, filesystem-style venvs & virtualenvwrapper-style venvs

As Admin

# sudo apt-get install git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev
# pip install virtualenv virtualenv-clone virtualenvwrapper

# git clone https://github.com/yyuu/pyenv.git /opt/pyenv
# git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git /opt/pyenv/plugins/py-virtualenvwrapper

# cat << 'EOF' >> /etc/bash.bashrc
@c17r
c17r / gist:3b941cb3516190c388eb
Created October 26, 2015 19:26
Django: all logging to console
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django': {
@c17r
c17r / keybase.md
Last active August 29, 2015 14:02

Keybase proof

I hereby claim:

  • I am c17r on github.
  • I am c17r (https://keybase.io/c17r) on keybase.
  • I have a public key whose fingerprint is 183C B474 63CC 8BFB 8A0F 915E 1695 2530 1598 FA48

To claim this, I am signing this object:

@c17r
c17r / gist:8846197
Created February 6, 2014 15:19
Git: clone a branch without fetching other branches
mkdir $BRANCH
cd $BRANCH
git init
git remote add -t $BRANCH -f origin $REMOTE_REPO
git checkout $BRANCH