Skip to content

Instantly share code, notes, and snippets.

@davethegr8
davethegr8 / deploy.sh
Last active August 29, 2015 14:16 — forked from bettin/deploy.sh
#!/bin/bash
# Requires s3cmd
# https://github.com/s3tools/s3cmd
# Variables
LIVE_BUCKET="s3://$1"
SITE_DIR='_site/' # run this script from your Jekyll root folder.
module Jekyll
class LessCssFile < StaticFile
attr_accessor :styles
def destination(dest)
File.join(dest, @dir, @name.sub(/less$/, 'css'))
end
def write(dest)
dest_path = destination(dest)
from PIL import Image
backgroundColor = (0,)*3
pixelSize = 9
image = Image.open('input.png')
image = image.resize((image.size[0]/pixelSize, image.size[1]/pixelSize), Image.NEAREST)
image = image.resize((image.size[0]*pixelSize, image.size[1]*pixelSize), Image.NEAREST)
pixel = image.load()
@davethegr8
davethegr8 / php-cs-fixer-pre-commit.php
Created September 4, 2012 18:17 — forked from mardix/php-cs-fixer-pre-commit.php
A pre-commit hook to make PHP code PSR-2 compliant, check for syntax error
#!/usr/bin/php
<?php
/**
* .git/hooks/pre-commit
*
* This pre-commit hooks will check for PHP error (lint), and make sure the code
* is PSR compliant.
*
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer)
*