๐
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
from flask import Flask | |
from flask import request | |
import subprocess | |
app = Flask('flaskshell') | |
ip_whitelist = ['192.168.1.2', '192.168.1.3'] | |
query_success = "SELECT COUNT(*) FROM flasktest.tasks WHERE task_status='Success'" | |
query_pending = "SELECT COUNT(*) FROM flasktest.tasks WHERE task_status='Pending'" | |
query_failed = "SELECT COUNT(*) FROM flasktest.tasks WHERE task_status='Failed'" |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
) | |
func main() { |
This code is taken from DJ's Weblog, thanks a lot for this!
- You'll need the key of your spreadsheet, the url format should be like this:
https://docs.google.com/spreadsheet/ccc?key=**YOUR-KEY-HERE**=drive_web#gid=0
and also the sheet number (i.e., Sheet 1). - In your document file menu, you'll find File Menu > Tools > Script Editor (you will be redirected to Google's script editor.
- Create a new Script file, and paste the content of the
SheetAsJSON.js
to the editor stage, and save it.
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
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
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
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
NewerOlder