This file contains 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/sh | |
_now="date +%s" | |
_power="cat /sys/class/power_supply/BAT0/charge_now" | |
full_power=$(cat /sys/class/power_supply/BAT0/charge_full) | |
last=$($_now) | |
last_power=$($_power) | |
while true |
This file contains 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
var http = require('http'), | |
httpProxy = require('http-proxy'); | |
var targetPort = 5555; | |
var serverPort = 5050; | |
var proxy = httpProxy.createProxyServer({}); | |
// To modify the proxy connection before data is sent, you can listen | |
// for the 'proxyReq' event. When the event is fired, you will receive |
This file contains 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 request, Flask | |
from flask.ext import restful | |
class Api(restful.Api): | |
def __init__(self, app, prefix='', default_mediatype='application/json', | |
decorators=None): | |
super(Api, self).__init__(app, prefix, default_mediatype, decorators) |