Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/bin/bash | |
| NAME="hello_app" # Name of the application | |
| DJANGODIR=/webapps/hello_django/hello # Django project directory | |
| SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket | |
| USER=hello # the user to run as | |
| GROUP=webapps # the group to run as | |
| NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
| DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use | |
| DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000This guide will walk you through how you can use a GitHub repository to house your wiki content, have DocPad render it, and automatically update on changes. It's also really nice as we get to benefit from the github project workflow for our wiki, that is issues, pull requests, etc.
We use this workflow heavily by linking the DocPad Website and the DocPad Documentation repositories allowing us to have users edit and submit pull requests for improvements to our documentation, and once merged, the website regenerates automatically.
| # | |
| # A CORS (Cross-Origin Resouce Sharing) config for nginx | |
| # | |
| # == Purpose | |
| # | |
| # This nginx configuration enables CORS requests in the following way: | |
| # - enables CORS just for origins on a whitelist specified by a regular expression | |
| # - CORS preflight request (OPTIONS) are responded immediately | |
| # - Access-Control-Allow-Credentials=true for GET and POST requests |
| #!/usr/bin/env python | |
| import binascii, sys, json | |
| import version, tnetstring, flow | |
| from datetime import datetime | |
| def create_har(flows): | |
| return { | |
| "log":{ |
| import java.io.IOException; | |
| import java.net.URL; | |
| import java.util.Date; | |
| import java.util.List; | |
| import java.util.logging.Level; | |
| import org.json.*; | |
| import org.openqa.selenium.*; | |
| import org.openqa.selenium.chrome.*; | |
| import org.openqa.selenium.logging.*; |
| /** | |
| * iOS 6 style switch checkboxes | |
| * by Lea Verou http://lea.verou.me | |
| */ | |
| :root input[type="checkbox"] { /* :root here acting as a filter for older browsers */ | |
| position: absolute; | |
| opacity: 0; | |
| } |
This may be a dumb solution, you'd better use $rootScope.$on(event, handler) and $rootScope.$emit(event, args…) and not use a third-party service.
My solution will bring you:
off() if you really want to clean up your event handlers| // Generated on 2013-03-01 using generator-webapp 0.1.5 | |
| 'use strict'; | |
| var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
| var mountFolder = function (connect, dir) { | |
| return connect.static(require('path').resolve(dir)); | |
| }; | |
| var pushStateHook = function (url) { | |
| var path = require('path'); | |
| var request = require('request'); // Need to be added into package.json |