Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
application: you-app-name-here | |
version: 1 | |
runtime: python | |
api_version: 1 | |
default_expiration: "30d" | |
handlers: | |
- url: /(.*\.(appcache|manifest)) | |
mime_type: text/cache-manifest |
# variables common to the lms role, automatically loaded | |
# when the role is included | |
--- | |
# These are variables that default to a localhost | |
# setup and are meant to be overwritten for | |
# different environments. | |
# | |
# Variables in all caps are environment specific | |
# Lowercase variables are internal to the role |
--- | |
## build-version.yml | |
# | |
# Use with ansible bringup; | |
# - *_version specs can be branches, tags, or commits | |
# - you can comment out any items you do not want to override; | |
# they will retain their settings as in ansible playbooks | |
# for those items. | |
# |
--- | |
## build-version.yml | |
# | |
# Use with ansible bringup; | |
# - *_version specs can be branches, tags, or commits | |
# - you can comment out any items you do not want to override; | |
# they will retain their settings as in ansible playbooks | |
# for those items. | |
# |
// These two need to be declared outside the try/catch | |
// so that they can be closed in the finally block. | |
HttpURLConnection urlConnection = null; | |
BufferedReader reader = null; | |
// Will contain the raw JSON response as a string. | |
String forecastJsonStr = null; | |
try { | |
// Construct the URL for the OpenWeatherMap query |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
Setting up Dokku with DigitalOcean and Namecheap
..or how I made my own heroku in a few hours for $3.98.
This write-up owes a great deal to dscape's Node.js Deployments with Docker, Dokku, & Digital Ocean, the dokku project itself, and the fine folks working on dokku's issues. I took dscape's article as a starting point when trying this out but found some details lacking so I documented my own process for getting dokku up and running.
#coding: utf-8 | |
from django.test.simple import DjangoTestSuiteRunner | |
from nose.plugins.skip import SkipTest | |
from mongoengine.python_support import PY3 | |
from mongoengine import connect | |
try: | |
from django.test import TestCase | |
from django.conf import settings |
#!/usr/bin/python | |
import argparse | |
from pymongo import MongoClient as Client | |
from bson import BSON | |
from bson import json_util | |
import json | |
import os | |
# mongo client |