Skip to content

Instantly share code, notes, and snippets.

@p15martin
p15martin / autotools-init.sh
Last active August 29, 2015 14:17
Initialize a project for Autotools. I take no credit, it all goes to Reuben Brasher for taking the time to learn Autotools. This version all incorporates the changes introduced in the fork created by horixon (Justin Wagle).
#!/bin/bash
set -e
createDirectoryStructure()
{
mkdir -p include
mkdir -p src
mkdir -p m4
}
@p15martin
p15martin / user-info.js
Last active August 29, 2015 13:57
This Gist is a simple spike, which demonstrates authentication with Concur and retrieval of the user's profile information. To use it sign up for a developer sandbox at Concur (https://developer.concur.com), once you have registered it will create a default app and display your API key.
/*jslint node:true */
var https = require('https'),
util = require('util'),
libxmljs = require("libxmljs"),
Q = require('q'),
concurHost = 'www.concursolutions.com';
function httpGet(httpOptions) {
'use strict';
/*jslint node:true */
'use strict';
var Sequelize = require('Sequelize'),
Q = require('q'),
http = require('http'),
sequelize = new Sequelize('gfdb', 'gfuser', 'password', {
host: 'localhost',
dialect: 'postgres',
@p15martin
p15martin / client.js
Created February 8, 2012 02:56
Service discovery
var mqtt = require('mqttjs');
var mdns = require('mdns');
var topic = "my.data";
var connectedClient = null;
discoverService();
startMessageLoop();