I hereby claim:
- I am zbee on github.
- I am zbee (https://keybase.io/zbee) on keybase.
- I have a public key whose fingerprint is E575 5FDA 6B8F 0008 ADBC C075 1191 87B7 5A54 2B6C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <select name="timezone"> | |
| <?php | |
| $timezones = DateTimeZone::listIdentifiers(DateTimeZone::ALL); | |
| foreach ($timezones as $timezone) | |
| echo '<option value="'.$timezone.'">'.$timezone.'</option>'; | |
| ?> | |
| </select> |
| #Get ready | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| #Install apache | |
| sudo apt-get install apache2 | |
| #Install mysql | |
| sudo apt-get install mysql-server php5-mysql | |
| #Set up mysql | |
| sudo mysql_install_db | |
| sudo mysql_secure_installation |
| (function ($) { | |
| $.fn.sexyTime = function (options) { | |
| var opts = $.extend({}, $.fn.sexyTime.defaults, options); | |
| var time = opts.time; | |
| return this.each(function() { | |
| var position = $(this).position(); | |
| $(this).css("z-index", "100"); | |
| $(this).css("position", "relative"); | |
| $(this).css("text-align", "center"); |
| //Before now or writing your own function you could only do String.prototype.replacewith a search and a replacement, | |
| //or an array of searches to be repalced with their matching item in an array of replacements. | |
| //Meaning you couldn't do something like replace all question marks in `cake ? pie ? noodles` with a matching | |
| //item in an array of replacements, like this: `thatString.replace("?", ["meat","veggies"])` and get something like | |
| //`cake meat pie veggies noodles`, but now you can! :D (note: number of occurences of search must match count() of $replace) | |
| //"?no?".replaceArray("?", ["s","w"]) //returns `snow` | |
| if (!String.prototype.replaceArray) { | |
| String.prototype.replaceArray = function(find, replace) { | |
| var x = 0 |
When using the battle.net API amounts of currency (like how much money you have, or how much a buyout for an auction item is) are displayed as a simple amount of copper (example: 174056); And that's not human readable.
So, I made a little baby function to format into either g s c or the padded version (adds a 0 in front of silver and copper if it's a single digit).
Hope someone needs this eventually :)
| Ok, so when you serialize a form in JQuery - $('#my-form').serialize() - you get something like | |
| title=cake&date=2014-07-10 2:56PM&content=cake cake cake&tags=cake&new=post | |
| Obviously, that isn't super useful to PHP and unserialize() does nothing for it. | |
| So, I made unJQSerialize(); which is a little function to go through the serialized form and break it down into an actual PHP array. | |
| When unJQSerialize() is used, you'll get something like | |
| [title] => cake [date] => 2014-07-10 2:56PM [content] => cake cake cake [tags] => cake [new] => post |
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <div id="select"> | |
| <div class="Cerulean"><img src="http://bootswatch.com/cerulean/thumbnail.png" width="250px"><br>Cerulean<hr></div> | |
| <div class="Cosmo"><img src="http://bootswatch.com/cosmo/thumbnail.png" width="250px"><br>Cosmo<hr></div> | |
| <div class="Cyborg"><img src="http://bootswatch.com/cyborg/thumbnail.png" width="250px"><br>Cyborg<hr></div> | |
| <div class="Darkly"><img src="http://bootswatch.com/darkly/thumbnail.png" width="250px"><br>Darkly<hr></div> | |
| <div class="Flatly"><img src="http://bootswatch.com/flatly/thumbnail.png" width="250px"><br>Flatly<hr></div> |