Skip to content

Instantly share code, notes, and snippets.

View soullivaneuh's full-sized avatar

Sullivan SENECHAL soullivaneuh

View GitHub Profile
@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@heristop
heristop / KpiComparatorBehavior.php
Last active August 29, 2015 14:18
[SonataAdmin] Create a KPI block with progress bar #AdminLTE #propel
<?php
/**
* This file is part of TaladStatsBundle.
*
*/
class KpiComparatorBehavior extends Behavior
{
public function queryMethods($builder)
@immutef
immutef / .env
Last active December 24, 2015 03:19
Symfony & Foreman
SYMFONY__DATABASE_DRIVER="pdo_mysql"
SYMFONY__DATABASE_HOST="127.0.0.1"
SYMFONY__DATABASE_PORT=3306
SYMFONY__DATABASE_NAME="symfony"
SYMFONY__DATABASE_USER="root"
SYMFONY__DATABASE_PASSWORD=""
@danvbe
danvbe / 1-Explanations.md
Last active April 21, 2023 15:39
A way to integrate FosUserBundle and HWIOAuthBundle

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.
@radmen
radmen / README.md
Created September 10, 2012 08:15
Apache vhost config for gitlab

unicorn config file

Edit file /home/gitlab/gitlab/config/unicorn.rb

Find line listen "#{app_dir}/tmp/sockets/gitlab.socket" and comment it. Uncomment line listen "127.0.0.1:8080"

required modules for apache

  • sudo a2enmod proxy
  • sudo a2enmod proxy_balancer
@davidjrice
davidjrice / redcarpet.rb
Created June 29, 2012 00:34
Rails 3.2 Markdown Template Handler
# config/initializers/redcarpet.rb
module ActionView
module Template::Handlers
class Markdown
class_attribute :default_format
self.default_format = Mime::HTML
def call(template)
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :autolink => true, :space_after_headers => true)
markdown.render(template.source).html_safe.inspect