Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| <?php | |
| /** | |
| * imageColor | |
| * | |
| * Shows three methods to find the 'average' image color. | |
| * | |
| * Each function expects a gd image object. | |
| * | |
| * imageColor::averageResize($image) resizing to 1px, and checking the color. | |
| * imageColor::averageBorder($image) find the average color of all border pixels. |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| #!/bin/bash | |
| # This is a wrapped up version of the instructions at | |
| # http://code.google.com/p/irssi-libnotify/wiki/MainPage for ubuntu | |
| # | |
| # Usage: Just run this script from the command line with no arguments | |
| # | |
| # Tested on Ubuntu 12.04.1 (64 bit) | |
| echo "" |
| var Class = function (superClass, prototype) { | |
| if (prototype === undefined) { | |
| prototype = superClass; | |
| } else { | |
| var newPrototype = Object.create(superClass); | |
| for (var a in prototype) { | |
| newPrototype[a] = prototype[a]; | |
| } | |
| prototype = newPrototype; | |
| } |
| <?php | |
| /** | |
| * WordPress class - Manages the WordPress XML file and gets all data from that. | |
| */ | |
| class Wordpress | |
| { | |
| public static $wpXML; |
| [ | |
| { | |
| "class": "sidebar_container", | |
| // $base02: #073642 | |
| "layer0.tint": [7,54,66], | |
| "layer0.opacity": 1.0, | |
| "layer0.draw_center": false, | |
| "layer0.inner_margin": [0, 0, 1, 0], | |
| "content_margin": [0, 0, 1, 0] |
| [ | |
| { | |
| "class": "sidebar_container", | |
| // $base01: #586e75 | |
| "layer0.tint": [88,110,117], | |
| "layer0.opacity": 1.0, | |
| "layer0.draw_center": false, | |
| "layer0.inner_margin": [0, 0, 1, 0], | |
| "content_margin": [0, 0, 1, 0] |
A list of amazingly awesome PHP libraries, resources and shiny things.
| <?php | |
| # Create a list with numbers ranging from 10 to 20. | |
| Form::selectRange('number', 10, 20); | |
| # Create a list with years ranging from 1900 to 2000. | |
| Form::selectYear('year', 1900, 2000); | |
| # Creates a list with month names. | |
| Form::selectMonth('month'); |