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
@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 August 29, 2015 14:04
How to reset passwords (Root and Users) for MySQL

How to reset passwords (Root and Users) for MySQL

$ sudo su

$ /etc/init.d/mysql stop
$ mysqld_safe --skip-grant-tables &
$ mysql -u root

mysql> update user set password=PASSWORD("tmprootpwd") where user='root';
@Remiii
Remiii / README.md
Last active June 1, 2018 05:31
GitHub production pull (machine users)

GitHub production pull (machine users)

This README give steps in order to use GitHub machine users... 😎 In case of a first GitHub setup please refer to GitHub set up article.

/home/myuser/.ssh/
    |
    +-- config
    |
 +-- myusermachinekey
@Remiii
Remiii / README.md
Last active August 29, 2015 14:03
Git Noob

Git Noob

Yo les Noobs, c'est ici que cela se passe ! 👊

Configuring a remote for a fork and Syncing a fork

$ git remote add user [email protected]:user/repo.git
$ git fetch user
$ git checkout -b user-branchName remotes/user/repo
@Remiii
Remiii / README.md
Last active August 13, 2018 00:33
Setup Vagrant box (Ubuntu 14.04)

Setup Vagrant box (Ubuntu 14.04)

Introduction

This file discribe all the steps in order to setup a Vagrant box (using the Ansible Ubuntu simple Symfony App config - please refer to this repository for more info).

Requirements

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.
@Remiii
Remiii / README.md
Last active August 29, 2015 14:01
Node & NPM installation on Ubuntu 12.04
<?php
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)
// $description - text description of the event
// $filename - the name of this file for saving (e.g. my-event-name.ics)
//
$ docker rm idOfContainer