Skip to content

Instantly share code, notes, and snippets.

View julienbourdeau's full-sized avatar
🏠
Working from home

Julien Bourdeau julienbourdeau

🏠
Working from home
View GitHub Profile
@julienbourdeau
julienbourdeau / SassMeister-input.scss
Created May 15, 2014 12:35
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
@mixin apply-to-myleftdiv {
.moveleft {
float: left;
@content;
}
server {
server_name _DOMAIN_;
root /home/_USER_/www/wordpress;
index index.php;
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
charset utf-8;
[_USER_]
listen = /var/run/php5-fpm._USER_.sock
listen.owner = _USER_
listen.group = _USER_
listen.mode = 0666
user = _USER_
group = _USER_
pm = dynamic
pm.max_children = 15
pm.start_servers = 3
@julienbourdeau
julienbourdeau / no-cms-example
Created August 11, 2014 05:31
Nginx Server Configuration - Default
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
root /home/_USER_/www/_DOMAIN_;
index index.html index.htm index.php;
server_name _DOMAIN_;
location / {
@julienbourdeau
julienbourdeau / gist:6e3fe59b01b55c77ef30
Last active August 29, 2015 14:05
Nginx Server Configuration - Redirect 301
server {
listen 80;
server_name _DOMAIN_;
return 301 http://www._DOMAIN_$request_uri;
}
@julienbourdeau
julienbourdeau / wordpress-example
Created August 12, 2014 12:16
Nginx Server Configuration - WordPress
server {
server_name _DOMAIN_;
root /home/_USER_/www/_DOMAIN_;
index index.php;
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
charset utf-8;
@julienbourdeau
julienbourdeau / mkps.sh
Last active August 29, 2015 14:05
PrestaShop - Automatically setup dev environment (clone and install)
#!/bin/bash
red='\e[0;31m'
green='\e[0;32m'
orange='\e[0;33m'
NC='\e[0m' # No Color
remoteGitRepo="git@github.com:PrestaShop/PrestaShop.git"
defaultRootDir="/var/www/"
defaultDir="PrestaShop"
@julienbourdeau
julienbourdeau / nginx
Created August 19, 2014 11:00
Nginx Service for self-compiled Nginx
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: nginx init.d dash script for Ubuntu or other *nix.
# Description: nginx init.d dash script for Ubuntu or other *nix.
### END INIT INFO
@julienbourdeau
julienbourdeau / imgoptim
Created September 18, 2014 15:47
Find and compress JPG and PNG images (using optipng and jpegoptim) with command line
find . -name "*.png" -exec optipng '{}' \;
find . -name "*.jpg" -exec jpegoptim '{}' \;
@julienbourdeau
julienbourdeau / .jshintrc
Created October 3, 2014 07:48
Config File for JsHint
{
"eqeqeq": true,
"newcap": true,
"noarg": true,
"curly": true,
"undef": true,