Skip to content

Instantly share code, notes, and snippets.

View jjsaunier's full-sized avatar

Johann Saunier jjsaunier

View GitHub Profile
@jjsaunier
jjsaunier / redis.sh
Last active August 29, 2015 14:01
PHP extension
#!/bin/bash
apt-get update
apt-get upgrade
apt-get install apt-get install php5-dev
git clone git://github.com/nicolasff/phpredis.git
cd phpredis
phpize
./configure
make && make install
cd ../
@jjsaunier
jjsaunier / snippet.sh
Last active August 29, 2015 14:13
git snippet
Update submodule
git submodule foreach "(git checkout master; git pull; cd ..; git add '$path'; git commit -m 'Submodule Sync')"
Syncronized branch with remote
git fetch origin && git reset --hard origin/master && git clean -f -d
@jjsaunier
jjsaunier / gist:21eac350aa64abf88585
Created July 20, 2015 13:14
Agnoster theme zsh
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#
@jjsaunier
jjsaunier / SassMeister-input.scss
Created August 17, 2015 21:01
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$warning: #f0ad4e;
$info: #5bc0de;
$error: #d9534f;
$min-width: 1024px;
$font-size: 13px;
@jjsaunier
jjsaunier / command.md
Last active December 24, 2015 05:39
Command pool SF2
  • Generate or regenerate bootstrap.cache.php : php /vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php
@jjsaunier
jjsaunier / prototypeCollectionSymfony2.js
Created October 8, 2013 15:47
Javascript part for Symfony2 form collection handling. Written with jQuery
$(document).ready(function() {
var $container = $('div#container');
var $addLink = $('<a href="#" id="add-link-' + $container.attr('id') +'" class="btn">Add document</a>');
$container.append($addLink);
$addLink.click(function(e) {
addElement($container);
e.preventDefault();
return false;
@jjsaunier
jjsaunier / sensio-cs-fixer.sh
Last active December 30, 2015 16:39
PHP CS FIXER
php php-cs-fixer.phar fix /path/to/project --level=all
<?php
$strategist = new Strategist();
$strategist->respect(function () use ($var) {
return true === $var;
})->then(function () use ($whatever) {
return $whatever->getTrue();
});
$strategist->respect(function () use ($var) {
@jjsaunier
jjsaunier / sh
Created November 9, 2017 19:47
Share media with any DLNA ready device in the most simple way with docker
docker run --net host -v /home/johann/Videos/:/media -e MINIDLNA_MEDIA_DIR=/media -e MINIDLNA_PORT=8200 -e MINIDLNA_FRIENDLY_NAME=johann-arc -p 8200:8200 bobrik/minidlna

Keybase proof

I hereby claim:

  • I am prophet777 on github.
  • I am sko777 (https://keybase.io/sko777) on keybase.
  • I have a public key ASDBltkKpqAY6j1HaE_0qPkKqILf_AsyXylsmVoHXFN-Nwo

To claim this, I am signing this object: