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
import urllib2 | |
import json | |
import time | |
# Form: http://digitalpbk.com/stock/google-finance-get-stock-quote-realtime | |
class GoogleFinanceAPI: | |
def __init__(self): | |
self.prefix = "http://finance.google.com/finance/info?client=ig&q=" | |
def get(self,symbol,exchange): |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Capture Photo</title> | |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/> | |
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
var pictureSource; // picture source | |
var destinationType; // sets the format of returned value |
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
// Generated by CoffeeScript 1.6.3 | |
(function() { | |
var exportDb; | |
exportDb = function(name, cb) { | |
var handler; | |
handler = indexedDB.open(name); | |
handler.onsuccess = function(sender) { | |
var db, results, stores, transaction; | |
db = sender.target.result; |
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
// prerequisite: browserify formula.js and load it | |
SocialCalc.Formula.CalculateFunction = function(fname, operand, sheet) { | |
var fobj, foperand, ffunc, argnum, ttext,args,elem; | |
var scf = SocialCalc.Formula; | |
var ok = 1; | |
var errortext = ""; | |
fobj = scf.FunctionList[fname]; | |
if (fobj) { |
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
app: live/rainews_nogeo@44311?auth=daEbmanbOclavbpbmdhcXb3aTaUcKdacbct-bu_l6S-c0-CjuvrGo&aifp=V001 | |
flashVer: LNX 14,0,0,145 | |
swfUrl: http://www.rai.tv/dl/player/Fallback/flashmediaelement.swf | |
tcUrl: rtmp://cp113192.live.edgefcs.net/live/rainews_nogeo@44311?auth=daEbmanbOclavbpbmdhcXb3aTaUcKdacbct-bu_l6S-c0-CjuvrGo&aifp=V001 | |
pageUrl: http://www.rai.tv/dl/RaiTV/dirette/PublishingBlock-233b8482-1cbc-4970-87d5-9d7604b26ddb.html?channel=RaiNews | |
Playpath: rainews_nogeo@44311?auth=daEbmanbOclavbpbmdhcXb3aTaUcKdacbct-bu_l6S-c0-CjuvrGo&aifp=V001 | |
ERROR: Request timeout/select failed, ignoring request | |
Closing connection... done! |
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
../android-sdk-linux/platform-tools/adb pull /dev/graphics/fb0 fb0 | |
dd bs=1920 count=800 if=fb0 of=fb0b | |
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 480x800 -i fb0 -f image2 -vcodec png image.png |
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 fs = require('fs'); | |
var file = __dirname + '/test.json'; | |
fs.readFile(file, 'utf8', function (err, data) { | |
if (err) { | |
console.log('Error: ' + err); | |
return; | |
} | |
data = JSON.parse(data); |
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
/** | |
* @author Phil Teare | |
* using wikipedia data | |
*/ | |
isoLangs = { | |
"ab":{ | |
"name":"Abkhaz", | |
"nativeName":"аҧсуа" | |
}, | |
"aa":{ |
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
# Step 0 -- create test data | |
redis-cli HSET :object:30343552:data foo bar | |
# Step 1 -- store sample function 'sampleFunction' | |
redis-cli SET :functions:sample "redis.call('SELECT', 0);local data=redis.call('HGETALL',':object:' .. ARGV[1] .. ':data');return data" | |
# Step 2 -- create function loader | |
redis-cli SCRIPT LOAD "f=loadstring(redis.call('get',':functions:' .. KEYS[1]));return f()" | |
# Step 3 -- test |
OlderNewer