Skip to content

Instantly share code, notes, and snippets.

View Ph3nol's full-sized avatar
🦄
Riding a Unicorn. From ::1 to the moon.

Cédric Dugat Ph3nol

🦄
Riding a Unicorn. From ::1 to the moon.
View GitHub Profile
@Ph3nol
Ph3nol / generate-dedicated-ssh-key.md
Last active June 23, 2018 13:47
How to generate a dedicated SSH key

Generate a dedicated SSH key

SSH key creation

This is an example for a personal MacbookAir, to connect github.com.

ssh-keygen -t rsa -f ~/.ssh/id_rsa,github.com -C "github,macbookair_perso"
chmod 600 ~/.ssh/id_rsa,github.com
@Ph3nol
Ph3nol / Debian6Puppet3.md
Last active December 14, 2015 10:58
Make a Debian 6.0 + Puppet 3 Vagrant box

Make a Debian 6.0 + Puppet 3 Vagrant box

Init a vagrant box with vagrant init, and update Vagrantfile to base your future one on your favorite Debian 6 32 or 64 bits box.

Then: vragrant up, vagrant ssh and let's go.

Puppet 3 installation

Add PuppetLabs apt sources:

@Ph3nol
Ph3nol / gist:4116870
Created November 20, 2012 09:08
Shell Base64 generator
cat /path/to/my/image.jpg | openssl base64 | tr "\n" -d
@Ph3nol
Ph3nol / composer.json
Created October 6, 2012 14:26 — forked from igorw/composer.json
React Chatroulette
{
"require": {
"react/socket": "0.2.*"
}
}
@Ph3nol
Ph3nol / github-autodeploy.rb
Created September 19, 2012 15:36 — forked from jeremymarc/github-autodeploy.rb
Github post-receive hook for auto-deployment of a Web site document root
require "rubygems"
require "sinatra"
require "json"
# Configure this with the directory path for the Web server's clone of the Git repo
git_dir = '/var/www/origin.git'
# Configure the mappings between Git branches and Web document roots
branch_to_working_directory = {
'www' => '/var/www/www.example.com',
@Ph3nol
Ph3nol / flush.php
Created September 15, 2012 14:43 — forked from arnaud-lb/flush.php
flush email queue from symfony command
<?php
protected function flushQueue()
{
$container = $this->getContainer();
$transport = $container->get('mailer')->getTransport();
$spool = $transport->getSpool();
$spool->flushQueue($container->get('swiftmailer.transport.real'));
@Ph3nol
Ph3nol / sf2.php
Created September 13, 2012 13:18 — forked from adrienbrault/sf2.php
sami example that includes protected/private properties/methods
<?php
use Sami\Sami;
use Sami\Version\GitVersionCollection;
use Sami\Parser\Filter\TrueFilter;
use Symfony\Component\Finder\Finder;
$iterator = Finder::create()
->files()
->name('*.php')
@Ph3nol
Ph3nol / sf2.php
Created September 10, 2012 15:09 — forked from adrienbrault/sf2.php
<?php
use Sami\Sami;
use Sami\Version\GitVersionCollection;
use Sami\Parser\Filter\TrueFilter;
use Symfony\Component\Finder\Finder;
$iterator = Finder::create()
->files()
->name('*.php')
@Ph3nol
Ph3nol / FooController.php
Created September 6, 2012 06:40 — forked from igorw/FooController.php
Silex convention-based controllers
<?php
// src/Foobar/Controller/FooController.php
namespace Foobar\Controller;
class FooController
{
public function helloAction($request)
{
@Ph3nol
Ph3nol / composer.json
Created August 27, 2012 13:24 — forked from stephpy/composer.json
composer
{
"name": "rezzza/myproject",
"description": "myproject",
"authors": [
{
"name": "Chuck norris",
"email": "chuck@norris.com"
}
],
"licence": "MIT",