Skip to content

Instantly share code, notes, and snippets.

View mauricionr's full-sized avatar
🏠
Working remotely

Mauricio mauricionr

🏠
Working remotely
View GitHub Profile
@mauricionr
mauricionr / install-phonegap-ubuntu-14.04
Last active August 29, 2015 14:26 — forked from allanbatista/install-phonegap-ubuntu-14.04
Instalação phonegap ubuntu 14.04
# Instalação das dependencias
sudo apt-get install openjdk-7-jdk
sudo apt-get install ant
# Em sistemas x64 instale
sudo apt-get install lib32std++
# instalacao do phonegap
sudo npm install phonegap
@mauricionr
mauricionr / gist:4a0bcaf8700012b5676c
Last active August 29, 2015 14:26 — forked from rrobe53/gist:976610
Node.js File Extension Content Type
exports.ext = function () {
var extTypes = {
"3gp" : "video/3gpp"
, "a" : "application/octet-stream"
, "ai" : "application/postscript"
, "aif" : "audio/x-aiff"
, "aiff" : "audio/x-aiff"
, "asc" : "application/pgp-signature"
, "asf" : "video/x-ms-asf"
, "asm" : "text/x-asm"
import org.eclipse.jetty.client.HttpClient
import org.cometd.client.BayeuxClient
import org.cometd.client.transport.LongPollingTransport
import java.util.HashMap
import org.cometd.bayeux.client.{ClientSession, ClientSessionChannel}
import org.cometd.bayeux.{Message, Channel}
import org.cometd.bayeux.Message.Mutable
/**
* Simple cometd client for talking to the Yammer Artie (RT...realtime, get it?) service. You will
<!-- Code snippet -->
<div class="form-group">
<div class="col-md-12 text-center">
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</div>
</div>
var https = require('https');
// https://www.yammer.com/api/v1/messages.json
var options = {
host: 'www.yammer.com',
path: '/api/v1/messages.json?access_token=YOUR-OAUTH2-TOKEN',
headers: { "Authorization": "Bearer YOUR-OAUTH2-TOKEN" }
}
var globalRequestId = 1;