This might be worth implementing for sites which have curvy-corners using CSS3 yet not quite there yet on IE…
Hibernate starters
Input masks
Just found this which might work nicely for input boxes and so-on … esp date / time fields;
http://digitalbush.com/projects/masked-input-plugin/
See this for more crazyness; http://jquery.bassistance.de/validate/demo/marketo/mktSignup.js
JQuery guys are also thrashing it out here; http://jqueryui.pbworks.com/mask
MySQL Quick reference
To save the mysql username & password you use via command line, use the following;
Add ~/.my.cnf file with the following content
[Client]
user=myusernamehere
password=mypasswordhere
host=localhost
database=mydbnamehere
For DB Dumps via command line (in *nix);
Compressing;
mysqldump dbname | gzip -c > myfilename.sql.gz
Resoring DB;
gunzip -c myfilename.sql.gz | mysql dbname
Simpla Admin – opening tabs from URLs
simpla.jquery.configuration.js - line 50 onwardsurl_tab = unescape(self.document.location.hash);if(url_tab != '') {url_tab = url_tab.substring(5); // #tab- = 5}if($('ul.content-box-tabs li a[href=#' + url_tab + ']').length > 0) {$('ul.content-box-tabs li a[href=#' + url_tab + ']').addClass('current');$('.content-box-content div#' + url_tab).show();} else {$('ul.content-box-tabs li a.default-tab').addClass('current'); // Add the class "current" to the default tab$('.content-box-content div.default-tab').show(); // Show the div with class "default-tab"}
This will take index.html#tab-id-of-tab and open the tab with the id of ‘id-of-tab’. the ‘tab-‘ part at the start is so the browser doesn’t scroll down to the tab which is opened by itself.
DataTables
DataTables – post row-rendering;
More bed-time reading – http://www.datatables.net/usage/callbacks
http://datatables.net/forums/comments.php?DiscussionID=1478&page=1#Comment_7568 looks to be of some use as well for multiple search fields (eg. text field and dropdown box and this and that, etc).
http://datatables.net/examples/server_side/select_rows.html is something also to implement for keeping track of which rows were selected\
http://datatables.net/examples/basic_init/table_sorting.html initial column sorting
$("#example").dataTable({ "aaSorting": [[ 2, "asc" ]] });
Uploadify & PHP Sessions
Secured sites need the following parameter passed across;
session_id: <?= session_id() ?>
And somewhere in the code it should pick this up out of the $_REQUEST variable and set it … basically the problem lies in flash (what uploadify uses) not using the same session data as your browser, thus in flash’s eyes you seem logged out and it can’t do much in the way of sending files to where they need to go.
jQuery Tricks with Facebox
To use focus() and datepicker(..) properly with facebox, these need to be added in using the reveal.facebox(…) event AND use the #facebox tag as well (facebox does a copy of the content to put in it’s popup window and you can’t have two boxes focused at the same time now can we?!)
$(function() { $(document).bind('reveal.facebox', function() { $('#facebox #new_date').datepicker({dateFormat: 'dd/mm/yy'}); $('#facebox #new_date').focus(); }); });
Thanks goes to http://groups.google.com/group/facebox/msg/aea0ba1522bf13a3 for this trick! 🙂
Babovka (Cake)
Ingredients:
- 240g butter
- 1 & 1/4 cup sugar
- 5 Eggs (separate whites from yolks)
- 2 & 1/4 cups plain flour
- 1 cup milk
- 2 teaspoons baking powder
- 1/2 teaspoon grated lemon rind
- 1 teaspoon vanilla essence
- 1/3 cup cocoa powder
- oil for pan
Method
- Mix butter & sugar
- Add eggs yolks
- Beat till light & creamy
- Mix in flour & milk alternatively
- Add baking powder into last 1/2 cup of flour
- Blend in lemon peel & vanilla
- Fold in stiffly beaten egg whites
- Pour 1/2 batter into another bowl and add in chocolate
- Pour in batter in 4 alternating light & dark layers
- Cut through with a spoon for marbled effect
- Bake in preheated 200 degrees oven for 60-75 mins
- Cool in pan for 15 mins, then turn out
- Sprinkle in icing sugar
Useful Links
http://www.datatables.net
http://code.google.com/p/flot
http://themeforest.net/
http://code.google.com/closure/compiler/