Skip to content

Instantly share code, notes, and snippets.

View Remiii's full-sized avatar
👨‍💻
remibarbe.fr

Rémi Barbe Remiii

👨‍💻
remibarbe.fr
View GitHub Profile
@brianfernalld
brianfernalld / gist:c0351bf195797242a4bd
Created May 7, 2014 22:49
Hubot Script - Carlton.coffee
# Description:
# Carlton Celebration
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:

I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:

  • the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
  • set the service for oauth_user_provider in the security.yml with your custom created service

Here are the steps:

  1. Routing. In routing.yml I have added all the routes for both bundles.
  2. Configuration. I have set the config.yml mostly as it is presented in the HWIOAuthBundle.
  3. Security. I have set the security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.
@lologhi
lologhi / Install elasticsearch on Ubuntu 14.04.md
Last active August 29, 2015 14:05
Install elasticsearch on Ubuntu 14.04

## Install Java

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

## Install elasticsearch

Based on your issues in installing ncdu my recommendation would be to use du and sort on together.
For instance:
du /home | sort -rn (will search all files/directories under /home and sort them by largest to smallest.
du -h /home | sort -rh (same but will show it in MB/KB/etc) - Note this requires coreutils 7.5 or newer (sort --version to check)
You can replace /home with any directory of your choice.
@alblue
alblue / .gitignore
Created February 12, 2012 10:29
RSS Importer for Jekyll
jekyll
@Remiii
Remiii / README.md
Created August 16, 2014 17:24
Hubot on OSX

Hubot on OSX

Install

$ brew update
$ brew upgrade
$ brew install redis

$ npm install -g hubot coffee-script
@Remiii
Remiii / README.md
Last active December 29, 2015 15:19
Google Cloud: Generating a refresh token

GENERATING A REFRESH TOKEN

STEP 1

  • Go to http://cloud.google.com/console and log-in
    • Activate youtube-data API (APIs & auth -> APIs)
    • Register a new app (APIs & auth -> registered apps)
  • Name it, select native
@lologhi
lologhi / Apply fixtures on Doctrine entities with ManyToMany relations.md
Last active April 29, 2017 14:25
Apply fixtures on Doctrine entities with ManyToMany relations

Club entity

/**
 * @ORM\ManyToMany(targetEntity="Field", inversedBy="clubs")
 */
private $fields;

Field entity

@jorilallo
jorilallo / gist:3686737
Created September 9, 2012 19:33
Google Contacts API authentication with gdata and OAuth2
import gdata
import json
import requests
# More examples:
# https://github.com/millioner/Python-contact-importer/blob/master/contact_importer/providers/google.py
# https://github.com/jtauber/django-friends/blob/master/friends/importer.py
# GData with access token
token = gdata.gauth.OAuth2Token(
@n1k0
n1k0 / 404checker.js
Created January 11, 2013 10:55
A CasperJS script to check for 404 & 500 internal links on a given website
/**
* This casper scipt checks for 404 internal links for a given root url.
*
* Usage:
*
* $ casperjs 404checker.js http://mysite.tld/
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42
*/
/*global URI*/