Skip to content

Instantly share code, notes, and snippets.

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.
@luishdez
luishdez / demo.js
Created May 23, 2012 23:08 — forked from indexzero/demo.js
Raphael icon factory
// Basic usage
_.icon('home', 'home-id-selector')
// Advanced usage
_.icon('power', 'start-menu-icon', {
fill : {
fill : "#333",
stroke : "none"
},
none : {
@luishdez
luishdez / demo.js
Created May 23, 2012 22:57 — forked from sorensen/demo.js
Raphael icon factory
// If underscore is included on the page it will be added as a mixin,
// otherwise, it will be added to the global namespace
// Basic usage
icon('star', 'some-id-selector');
// Basic underscore usage
_.icon('home', 'home-id-selector');
// Advanced underscore usage
@luishdez
luishdez / icons.js
Created May 23, 2012 22:56
Raphael JS icons for Tumblr
var attributes = { fill: '#333', stroke: 'none' };
var icons = {
about: "M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M14.757,8h2.42v2.574h-2.42V8z M18.762,23.622H16.1c-1.034,0-1.475-0.44-1.475-1.496v-6.865c0-0.33-0.176-0.484-0.484-0.484h-0.88V12.4h2.662c1.035,0,1.474,0.462,1.474,1.496v6.887c0,0.309,0.176,0.484,0.484,0.484h0.88V23.622z",
address: "M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM19.158,23.269c-0.079,0.064-0.183,0.13-0.105,0.207c0.078,0.078-0.09,0.131-0.09,0.17s0.104,0.246,0.052,0.336c-0.052,0.092-0.091,0.223-0.13,0.301c-0.039,0.077-0.131,0.155-0.104,0.272c0.025,0.116-0.104,0.077-0.104,0.194c0,0.116,0.116,0.065,0.09,0.208c-0.025,0.144-0.09,0.183-0.09,0.285c0,0.104,0.064,0.247,0.064,0.286s-0.064,0.17-0.155,0.272c-0.092,0.104-0.155,0.17-0.144,0.233c0.014,0.065,0.104,0.144,0.091,0.184c-0.013,
@luishdez
luishdez / parsebind.pl
Created March 8, 2012 06:41 — forked from evandhoffman/parsebind.pl
Parses bind query logs to determine queries per second.
#!/usr/bin/perl
#use Date::Parse;
use Time::ParseDate;
my $line_num = 0;
my $first_line = 0;
my $oldest_record = 0;
my $line = '';
my $date = 0;