Skip to content

Instantly share code, notes, and snippets.

View Swop's full-sized avatar
👨‍💻

Sylvain MAUDUIT Swop

👨‍💻
View GitHub Profile
@Swop
Swop / gist:9204942
Created February 25, 2014 08:18
Git log pretty
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
@Swop
Swop / Install hhvm debian
Created April 18, 2014 17:39
Install hhvm debian
deb http://dl.hhvm.com/ubuntu saucy main
apt-get update
apt-get install hhvm
/etc/init.d/hhvm start
and in nginx config
location ~ \.php$ {
---
language: node_js
node_js:
- '0.10'
branches:
only:
- master
before_script: .travis/before_script.sh
script: echo -e " >>> Do something... \"grunt\" for example\n"
after_success: .travis/after_success.sh
@Swop
Swop / gist:af36041fc71aedfb6d4d
Created August 18, 2014 17:01
Delete old Linux kernels (Ubuntu)
dpkg --get-selections|grep 'linux-image*'|awk '{print $1}'|egrep -v "linux-image-$(uname -r)|linux-image-generic|linux-image-extra-$(uname -r)" |while read n;do apt-get -y remove $n;done
@Swop
Swop / delete_merge_branches.sh
Created October 21, 2014 10:00
Deletes merged branches
#!/bin/bash
git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d

Forum PHP 2014

Jeudi 23/10

  • 9h30
    • A State of Mind. Sebastian Bergmann
    • La mesure, ce n'est pas que pour le devops. Olivier Garcia & Patrick Allaert
  • 10h15
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
@Swop
Swop / gist:4090417
Created November 16, 2012 20:04
Install php sundown shared library
#!/bin/bash
apt-get install php5-dev rake
cd /tmp
git clone https://github.com/chobie/php-sundown.git php-sundown -b development
cd php-sundown
# this command will fetch submodule and copy neccesally files to src dir. and compile it.
@Swop
Swop / Mac OSX PHP Tech stack for Symfony2 projects
Last active December 10, 2015 16:48
Mac OSX PHP Tech stack for Symfony2 projects (Original Mac OS Apache, Compiled PHP & tools)
mkdir -p /usr/local/src
== XCode Command line tools
Installer XCode ou récuppérer depuis l'Apple Developper Center l'install unique des CommandLine Tools
== X11
http://xquartz.macosforge.org/
== HomeBrew
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
@Swop
Swop / Screencast to GIF file
Last active December 11, 2015 10:48
Simple steps to create a GIF from a screencast (OSX but works with Linux)
# Install ffmepg (for the screencast) & imagemagick (to optimize the GIF file for web usage)
brew install ffmpeg
brew install imagemagick
# Make the screencast and compress it
ffmpeg -i ScreenFlow.mov -pix_fmt rgb24 output.gif
convert -layers Optimize output.gif output_optimized.gif
# Upload it somewere in the cloud...
# ... and use the file in the desire website. Here's the markdown syntax: