Skip to content
View photo_data.md

state.photos as an object

state.photos = {
  '2016-01-20 5:30': 'IMGDATA...',
  '2016-01-20 12:30': 'IMGDATA...',
  '2016-01-21 13:30': 'IMGDATA...'
}
View download.js
var webtorrent = require('webtorrent')
var client = webtorrent({
wrtc: require('wrtc')
})
client.add(process.argv[2], function (torrent) {
torrent.files.forEach(function (file) {
console.log(file.name)
console.log('---------------------')
file.createReadStream().pipe(process.stdout)
View swarm.js
var signalhub = require('signalhub')
var hub = signalhub('cool', [
'https://signalhub.mafintosh.com/',
'https://instant.io:8080/',
'https://signalhub.publicbits.org/'
])
var swarm = require('webrtc-swarm')
var sw = swarm(hub)
View index.js
example $ gdb `which node`
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
View gist:8ca098e8203751d09e6b
+ var ps = spawn('aoss', ['flite', '-voice', '/opt/voices/cmu_us_slt.flitevox']);
+ ps.stdin.end(argv._.join(' '));
+ } else if(/^!ssay\s+/.test(message)) {
+ var argv = minimist(message.split(/\s+/).slice(1));
+
+ var ps = spawn('aoss', ['flite', '-voice', '/opt/voices/cmu_us_awb.flitevox']);
+ ps.stdin.end(argv._.join(' '));
+ } else if(/^!fsay\s+/.test(message)) {
+ var argv = minimist(message.split(/\s+/).slice(1));
View gist:6e5337a82198b2ed26ec
geotiff-extents $ node example/extents.js /home/substack/landsat/downloads/LC80700192015294LGN00/LC80700192015294LGN00_B2.TIF
{ upperLeft: [ -155.62757614534797, 59.781490186078884 ],
lowerLeft: [ -155.46612438446172, 57.56866631571051 ],
upperRight: [ -151.27624278582903, 59.79644709112181 ],
lowerRight: [ -151.3822362875974, 57.58238285553903 ],
center: [ -153.4380373185701, 58.69959098078464 ] }
geotiff-extents $ listgeo -d /home/substack/landsat/downloads/LC80700192015294LGN00/LC80700192015294LGN00_B2.TIF | tail -n5
Upper Left ( 352500.000, 6630000.000) (-155.6275761,59.7814902)
Lower Left ( 352500.000, 6383370.000) (-155.4661244,57.5686663)
Upper Right ( 596730.000, 6630000.000) (-151.2762428,59.7964471)
View gist:61e84293ce07d8e0a4d1
$ landsat download LC80700192015294LGN00
===> Downloading: LC80700192015294LGN00_B4.TIF
100% 48.8 MiB 3.1 MiB/s 0:00:00 ETA
stored at /home/substack/landsat/downloads/LC80700192015294LGN00
===> Downloading: LC80700192015294LGN00_B3.TIF
100% 47.6 MiB 3.7 MiB/s 0:00:00 ETA
stored at /home/substack/landsat/downloads/LC80700192015294LGN00
===> Downloading: LC80700192015294LGN00_B2.TIF
100% 46.7 MiB 3.5 MiB/s 0:00:00 ETA
stored at /home/substack/landsat/downloads/LC80700192015294LGN00
View instructions.md

fixing mystery android "tablet pc" tablets

get a shell

First install adb:

$ sudo apt-get install android-tools-adb
View gist:b8c63ea2338edbf52d28
checking whether C compiler accepts -Wsometimes-uninitialized... no
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -Wall -Wextra... yes
checking for clang... no
checking whether C compiler accepts -Wall -Wextra -Wbad-function-cast... yes
checking whether C compiler accepts -Wall -Wextra -Wbad-function-cast -Wcast-align... yes
checking whether C compiler accepts -Wall -Wextra -Wbad-function-cast -Wcast-align -Wcast-qual... yes
checking whether C compiler accepts -Wall -Wextra -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts... yes
checking whether C compiler accepts -Wall -Wextra -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment... yes
checking whether C compiler accepts -Wall -Wextra -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wfloat-equal... yes
View app.html
<html>
<head>
<meta name="version" content="1.2.1">
<link rel="version" href="..." version="1.0.0" hash="..." signature="...">
<link rel="version" href="..." version="1.0.1" hash="..." signature="...">
<link rel="version" href="..." version="1.1.0" hash="..." signature="...">
<link rel="version" href="..." version="1.1.1" hash="..." signature="...">
<link rel="version" href="..." version="1.2.0" hash="..." signature="...">
<link rel="last" href="..." hash="...">
<link rel="prev" href="..." hash="..." signature="...">
Something went wrong with that request. Please try again.