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
// 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 |
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
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) { |
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
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 |
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
// Usage: | |
m_SideBarTexture = CreateTexture (CreateColor ("#30433C")); | |
// The goodness: | |
static Color CreateColor (string hexCode, float alpha = 1.0f) | |
{ | |
if (hexCode.Length == 7 && hexCode[0] == '#') | |
{ |