Skip to content

Instantly share code, notes, and snippets.


Olivier Eeckhoutte oeeckhoutte

View GitHub Profile
oeeckhoutte / gist:9804695
Last active Aug 29, 2015
[Angular] Difference between Service, Factory and Provider in AngularJS
View gist:9804695
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
//factory style, more involved but more sophisticated
View designer.html
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<polymer-element name="my-element">
oeeckhoutte / gist:9e30fb554a81cfa9c0eb
Last active Aug 29, 2015
[Ubuntu 14,04 Gnome] Setup VNC server
View gist:9e30fb554a81cfa9c0eb
sudo apt-get install tightvncserver
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
vi ~/.vnc/xstartup
----- Enter --
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-window-manager &
oeeckhoutte / reset_root_password_osx_lion
Last active Aug 29, 2015
[OSX][Lion] Reset Root password
View reset_root_password_osx_lion
All you have to do is turn on your computer holding CMD + S. This will boot your Mac in Single-User Mode. Next, you have to wait a second while kernel will load command-line interface. It there is :/ root# line, you’re ready to go!
OSX Lion
First of all, type
# /sbin/fsck -fy
This will take a while. It will check the consistency of your filesystem. If there is no error, your output should be similar to this:
** /dev/rdisk0s2
** Root file system
View Intellij Template Javascript
# intellij javascript live templates
Just a dump of handy live templates I use with **IntelliJ**.
They should also work with **WebStorm**.
## How to
- Go to `settings`.
- Search for `live templates`.
- Under the javascript section you should be able to manage your templates.
oeeckhoutte / Install Wifi And Docker on my Pi
Created Apr 20, 2015
Install Wifi and Docker on ArchLinux
View Install Wifi And Docker on my Pi
# Install the wireless tools
pacman -Syu
pacman -S wireless_tool
# Setup the configuration
# Autostart the wifi with
netctl list
netctl enable wlan0-olivier
oeeckhoutte / fromOSXMachine
Created Apr 20, 2015
Download and setup ArchLinux on RaspberryPi
View fromOSXMachine
curl -o -L
df -h
#Find your SD Card
sudo diskutil unmountDisk /dev/disk2
sudo dd bs=1m if=ArchLinuxARM-2014.01-rpi.img of=/dev/rdisk2
sudo diskutil eject /dev/rdisk2
oeeckhoutte / gist:2af8aab99ded560c2296
Created May 15, 2015
Install distcc Cross Compilation
View gist:2af8aab99ded560c2296
On the Ubuntu Machine
Install dependencies
sudo apt-get install mercurial bison flex texinfo automake curl
sudo apt-get install build-essential libncurses-dev libtool gawk gperf
if you are using a 64bit linux distribution you'll need to install also:
sudo aptitude install ia32-libs
Download the Raspberry Pi compiler for linux
you can download it as a zip or clone the repo at from
rename the folder to something more identifiable like rpi-tools, we'll refer to this path as $RPI_TOOLS from now on
Install and configure distcc on the Ubuntu Helper machine
oeeckhoutte /
Last active Aug 29, 2015
Installer Docker sur une machine Debian 8.1
# Installation sur Debian 8.1:
apt-get update
apt-get install -y curl
curl -sSL | sh
# Tester si l’installation fonctionne:
docker run -i -t ubuntu /bin/bash
# Vérifier qu’on est bien sur une machine Ubuntu
cat /etc/issue
oeeckhoutte /
Created Sep 6, 2015 — forked from tsabat/
Getting oh-my-zsh to work in Ubuntu


apt-get install zsh
apt-get install git-core

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget -O - | zsh