I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.
- Flask is managed by
uWSGI
. uWSGI
talks tonginx
.
// ==UserScript== | |
// @name Amazon Search | |
// @namespace https://www.amazon.com/ | |
// @version 1.3 | |
// @description Provides Amazon Search UI on product pages | |
// @author Ravikiran Janardhana | |
// @match https://www.amazon.com/*/dp/* | |
// @updateURL https://gist.github.com/ravikiranj/2d9cc6cf3d4052ae4043fa2c1eb06a62/raw/amazon-search.js | |
// @downloadURL https://gist.github.com/ravikiranj/2d9cc6cf3d4052ae4043fa2c1eb06a62/raw/amazon-search.js | |
// @grant none |
/* Pre-requisite | |
================== | |
1) Create an Environment (if you don't already have on) and enable it for your request | |
2) Add a new Header with key as "Authorization" and value as "{{hmacAuthHeader}}" | |
3) Add the following Pre-request Script that computes the hmacAuthHeader variable and adds it to the environment | |
4) Fill your CLIENT_KEY and SECRET_KEY with valid values | |
*/ | |
function getPath(url) { | |
var pathRegex = /.+?\:\/\/.+?(\/.+?)(?:#|\?|$)/; |
# Mercurial | |
__hg_ps1 () { | |
local HG_PROMPT=$(hg prompt "{branch}:{status}:{update}:{count}:{node|short}" 2>/dev/null) | |
local HG_ARRAY=() | |
local PRINTF_FORMAT="$1" | |
if [ ! -z "$HG_PROMPT" ]; then | |
IFS=':' read -ra HG_OPTIONS <<< "$HG_PROMPT" | |
for HG_OPTION in "${HG_OPTIONS[@]}"; do | |
if [[ "$HG_OPTION" != "" ]]; then |
#!/usr/bin/env python | |
""" | |
Usage: ./checkout_github_repos.py -u <github_user> -o <output_dir> | |
Example: ./checkout_github_repos.py -u ravikiranj -o . | |
""" | |
import argparse | |
import os | |
import sys | |
import traceback |
diff --git a/dist/scripts/api-console.js b/dist/scripts/api-console.js | |
index d18b436..7f11586 100644 | |
--- a/dist/scripts/api-console.js | |
+++ b/dist/scripts/api-console.js | |
@@ -2039,6 +2039,49 @@ | |
setPromise(ramlParser.load(raml)); | |
}; | |
+ var showEndpointDoc = function() { | |
+ var hash = window.location.hash |
I, Ravikiran Janardhana, have read and do accept the MuleSoft Contributor Agreement | |
at http://www.mulesoft.org/legal/contributor-agreement.html | |
Accepted on Thu Sep 17 2015 09:25:46 GMT-0700 (PDT) |
#!/usr/bin/env python | |
import simplejson | |
import logging | |
import math | |
logging.basicConfig(level=logging.INFO) | |
logger = logging.getLogger(name=__name__) | |
fname = "runkeeper.com-1436665918102.json" |
{ | |
"data": [ | |
[ | |
0, | |
321.5223102 | |
], | |
[ | |
0.0005886649578697319, | |
321.5223102 | |
], |
#!/usr/bin/env python | |
# sudo apt-get install python-pygame | |
import pygame | |
from os.path import basename | |
def drawCoordinates(filepath, coordinates): | |
# Load image | |
surface = pygame.image.load(filepath) | |
# Convert and preserve alpha values so that colors make sense |