This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import subprocess | |
from optparse import make_option | |
from django.core.management.commands.runserver import BaseRunserverCommand | |
from django.conf import settings | |
class Command(BaseRunserverCommand): | |
option_list = BaseRunserverCommand.option_list + ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
site_name: C1.com.bo | |
description: C1 | |
keywords: design, bolivia | |
build_dir: htdocs | |
apps: | |
blog: | |
handler: constructor.handlers.BlogHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: default deploy | |
ROOT_PATH := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) | |
PROJECT_DIR := $(ROOT_PATH)/src | |
PYENV := $(ROOT_PATH)/env | |
python := $(ROOT_PATH)/env/bin/python | |
pip := $(ROOT_PATH)/env/bin/pip | |
remote = ssh app@deploy -qnt -C '. ~/.profile && cd ~/app &&$1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
hg diff --stat -r $HG_NODE -r tip | |
BRANCH=$(hg log --template '{branches}' -r $HG_NODE) | |
if [ "$BRANCH" == "release" ] ; then | |
hg update --clean release >&2 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from project import api | |
from .resources import UserResource | |
api.resources.register(UserResource) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# As http://developer.ubuntu.com/get-started/gomobile/ says | |
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper | |
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa | |
sudo apt-get update | |
sudo apt-get install ubuntu-sdk notepad-qml | |
# On ubuntu 12.04 qmake 3 is set as the default alternative for qmake, | |
# I was no able to start correctly the qt-designer, so I search the | |
# qmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load after jquery.js | |
// Instead of $('#my_input').val(), do $('#my_input').trimmed_val() | |
(function() { | |
String.prototype.trim = function(){return this.replace(/^\s+|\s+$/g, '');}; | |
String.prototype.ltrim = function(){return this.replace(/^\s+/,'');}; | |
String.prototype.rtrim = function(){return this.replace(/\s+$/,'');}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# u1sdtool wrapper for headless Ubuntu One | |
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then | |
ENVVAR="DBUS_SESSION_BUS_ADDRESS" | |
eval $(ps xe | grep "[u]buntuone-syncdaemon.*$ENVVAR" | \ | |
sed -E "s/.*($ENVVAR=[^ ]+).*/\1/g" ) | |
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then | |
# Ubuntu One is not running and we don't have a dbus daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install apache2-threaded-dev apache2-utils apache2.2-bin apache2.2-common \ | |
cdbs dctrl-tools devscripts dh-translations erlang-base erlang-dev help2man intltool \ | |
javahelper libapr1 libapr1-dev libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-dev \ | |
libaprutil1-ldap libarchive-zip-perl libjansson-dev libjansson4 libldap2-dev \ | |
liblua5.1-0-dev libluajit-5.1-2 libluajit-5.1-common libluajit-5.1-dev libmysqlclient-dev \ | |
libperl-dev libpgm-5.1-0 libpython3.2 libreadline-dev libzmq-dev libzmq1 \ | |
python-all python-all-dev python-greenlet-dev python-scour python3-all python3-all-dev \ | |
python3-dev python3.2-dev uuid-dev python-pip build-essential python-dev \ | |
libjansson-dev libpq-dev libxml2-dev libyaml-dev libdb-dev libxslt1-dev libsqlite3-dev \ | |
libcurl4-openssl-dev libgeoip-dev libbz2-dev |