Skip to content

Instantly share code, notes, and snippets.

#
# File compressor plugin for jekyll
# =================================
#
# By [mytharcher](https://github.com/mytharcher)
# 2012-05-20
#
# Updated by [nicoespeon](https://github.com/nicoespeon)
# 2013-04-12
#
@wookiecooking
wookiecooking / gist:5596758
Last active December 17, 2015 10:39 — forked from eric1234/gist:4384588
[PHP] Check PHP for errors
find ./ -name \*.php | xargs -n 1 php -l
@wookiecooking
wookiecooking / install-php5+nginx.sh
Created May 17, 2013 03:37 — forked from spolu/install-php5+nginx.sh
[Ubuntu] Install PHP5 and NGINX
sudo apt-get install nginx
sudo apt-get install spawn-fcgi
apt-get install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
@wookiecooking
wookiecooking / h5bp-twitter-bootstrap
Last active December 17, 2015 10:39 — forked from paulirish/h5bp-twitter-bootstrap
[Bootstrap] Shell script to quickly setup a project using html5boilerplate and twitter bootstrap
#!/bin/sh
echo "
Cool, let's start.
"
src=$PWD
@wookiecooking
wookiecooking / handle_file_upload.php
Created May 17, 2013 03:23 — forked from ebidel/handle_file_upload.php
[PHP] File Upload + Form
<?php
$fileName = $_FILES['afile']['name'];
$fileType = $_FILES['afile']['type'];
$fileContent = file_get_contents($_FILES['afile']['tmp_name']);
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent);
$json = json_encode(array(
'name' => $fileName,
'type' => $fileType,
'dataUrl' => $dataUrl,