Skip to content

Instantly share code, notes, and snippets.

View Leotomas's full-sized avatar

Leo TOMAS Leotomas

  • Polyconseil
  • Paris, France
View GitHub Profile
@Leotomas
Leotomas / boxstarter
Last active September 19, 2016 09:14
Boxstarter test version
cinst googlechrome
cinst adobereader
cinst teamviewer
cinst cmder
cinst sysinternals
@Leotomas
Leotomas / chrome_install_headless.sh
Created August 2, 2016 11:03
Install Chrome headless on Ubuntu
export CHROME_BIN=/usr/bin/google-chrome
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sudo apt-get update
sudo apt-get install -y libappindicator1 fonts-liberation
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
@Leotomas
Leotomas / routes.php
Created February 5, 2016 15:24
routes setting to secure assets
<?php
//some other routes
//...
Route::ressource('/private', 'Documents\DocumentsController');
@Leotomas
Leotomas / lrvl.conf
Created February 4, 2016 12:22
Apache conf to protect private dir in /public for Laravel
# ************************************
# Vhost template in module puppetlabs-apache
# Managed by Puppet
# ************************************
<VirtualHost *:80>
ServerName extranet.sefima.local
## Vhost docroot
DocumentRoot "/var/www/extranet.sefima.local/public"
@Leotomas
Leotomas / blackfire-fpm-1.bash
Created January 18, 2016 19:10
blackfire.io fpm puphpet vagrant
$ sudo vi /etc/php5/fpm/conf.d/zzzz_custom.ini
@Leotomas
Leotomas / flatten.php
Created November 12, 2015 22:55 — forked from kohnmd/flatten.php
Function to recursively flatten multidimensional PHP array.
<?php
// Requires PHP 5.3+
// Found here: http://stackoverflow.com/a/1320156
function flatten_array(array $array) {
$flattened_array = array();
array_walk_recursive($array, function($a) use (&$flattened_array) { $flattened_array[] = $a; });
return $flattened_array;
}
@Leotomas
Leotomas / View.php
Created November 9, 2015 09:54
Render Wordpress Shortcodes with Twig
<?php
/**
* Renders the view templates using Twig
* @author Leo
*/
namespace stt\Framework;
class View {
@Leotomas
Leotomas / .vimrc
Last active October 21, 2015 17:07
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required