Skip to content

Instantly share code, notes, and snippets.

Data & Mathematics lover.

Leonardo Rifeli leonardorifeli

Data & Mathematics lover.
View GitHub Profile
leonardorifeli / golang_kinesis.go
Created Jun 14, 2018 — forked from coboshm/golang_kinesis.go
Golang + Kinesis firehose
View golang_kinesis.go
package main
import (
View sendString.js
// the wizare functions
var sendString = (function(rfb, force, sendDelay) {
sendDelay = sendDelay || 25;
var _q = [];
var _qStart = function() {
var chr = _q.shift();
if (chr) {
setTimeout(_qStart, sendDelay);
leonardorifeli / AWS_S3_File_Upload.js
Created Jan 4, 2018 — forked from homam/AWS_S3_File_Upload.js
How to upload files to AWS S3 with NodeJS SDK
View AWS_S3_File_Upload.js
var AWS = require('aws-sdk'),
fs = require('fs');
// For dev purposes only
AWS.config.update({ accessKeyId: '...', secretAccessKey: '...' });
// Read in the file, convert it to base64, store to S3
fs.readFile('del.txt', function (err, data) {
if (err) { throw err; }
leonardorifeli / People.php
Last active Sep 22, 2017
Working with annotations using the doctrine annotation reader
View People.php
* @PeopleAnnotation(description="Get all information about a people", type="class")
class People {
* @PeopleAnnotation(description="Use to people name", type="attribute")
leonardorifeli /
Created Sep 4, 2017 — forked from nicolasembleton/
Restart Bluetooth Daemon on Mac OS X without restarting
sudo kextunload -b
sudo kextload -b
leonardorifeli / asyncAwait.js
Last active Jul 11, 2017
Apresentação Node.js
View asyncAwait.js
async function sendAsync(userId) {
let user = await getUser(userId);
let profile = await getProfile(user);
let account = await getAccount(profile);
let report = await getReport(account);
let send = sendStatistic(report);
leonardorifeli /
Last active Mar 20, 2017
SOLID - SRP - PopulationStandardDeviation
package com.leonardorifeli.article;
public class GenerateReport {
public ArrayList<String> find() { }
public ArrayList<String> proccess() { }
public void print() { }
View 1.How to easily implement a REST API with oAuth2

It's still a work in progress...


As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.

Ok, you know the bundles

You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :

leonardorifeli / .travis.yml
Created Nov 11, 2016
Post about structure of blog
View .travis.yml
language: ruby
- 2.2.2
- chmod +x
script: ./
leonardorifeli /
Last active Aug 20, 2016
Inheritance or composition article
package com.leonardorifeli.article.inheritance.model;
public class Automobile {
private String color;
private Integer quantityPort;
public String getColor() {
return color;
You can’t perform that action at this time.