Skip to content

Instantly share code, notes, and snippets.

View mauricionr's full-sized avatar
🏠
Working remotely

Mauricio mauricionr

🏠
Working remotely
View GitHub Profile
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;
<!-- Code snippet -->
<div class="form-group">
<div class="col-md-12 text-center">
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</div>
</div>
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
@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"
@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 / get-sharepoint-access-token.py
Last active September 16, 2015 20:47 — forked from demelziraptor/get-sharepoint-access-token.py
Code example to get a Sharepoint Access Token to use with the Sharepoint REST API using a python 3 provider-hosted Sharepoint App (using cherrypy). This code takes the data POSTed to it when you click on the app in Sharepoint, and authenticates using OAuth to get the access token. To use the Sharepoint REST API with OAuth, the app needs to be re…
import cherrypy
import jwt
import urllib.parse, urllib.request
import json
SPSECRET = 'gpYucHkODHOv6JxZJ89Kihl9ncTiTrUCAbOaF1N6uJE='
cherrypy.config.update({'server.socket_port': 3005,
'server.ssl_module': 'builtin',
'server.ssl_certificate': 'cert.pem',
const fetch = require('node-fetch')
const Bacon = require('baconjs')
function getInPortuguese(word) {
// Google Translate API is a paid (but dirt cheap) service. This is my key
// and will be disabled by the time the video is out. To generate your own,
// go here: https://cloud.google.com/translate/v2/getting_started
const apiKey =
'AIzaSyB4DyRHIsNhogQXmH16YKbZfR-lTXrQpq0'
const url =
@mauricionr
mauricionr / rulething.html
Created September 17, 2016 15:41 — forked from mpj/rulething.html
Code from episode
<html>
<head>
<style>
.row div {
height: 8px;
display: inline-block;
width: 8px;
}
.row div.active {
background-color: red;
@mauricionr
mauricionr / nginx.conf.default
Created February 28, 2017 14:17 — forked from nishantmodak/nginx.conf.default
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
08/2018 OR 10/2020 737 7373