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
$ docker rm idOfContainer
<?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)
//
@Remiii
Remiii / README.md
Last active August 29, 2015 14:01
Node & NPM installation on Ubuntu 12.04

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: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 git@github.com:user/repo.git
$ git fetch user
$ git checkout -b user-branchName remotes/user/repo
@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&gt; update user set password=PASSWORD("tmprootpwd") where user='root';
@Remiii
Remiii / .htaccess
Created August 19, 2014 13:03
Htaccess / Htpasswd
AuthName "Auth require..."
AuthType Basic
AuthUserFile "/home/myuser/pathToHtpasswd/.htpasswd"
Require valid-user
@Remiii
Remiii / README.md
Last active August 29, 2015 14:05
Mount NFS (server/client config)

Mount NFS

This file describe a basic config for NFS mount on a server/client.

Server (store datas) - server.myserver.com

Share a datas folder : /home/ubuntu/documents/datas

$ sudo apt-get update