View Gruntfile.js
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
/** | |
* Steps to build for prod: | |
* | |
* 1) copy |
View gist:8591182
var magicNumberFinder = (function () { | |
var knownMagicNumbers = [], cacheUsedCount = 0, cacheSize = 0; | |
function stringImpl(num) { | |
var sum = 0, | |
prod = 1, | |
currentNum = "", | |
stringNum = ""+num; | |
for (i=0;i<stringNum.length;i++) { |
View gist:7376745
/** | |
* Updates the IP addresses | |
*/ | |
void assignInstancesToURL(url) { | |
initInstancesFromReservationId() | |
// all the changes to make | |
def changes = new ArrayList<com.amazonaws.services.route53.model.Change>() | |
def existingDNS = listRecordSets() |
View history.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<style type="text/css"> | |
html { | |
height: 100% | |
} | |
body { |
View index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<style type="text/css"> | |
html { height: 100% } | |
body { height: 100%; margin: 0; padding: 0 } | |
#map-canvas { height: 100% } | |
</style> | |
View CyclingPublisher.java
package com.pherris; | |
import java.io.File; | |
import javax.xml.parsers.DocumentBuilder; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; | |
import org.eclipse.paho.client.mqttv3.MqttCallback; | |
import org.eclipse.paho.client.mqttv3.MqttClient; |
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.pherris</groupId> | |
<artifactId>IOT-Value-Cycling</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>IOT-Value-Cycling</name> |
NewerOlder