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 /
Created Sep 4, 2017 — forked from nicolasembleton/
Restart Bluetooth Daemon on Mac OS X without restarting
sudo kextunload -b
sudo kextload -b
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 /
Created Jan 17, 2016 — forked from karmi/
Simple tag cloud with ElasticSearch `terms` facet
# (Re)create the index
curl -X DELETE "http://localhost:9200/tagcloud"
curl -X PUT "http://localhost:9200/tagcloud"-d '{
"settings" : {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
leonardorifeli / generator.php
Created Oct 15, 2015 — forked from tawfekov/generator.php
Doctrine2 Generate Entities form Existing Database
View generator.php
include '../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
// config
$config = new \Doctrine\ORM\Configuration();
git config --global alias.cowsay '!git commit -m "`fortune | cowsay -f tux`"'
You can’t perform that action at this time.