Skip to content

Instantly share code, notes, and snippets.

// to generate the following JSON output
// {"identifier":"abbreviation",
// "items":[ {"name":"Alaska","label":"Alaska","abbreviation":"AK"},
// {"name":"Wyoming","label":"Wyoming","abbreviation":"WY"}
// ]}
package com.rubenlaguna.json.flexjson;
import flexjson.JSONSerializer;
/*
DS160 example
Reading temperature from DS1620 digital temperature sensor
and showing the result via serial interface.
Arduino DS1620
pin 3 -> RST
pin 4 -> CLK
/*
XBee sensor
ZCL Temperature Measurement Cluster
*/
#define ledPin 13
#define lcdPin 6
#define temt6000Pin 3
/*
* hmc6352example.pde
*
* Copyright (c) 2009 Ruben Laguna <ruben.laguna at gmail.com>. All rights reserved.
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
#include "mma7260q.h"
//set up MMA7260Q
Mma7260q mma7260q = Mma7260q(0,1,2);
long time = millis();
void setup() {
Serial.begin(9600);
require "rubygems"
require "rbosa"
require "cgi"
require "htmlentities"
require 'iconv'
OSA.utf8_strings = true
evernote = OSA.app('Evernote')
coder = HTMLEntities.new
markdown: rdiscount
pygments: true
url: http://rubenlaguna.com
<script type="text/javascript">
/**
* var disqus_developer = true;
*/
{% if page.post_id %}
var disqus_identifier = {{ page.post_id }};
{% else %}
var disqus_identifier = "{{ page.url }}";
{% endif %}
</script>
fso = new ActiveXObject("Scripting.FileSystemObject");
var folders = new Array();
function Initialize_enumFolders (path)
{
if (fso.driveExists(fso.GetDriveName(path)) && fso.folderExists(fso.GetDriveName(path)))
enumFolders(path);
}
function enumFolders(path)
{
/*
* Adjust volume and eq setting of podcasts and audiobooks
* http://rubenlaguna.com/wp
* Jscript file must be run with Windows wscript.exe
* Based on a script by Otto - http://ottodestruct.com
*/
var iTunesApp = WScript.CreateObject("iTunes.Application");
var ITTrackKindFile = 1;