Skip to content

Instantly share code, notes, and snippets.

// main.m
// creategif
//
// Created by Kevin Meaney on 21/10/2013.
// I've briefly blogged about it here:
// http://blog.yvs.eu.com/2013/10/creating-gif-animations-using-coreimagequartz
// The following code is all that is all the code needed for a creating a command line tool to generate
// a gif animation from image files.
// The main limitation with this code is that apart from the frame delay time of 0.1 second, every
var objectToQueryString = function (a) {
var prefix, s, add, name, r20, output;
s = [];
r20 = /%20/g;
add = function (key, value) {
// If value is a function, invoke it and return its value
value = ( typeof value == 'function' ) ? value() : ( value == null ? "" : value );
s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
};
if (a instanceof Array) {
@aaronpeterson
aaronpeterson / mpnml
Created February 21, 2013 02:46 — forked from holms/mpnml
sudo port -v install mysql5-server
# Don't do any post-install instructions
sudo -u _mysql mysql_install_db5
# if above command produce this error: ERROR: 1004 Can't create file '/var/tmp/#sqle967_1_0.frm' (errno: 9)
# do this:
# sudo chown -R mysql:mysql /opt/local/var/db/mysql5
# sudo chmod u+rwx,go= /opt/local/var/db/mysql5
# sudo /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
@aaronpeterson
aaronpeterson / Styles.cs
Created September 11, 2012 20:51 — forked from AngryAnt/Styles.cs
Handy utility functions for creating solid colour textures for GUI use.
// Usage:
m_SideBarTexture = CreateTexture (CreateColor ("#30433C"));
// The goodness:
static Color CreateColor (string hexCode, float alpha = 1.0f)
{
if (hexCode.Length == 7 && hexCode[0] == '#')
{