Skip to content

Instantly share code, notes, and snippets.

Nicolas Rollier nrollr

  • Leuven, .be
Block or report user

Report or block nrollr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nrollr /
Last active Oct 24, 2019
Python environments in macOS

Python environments in macOS

The latest version of macOS 10.13.3 has Python 2.7.10 installed by default, yet Python has been available on macOS and previously OS X for quite a while now.

Consult the Apple's Open Source Reference Library, and browse through the various releases of the OS to find out which Python version was included). But what if you have a project which requires Python 3 ?

The following instructions will guide you through the process of:

  • installing Python 3 using Homebrew
  • running multiple Python verions as sandboxed environments
nrollr /
Created Nov 1, 2016
iOS device backup to Time Capsule
# Create the appropriate directory structure on the TimeCapsule and mount the root folder ('Data' in this example)
# Backup path: /Volumes/Data/iOS/Backup/
$ cp -r ~/Library/Application\ Support/MobileSync/Backup/ /Volumes/Data/iOS
$ cd ~/Library/Application\ Support/MobileSync/
$ rm -r Backup/
$ ln -s /Volumes/Data/iOS/Backup/ ~/Library/Application\ Support/MobileSync/
# Open iTunes select your iPhone/iPad and click 'Back Up Now'-buttom
nrollr /
Last active Dec 28, 2019
Install PHP and NGINX on Amazon Linux AMI
## Install NGINX
## when installing on Amazon Linux AMI, use:
$ sudo yum install nginx -y
## when installing on Amazon Linux 2 AMI, use
$ sudo amazon-linux-extras install nginx1.12 -y
## Install PHP and PHP-FPM
# for PHP version 7.1 use php71 and php71-fpm instead
$ sudo yum install php -y
$ sudo yum install php-fpm -y
nrollr / nginx.conf
Last active Jan 23, 2020
NGINX config for SSL with Let's Encrypt certs
View nginx.conf
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
# SSL configuration
nrollr / Twilio_notification.php
Last active Feb 4, 2018
SMS notification using the Twilio API
View Twilio_notification.php
// Get the PHP helper library from
require_once 'twilio/autoload.php'; // Loads the library
use Twilio\Rest\Client;
// Your account details via
$sid = "xxxxxxxxxxxxxxxxxx"; //Account Sid
$token = "xxxxxxxxxxxxxxxxxx"; //Auth Token
$client = new Client($sid, $token);
nrollr /
Last active Nov 5, 2019
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL"
nrollr /
Last active Jan 20, 2020
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

nrollr /
Last active Jan 14, 2020
Install Node.js on Amazon Linux (EC2)

Installing Node.js on Amazon Linux AMI

The following will guide you through the process of installing Node.js on an AWS EC2 instance running Amazon Linux AMI 2016.09 - Release Notes

For this process I'll be using a t2.micro EC2 instance running Amazon Linux AMI (ami-d41d58a7). Once the EC2 instance is up-and-running, connect to your server via ssh

nrollr /
Created Mar 29, 2016
Install Redis via Homebrew
brew install redis # Install Redis using Homebrew
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents # Enable Redis autostart
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist # Start Redis server via launchctl
# homebrew.mxcl.redis.plist contains reference to redis.conf file location: /usr/local/etc/redis.conf
redis-server /usr/local/etc/redis.conf # Start Redis server using configuration file, Ctrl+C to stop
redis-cli ping # Check if the Redis server is running
nrollr / font-face.css
Created Feb 28, 2016
Code to include custom Fonts in CSS
View font-face.css
@font-face {
font-family: 'name_font';
src:url('fonts/name_font.eot?#iefix') format('embedded-opentype'),
url('fonts/name_font.woff') format('woff'),
url('fonts/name_font.ttf') format('truetype'),
url('fonts/name_font.svg#bpicons') format('svg');
font-weight: normal;
font-style: normal;
You can’t perform that action at this time.