This file contains hidden or 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
;(function($, undefined) { | |
var PLUGIN_NAME = 'plugin'; | |
var DEFAULT_OPTIONS = { | |
optionA: true, | |
optionB: false, | |
'callbackC': function() { | |
} | |
}; | |
function plugin(options) { |
This file contains hidden or 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
class TastypieApiKeyUserMiddleware(object): | |
""" | |
Middleware for per-request authentication with tastypie | |
""" | |
# Name of request header to grab username from. This will be the key as | |
# used in the request.META dictionary, i.e. the normalization of headers to | |
# all uppercase and the addition of "HTTP_" prefix apply. | |
header = 'HTTP_AUTHORIZATION' | |
method = 'apikey' | |
apikey_auth = ApiKeyAuthentication() |
This file contains hidden or 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
## Print stack trace | |
def exception_printer(sender, **kwargs): | |
import sys, traceback | |
print >> sys.stderr, ''.join(traceback.format_exception(*sys.exc_info())) | |
raise | |
## Set breakpoint | |
import pdb | |
pdb.set_trace() |
This file contains hidden or 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
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage' | |
PIPELINE_COMPILERS = ( | |
'pipeline_compass.compass.CompassCompiler', | |
) | |
PIPELINE_CSS = dict(zip(PROJECT_APPS, [{ | |
'source_filenames': ( | |
(app + '/sass/*.scss'), | |
), |
This file contains hidden or 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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
compass: { | |
// see configmerge.compass | |
}, | |
watch: { | |
// see configmerge.watch | |
} | |
configmerge: { | |
compass: { |
This file contains hidden or 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 | |
# file: gen.sh | |
# usage: ./gen.sh [name] | |
ROOT=rootCA | |
NAME=${1:-device} | |
EXTS=( key cnf csr crt ) | |
ROOT_NAME=rootCA | |
ROOT_EXTS=( key pem ) |
This file contains hidden or 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
<html> | |
<head> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
.row span { | |
display: inline-block; | |
position: relative; |
OlderNewer