Skip to content

Instantly share code, notes, and snippets.

View jiceb's full-sized avatar
👋

Jean-Charles Bournot jiceb

👋
View GitHub Profile
@jiceb
jiceb / gist:1102773
Created July 24, 2011 16:09
ngnix.conf - On-Demand Image Creation and Static Delivery with NGINX
# somewhere in the server section of any nginx config
# http://www.marceleichner.de/blog/on-demand-image-creation-and-static-delivery-with-nginx/
location ~* \.(png|gif|jpg|jpeg)(\?[0-9]+)?$ {
# try existing files, or put request to index.php
try_files $uri /thumbnailer.php?image=$uri;
# old method when try_files did not exist
# if (!-f $request_filename) {
# rewrite ^/(.*)$ /thumbnailer.php?image=$1 last;
# break;
@jiceb
jiceb / nginx.conf
Created October 5, 2011 11:38
nginx php-fpm socket
fastcgi_pass unix:/tmp/php.sock;
@jiceb
jiceb / gist:1649781
Created January 20, 2012 21:50
rsync & ssh
rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/
rsync -avz -e 'ssh -p000' remoteuser@remotehost:/remote/dir /this/dir/
@jiceb
jiceb / dabblet.css
Created January 24, 2012 09:09
test
/**
* test
*/
background: #8DCFCA;
background: linear-gradient(45deg, #8DCFCA, #BDD5D5);
min-height:100%;
color: #425F5C;
font-size: 72px;
text-align: center;
@jiceb
jiceb / dabblet.css
Created January 24, 2012 09:16
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #7C9D54;
background: linear-gradient(45deg, #7C9D54, yellow);
background: #A8D26E;
background: linear-gradient(45deg, #A8D26E, #B0CB8F);
/**
* j
*/
background: #D2C9AE;
background: linear-gradient(90deg, #D2C9AE, #38708B 40%, #0C314A);
min-height:100%;
@jiceb
jiceb / dabblet.css
Created February 29, 2012 16:36
Typing animation with pure CSS
/**
* Typing animation with pure CSS
* Revised. Browser support (as of Feb 2012): Firefox, IE10
*/
@keyframes typing { from { width: 0; } }
@keyframes blink-caret { 50% { border-color: transparent; } }
h1 {
font: bold 200% Consolas, Monaco, monospace;
@jiceb
jiceb / .htaccess
Created April 24, 2012 07:18
Remove trailing slash with .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# where the magic is done !
RewriteRule (.*)/$ $1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
@jiceb
jiceb / dabblet.css
Created June 12, 2012 19:52
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
@import url("http://fonts.googleapis.com/css?family=Norican");
@import url("http://fonts.googleapis.com/css?family=Graduate");
@import url("http://fonts.googleapis.com/css?family=Arvo:700");
html {
background: #f06;
@jiceb
jiceb / gist:3832266
Created October 4, 2012 08:33
Tar / Untar a folder
# tar a folder
tar -pczf web.tar.gz web/
# untar
tar xvfz web.tar.gz
tar xfz web.tar