Skip to content

Instantly share code, notes, and snippets.

View florentb's full-sized avatar

Florent Bourgeois florentb

View GitHub Profile
@florentb
florentb / node.sh
Last active August 29, 2015 14:01 — forked from adamcbrewer/node.sh
# This command will make sure the process persists
# even after you log out of a session
node server.js >/dev/null 2>&1 &
@florentb
florentb / example.com
Last active January 5, 2019 14:54
Nginx Server Configs
# www to non-www redirect -- duplicate content is BAD:
# Choose between www and non-www, listen on the *wrong* one and redirect to
# the right one -- http://wiki.nginx.org/Pitfalls#Server_Name
server {
# don't forget to tell on which port this server listens
listen 80;
# listen on the www host
server_name www.example.com;
@florentb
florentb / layout.css
Created March 24, 2014 12:34
Different depth of nodes will use different colour allowing you to see the size of each element on the page, their margin and their padding. Now you can easily identify inconsistencies.
* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
* * * * { background-color: rgba(255,0,255,.2); }
* * * * * { background-color: rgba(0,255,255,.2); }
* * * * * * { background-color: rgba(255,255,0,.2); }
@florentb
florentb / clearfix.scss
Created September 2, 2013 10:25
Sass Clearfix Mixin
@mixin clearfix() {
& {
*zoom: 1;
}
&:before,
&:after {
content: "";
display: table;
}
&:after {
@florentb
florentb / a2createsite.sh
Created July 26, 2011 13:22
bash script - apache, vhost, website
#!/bin/bash
VHOST_CONF=/etc/apache2/sites-available/
ROOT_UID=0
NOTROOT=87
WWW_ROOT=/home/web/
# owner of the site directory
WEBUSER=web