This has been moved to the BlobBuilder.js project on GitHub.
| // It is important to declare your variables. | |
| (function() { | |
| var foo = 'Hello, world!'; | |
| print(foo); //=> Hello, world! | |
| })(); | |
| // Because if you don't, the become global variables. | |
| (function() { |
| <?php | |
| /** | |
| * This program is free software. It comes without any warranty, to | |
| * the extent permitted by applicable law. You can redistribute it | |
| * and/or modify it under the terms of the Do What The Fuck You Want | |
| * To Public License, Version 2, as published by Sam Hocevar. See | |
| * http://sam.zoy.org/wtfpl/COPYING for more details. | |
| */ | |
| /** |
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
| #!/bin/bash | |
| # Copyright 2010 Michael Grace | |
| # http://geek.michaelgrace.org | |
| # Created 06/13/2010 | |
| clear | |
| echo "Script created by Mike Grace http://www.google.com/profiles/themikegrace" | |
| echo "========================================================================" | |
| echo "" | |
| # check if script is run as root or with sudo |
| <?php | |
| /* | |
| Plugin Name: Artwork Approved User Meta | |
| */ | |
| add_action('show_user_profile', 'my_user_profile_edit_action'); | |
| add_action('edit_user_profile', 'my_user_profile_edit_action'); | |
| function my_user_profile_edit_action($user) { | |
| $checked = (isset($user->artwork_approved) && $user->artwork_approved) ? ' checked="checked"' : ''; |
| <?php | |
| $start = microtime(true); | |
| $fpIn = fopen('input.csv', 'r'); | |
| $fpOut = fopen('output-pure.csv', 'w'); | |
| while (($row = fgets($fpIn)) !== false) | |
| { | |
| $fields = explode(";", $row); | |
| fwrite($fpOut, |
| via http://wordpress.stackexchange.com/questions/2623/include-custom-taxonomy-term-in-search/5404#5404 | |
| function atom_search_where($where){ | |
| global $wpdb; | |
| if ( is_search() ) | |
| $where .= "OR (t.name LIKE '%".get_search_query() . "%' AND {$wpdb->posts} . post_status = 'publish')"; | |
| return $where; | |
| } |
| @mixin ie6 { * html & { @content } } | |
| #logo { | |
| background-image: url("/images/logo.png"); | |
| @include ie6 { background-image: url("/images/logo.gif"); } | |
| } |
#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)
Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.
(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)
##Option 1: Using jQuery 1.7's $.Callbacks() feature: