Skip to content

Instantly share code, notes, and snippets.

Eelco eelcocramer

Block or report user

Report or block eelcocramer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eelcocramer
eelcocramer / error-case.js
Last active Dec 17, 2015
HTTP ENOTFOUND errors
View error-case.js
var http = require('http');
var count = 0;
var makeRequest = function() {
var req;
req = http.get("http://www.google.com/index.html", function(res) {
count++;
console.log('STATUS: ' + res.statusCode);
@eelcocramer
eelcocramer / plantuml
Last active Feb 15, 2018
Shell script to launch plantuml
View plantuml
#!/bin/sh
# PlantUML Launcher
#
# This script 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.
#
# This script distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@eelcocramer
eelcocramer / healthapp.js
Created Dec 18, 2012
Continua health application on NodeJS.
View healthapp.js
#!/usr/bin/env node
var dbus = require("dbus");
var xpath = require('xpath');
var dom = require('xmldom').DOMParser
var BODY_WEIGHT_SCALE = 0x100f; // data type of a body weight scale device
var MDC_MASS_BODY_ACTUAL = 57664; // metric id for body mass measurement
dbus.start(function() {
@eelcocramer
eelcocramer / arduino-bluetooth-led.ino
Last active May 29, 2019
Arduino LED controlled over Bluetooth with NodeJS
View arduino-bluetooth-led.ino
// This code uses the SoftwareSerial library.
// It can be obtained here: http://arduino.cc/en/Reference/SoftwareSerial
unsigned int timeout=0;
unsigned char state=0;
char val; // variable to receive data from the serial port
int ledpin = 13; // LED connected to pin 13
// Timer2 service
@eelcocramer
eelcocramer / demo.html
Created May 19, 2012
HTML client for GPS tracking demo
View demo.html
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
<link rel="stylesheet" href="scripts/leaflet.css" />
<script src="scripts/leaflet-custom.js"></script>
<script src="scripts/jquery-1.7.2.js" type="text/javascript"></script>
<script src="scripts/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
<script src="scripts/strophe.js" type="text/javascript"></script>
<script src="scripts/underscore-min.js" type="text/javascript"></script>
@eelcocramer
eelcocramer / webserver.js
Created May 19, 2012
Simple web & bosh server
View webserver.js
#!/usr/bin/env node
// webserver.js
//
// Simple web- & bosh server that serves the contents of the docroot argument directory.
// the bosh server is located at http://localhost:<port>/http-bind/
//
// based on nodebeginner.org project
//
// requires nlogger, node-xmpp-bosh and optimist. npm install these modules!
@eelcocramer
eelcocramer / echo_bot_sasl_external.js
Created Apr 23, 2012
SASL EXTERNAL Client certificate based authorization using node-xmpp
View echo_bot_sasl_external.js
#!/usr/bin/env node
/**
* Echo Bot - the XMPP Hello World
*
* Copied from the echo_bot.js example from node-xmpp.
**/
var xmpp = require('../lib/node-xmpp');
var argv = require('optimist').argv;
var fs = require('fs');
View brew-config-for-issue-11093
HOMEBREW_VERSION: 0.8.1
HEAD: ffc71c841822bd0779cc05643983c0ea77419e80
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: quad-core 64-bit arrandale
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3.1
GCC-4.0: N/A
GCC-4.2: N/A
You can’t perform that action at this time.