Works well with sloria's cookiecutter-pypackage template.
- Update HISTORY.rst
- Update version number in
my_project/__init__.py
- Run the tests:
git checkout dev
python setup.py test
tox
import abc | |
import math | |
import collections | |
import six | |
@six.add_metaclass(abc.ABCMeta) | |
class Paginator(object): | |
var slice = Array.prototype.slice; | |
function Class( Super, Schema ){ | |
if( arguments.length < 2 ){ | |
Schema = Super; | |
Super = Object; | |
} | |
var constructor = Schema.constructor ? Super ? function SubClass(){ | |
var args = slice.call( arguments ); |
m.callableComponent = function (componentObj) { | |
var componentFn = function (props, content) { | |
return m.component(componentFn, props, content) | |
} | |
if (componentObj) { | |
for (var prop in componentObj) { | |
componentFn[prop] = componentObj | |
} | |
} | |
return componentFn |
- name: Install lxml requirements | |
apt: "pkg={{ item }} state=present update_cache=yes" | |
sudo: yes | |
with_items: | |
- python-dev | |
- libxml2 | |
- libxml2-dev | |
- libxslt1-dev | |
- lib32z1-dev | |
- libssl-dev |
import six | |
import inflection | |
import marshmallow as ma | |
class Model(object): | |
def __init__(self, **kwargs): | |
self._schema = self.Schema() | |
self.load(**kwargs) |
Works well with sloria's cookiecutter-pypackage template.
my_project/__init__.py
git checkout dev
python setup.py test
tox
var MyComponent = Factory({ | |
willMount: function(element, context) { | |
console.log('component mounted', element.tagName); | |
}; | |
willUnmount: function(element, context) { | |
console.log('component unmount', element.tagName); | |
}; | |
view: function() { |
#!/usr/bin/env bash | |
# dontforget | |
# Description: A stupid script for short term reminders in bash | |
# Requires: espeak, mpg123, notify-send, ogg123 (vorbis-tools) | |
# Source: http://brettterpstra.com/2016/01/22/quick-reminders-from-terminal | |
# Usage: | |
# | |
# Arguments just need to contain a number and a bunch of words. | |
# | |
# The number can be anywhere in the arguments, but there shouldn't |
import sys | |
from django.conf import settings | |
settings.configure( | |
DEBUG=True, | |
SECRET_KEY='thisisthesecretkey', | |
ROOT_URLCONF=__name__, | |
MIDDLEWARE_CLASSES=( | |
'django.middleware.common.CommonMiddleware', | |
'django.middleware.csrf.CsrfViewMiddleware', | |
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
Recent improvements to the ClojureScript compiler have greatly simplified setting up development versus production outputs.
This example uses Figwheel as something that you want to exclude for production, but the pattern is general.
With this simple setup you only need one html file/view and it will work for developement and production.