Skip to content

Instantly share code, notes, and snippets.

View florentb's full-sized avatar

Florent Bourgeois florentb

View GitHub Profile
@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
@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 / 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 / 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 / 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 / html5-template.html
Created July 12, 2014 13:41
This is boilerplate markup (a blank HTML document template) for HTML5-capable web pages.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
@florentb
florentb / box-sizing.css
Created July 16, 2014 19:44
Easier to change the box-sizing in plugins or other components that leverage other behavior
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
@florentb
florentb / Vagrantfile
Created October 1, 2014 11:15
Vagrant Ubuntu + graphics libs + Nodejs
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.network "public_network"
end
@florentb
florentb / Vagrantfile
Last active August 29, 2015 14:07
Vagrant ELK + Collectd
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.network "public_network"
end
@florentb
florentb / Vagrantfile
Last active August 29, 2015 14:09
Vagrant NodeJS + MongoDB + Redis
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.host_name = 'trusty64-nodejs'