This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function list_all_images($path) | |
{ | |
$array = array(); | |
$finfo = finfo_open(FILEINFO_MIME_TYPE); | |
$files = new RecursiveIteratorIterator( | |
new RecursiveDirectoryIterator($path), | |
RecursiveIteratorIterator::SELF_FIRST | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* JSON response builder, useful for AJAX request | |
* forms. Provides a nice way to send messages | |
* back to the view | |
* | |
* @param $type | |
* @param $message | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Helper class for storing and fetching cache | |
* data by passing through keys. Setting up | |
* Memcache tutorial: http://code.tutsplus.com/tutorials/turbocharge-your-website-with-memcached--net-23939 | |
*/ | |
class Cache | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
sudo apt-get install php5-imagick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ImagickServiceProvider { | |
// Image objects | |
protected $image; | |
protected $header; | |
protected $imagick; | |
protected $imagickDraw; | |
protected $imagickPixel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*BACKGROUND SIZE COVER */ | |
@mixin cover-background( $path ) | |
{ | |
background-image: url( "../../" + $path ); | |
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + $path + "', sizingMethod='scale')"; | |
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="", sizingMethod="scale"); | |
} | |
/* BACKGROUND GRADIENT */ | |
@mixin background-gradient($startColor: #3C3C3C, $endColor: #999999) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert video to GIF using ffmpeg | |
ffmpeg -i input.mp4 -pix_fmt rgb24 output.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery plugin boilerplate | |
* | |
* Inspiration: | |
* http://msdn.microsoft.com/en-us/scriptjunkie/ff608209 | |
* http://www.learningjquery.com/2007/10/a-plugin-development-pattern | |
* http://shichuan.github.com/javascript-patterns/ | |
* | |
* Author: Aki Karkkainen/@akikoo | |
* Licensed under the MIT license |
OlderNewer