Accompanying blog post:
Splitting a Python codebase into dependencies for fun and profit
Based on:
# Commit with scope / message shortcuts | |
# Remember to quote $2 if it contains spaces | |
# | |
# Usage: | |
# git <alias> <scope> "<Commit Message>" | |
# | |
# Example: | |
# git chore docs "Update README.md" | |
chore = "!f() { git commit -m \"chore($1): $2\"; }; f" | |
fix = "!f() { git commit -m \"fix($1): $2\"; }; f" |
// Hook a fixed position element into the DjangoCMS toolbar expanded / collapsed states | |
.fixed-element { | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100% | |
.cms-toolbar-expanding &, | |
.cms-toolbar-expanded & { | |
top: 46px; |
{ | |
"CORSRules": [ | |
{ | |
"AllowedOrigins": ["*.herokuapp.com"], | |
"AllowedHeaders": ["Authorization"], | |
"AllowedMethods": ["GET"], | |
"MaxAgeSeconds": 3000 | |
} | |
] | |
} |
"""Collect settings for this app from django settings.""" | |
from django.core.exceptions import ImproperlyConfigured | |
class NotSetButRequired(object): | |
def __repr__(self): | |
return '<{0}>'.format(self.__class__.__name__) |
# See: https://github.com/joke2k/django-environ/blob/v0.4.1/environ/environ.py#L48 | |
class NoValue(object): | |
def __repr__(self): | |
return '<{0}>'.format(self.__class__.__name__) | |
# https://github.com/joke2k/django-environ/blob/v0.4.1/environ/environ.py#L67 | |
NOTSET = NoValue() |
Accompanying blog post:
Splitting a Python codebase into dependencies for fun and profit
Based on:
brew upgrade $(brew outdated | grep '^[a-zA-Z]') |
define(function (require, exports, module) { | |
var _ = require("underscore"); | |
var $ = require("jquery"); | |
var backbone = require("backbone"); | |
var marionette = require("marionette"); | |
var UploadImagesModalView = marionette.LayoutView.extend({ | |
validTansitionStates: ["initial", "activity", "valid", "invalid"], | |
git subtree add --prefix src/bigview/static/js/vendor git@github.com:blitzagency/agency-ui-deps.git master --squash
git subtree add --prefix src/bigview/static/js/vendor/auf git@github.com:blitzagency/agency-ui-foundation.git master --squash
#! /bin/bash | |
read -r -p "This will restart Chrome, is that ok? [Y/n] " response | |
case $response in | |
[yY][eE][sS]|[yY]) | |
killall Google\ Chrome | |
sleep 1s | |
open -a Google\ Chrome --args --allow-file-access-from-files | |
;; |