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 imagesnap = require('imagesnap'); | |
var fs = require('fs'); | |
function grabImage(){ | |
var imageStream = fs.createWriteStream('capture.jpg'); | |
imagesnap().pipe(imageStream); | |
} | |
setInterval(function(){ | |
grabImage(); |
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
""" | |
Pull Greater London Authority boundary definition (geojson) and derive the outer bounding box | |
""" | |
from operator import itemgetter | |
import json | |
import requests | |
r = requests.get('http://mapit.mysociety.org/area/2247.geojson') | |
coords = r.json()['coordinates'][0] |
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
# Setup Script for BENVGSC4 Database Virtual Machine | |
# -- CENTOS VM Setup | |
# -- Machine Specs | |
# -- Author: Steven Gray, Jan 2015 | |
# -- Version: 1.0 | |
# Do not run this file -- this will not install all features, manually install these | |
# Setup System | |
yum -y install htop |
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
#include <stdio.h> | |
#define RESET 0 | |
#define BRIGHT 1 | |
#define DIM 2 | |
#define UNDERLINE 3 | |
#define BLINK 4 | |
#define REVERSE 7 | |
#define HIDDEN 8 |
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
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view, typically from a nib. | |
CGRect screenRect = [[UIScreen mainScreen] bounds]; | |
CGFloat screenWidth = screenRect.size.width; | |
CGFloat screenHeight = screenRect.size.height; | |
UIWebView *webview=[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight )]; | |
NSString *url=@"https://google.com/"; |
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
# TripSensor Install Info | |
# Getting BU353-S4 GPS Device Working on Raspberry Pi | |
# ************************************************************ | |
sudo apt-get -y install gpsd gpsd-clients python-gps | |
# Change file with settings | |
nano /etc/default/gpsd | |
# Default settings for gpsd. |
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
#!/usr/bin/env node | |
// Before running install | |
// -- npm install -g optimist oauth step colors express | |
var serverPort = 8008; | |
var argv = require('optimist') | |
.usage('Usage: --key=[consumer key] -secret=[consumer secret]') | |
.demand(['key', 'secret']) |
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
#!/usr/bin/env node | |
var OAuth = require('oauth').OAuth; | |
var colors = require('colors'); | |
var access_token = null; | |
var access_token_secret = null; | |
var key = null; | |
var secret = null; |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<head> | |
<title>Google Earth - Get LatLng</title> | |
<script src="http://www.google.com/jsapi?key=APIKEY"></script> | |
<script> | |
google.load("earth", "1"); | |
var ge = null; |
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
<html> | |
<head> | |
<style> | |
#map{ | |
background-color: red; | |
height:100%; | |
width: 100%; | |
} | |
</style> |
OlderNewer