Sketchy Brush Set

A nice little brush set containing hand-drawn arrows for that sketchy feel in your design.

http://finner.deviantart.com/art/Sketchy-Arrow-Brushes-59096138

Also in the pack: Sketchy Marks and Sketchy Text

And the mother of them all: Hand-drawn-photoshop-brushes-collection

Font Recognizer

Not everyone can recognize a font by their distinct cross bar or descender. For the less enlightened – me included – this tool that helps you recognize fonts. Submit an image and it will try to match it to their database of fonts.

http://new.myfonts.com/WhatTheFont/

If you’re in the mood for a little more on typeface anatomy, check out http://www.fonts.com/AboutFonts/Articles/fyti/Anatomy.htm and http://wallpampers.com/misc/2799

Drupal Tip #6 – Missing Groups When Altering Node Forms

In customizing your node forms, hook_form_alter is a great way to restructure your forms before it is displayed. If you are using views2 and use groupings to organize your forms, its necessary to use hook_form_alter to bring certain form elements into groups because you’re not allowed to do so from the UI. Fields such as the title and body cannot be dragged under any groups in the manage fields page of the content type.

When a field is not in any groups, it will appear as a direct child key of the form, e.g.

$form['field_example'].

When it is under a group, it will be nested in a key with the group’s name, e.g.

$form['group_example']['field_example'].

To move the field, simply assign its value into the appropriate group key, and unset the original key:

$form['group_example']['field_example'] = $form['field_example'];
unset($form['field_example']);

One common problem though, is that the group keys are not appearing in the $form array passed into your_module_form_alter. You double checked the content type in the admin page (/admin/content/node-type/[your-node-type]/fields) but they are still not showing. Do not panic, they simply have not been created yet. The reason for this is that the CCK module’s hooks responsible for creating these keys are fired later than your form_alter hook, and this is a simple problem to solve.

Making sure your hooks are called after CCK

Drupal determines which modules are called when using their weight in the system table. To reorder your module to after CCK, you can manually set it’s weight:

db_query("UPDATE {system} SET weight = 50 WHERE name = 'your_node_type'");

One common place to do this is in the your_module.install file, so that its set only once during installation. My choice of weight (50) is purely arbitrary, you may need to inspect your own system table to determine the most appropriate weight.

Now your group keys should be appearing in the $form array.

Drupal Tip #5 – Custom Theme Function for Forms

Defining a custom theme function for forms involves writing the actual theme function and registering it with your own hook_theme function.

Custom Theme Function

The name of the function would be your form ID (replacing dashes with underscores) prepended by ‘theme_’:

function theme_your_form_id($form){
$output = 'Any html you need here';
$output .= drupal_render($form['subject']);
$output = ' and here';
$output .= drupal_render($form['submit']);
$output .= drupal_render($form);
$output .= '';
return $output;
}

Registering the theme function

In your hook_theme implementation, add a key to the returned array. The key should be your form id, do not include the ‘theme_’ prefix.

function deepgreen_theme() {
$themes = array(
. . . other theme functions here . . .
'your_form_id' => array (
'arguments' => array('form' => NULL),
'type' => 'module',
),
);
return $themes;
}

Drupal Tip #4 – Normal buttons with Drupal Form API

Drupal 6′s form API does not support input elements of type “button”. If you define one with ‘#type’=>’button’, it will be converted to a ‘#type’=>’submit’ automatically. So, how do you do it other than placing the button in a template file or function? You can use the ‘markup’ type, which is the default if no ‘#type’ key is defined. Example:

$form['submit'] = array(
'#value' => '<input type="button" onclick="return submitForm();" />',
);

Drupal 6 Form API Reference

Running your app in the BlackBerry Simulator

The BlackBerry OS SDK currently only supports Flash Builder 4.0.1, not Flash Builder 4.0. When following steps described in BlackBerry’s own Getting Started Guide to launch your app in the simulator, users of Flash Builder 4.0 will get an internal error:

An internal error occurred during: "Launching [your project name]".
com.adobe.flexide.launching.air.ApolloLaunchConfiguration.getAIRProfile()Ljava/lang/String;

To overcome this, either download the 261MB patch from adobe, or use the command line packager which comes included with the BlackBerry OS SDK.

Using the command line packager

In essence, there is only one command that you’ll need, the syntax is:

blackberry-airpackager -package output_bar_file_name -installApp -launchApp
project_name-app.xml project_name.swf any_other_project_files
-device IP_address

What you’ll need: your project name, your BlackBerry simulator’s IP address, the .swf of your project which is compiled by Flash Builder using the normal tools (Project->Build Project or export release build). And remember the output_bar_file_name must end with the extension .bar. If you forget this, however, the error describes it quite plainly to you. For me, a working command looks like (where “AirTest” is my project name):

blackberry-airpackager -package AirTest.bar -installApp -launchApp AirTest-app.xml AirTest.swf -device 192.168.92.128

(If you are not familiar with running commands in windows, you need to add the path to blackberry-airpackager.bat in your system’s “path” environment variable.)

Do I have to run that manually everytime?

Fortunately, you don’t. The command can be configured as a builder in Flash Builder 4.

  1. Go to Project->properties, and under Builders, click on the “New” button to add a new builder. Select type Program, give a name to the builder (any will do, I named mine “BBLauncher”).
  2. Enter the path to your blackberry-airpackager.bat in the location field. Mine was:

    D:\Program Files\Adobe\Adobe Flash Builder 4\sdks\blackberry-tablet-sdk-0.9.0\bin\blackberry-airpackager.bat

  3. Enter the path of your project in the working directory (the folder where you find your main .as file, likely your current “src” directory).
  4. And Lastly, in Arguments, enter the options of the command:

    -package AirTest.bar -installApp -launchApp AirTest-app.xml AirTest.swf -device 192.168.92.128

Move this builder to after “Flex” and “AIR application.xml Builder”, and you are done. From now on you can launch the app in the simulator by doing a Project->Build project.

Posts that helped me: http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Getting-Internal-Error-When-Attempting-to-Debug/td-p/621952/page/2

Installing BlackBerry Tablet OS SDK for Adobe AIR

Users of 64bit windows might get frustrated installing the new BlackBerry Tablet OS SDK if you are not using the 32bit Java Development Kit (JDK). When you run the .exe from BlackBerry, an error claims that “Win64 not supported. The author of the package you are installing did not include support for this platform.” The solution is trivial:

Unzip “BlackBerryTabletSDK-Air-Installer-0.9.0-Win.exe” and you should see 2 folders, “InstallerData” and “Windows”. Go into the Windows folder and find the .lax file.

Open the file in a text editor and change this line

lax.nl.current.vm=

to

lax.nl.current.vm=[your path to java.exe]

If you are not sure where is your JDK installation, check your C:/Program Files (x86)/Java folder for a folder named like jdkx.x.x_xx. Open it and look for the bin folder inside, your java.exe should be inside. For example, my path would be:

lax.nl.current.vm=C:/Program Files (x86)/Java/jdk1.6.0_22/bin/java.exe

Save the file and run the .exe in the same folder (BlackBerryTabletSDK-Air-Installer-0.9.0.201010221500.exe) to start the installation.

If you do not have your JDK yet, get it at http://www.oracle.com/technetwork/java/javase/downloads/index.html

Chrome Extension or bookmarklet to save 9gag pics

That would be a real time-saver.

Edit: Woohoo extension is now live at https://chrome.google.com/extensions/detail/jojobhlmicphanpllajhobjikbdfpodj

Open Kinect Projects

Less than a month since Kinect’s launch, people are already experimenting with a hacked driver of the Kinect sensor. These include capturing 3d video, 3d object recognition and interactive puppeting. At the moment I haven’t seen full 3d video capturing, and I regard those online experiments as 2.5D as they are only getting the side facing the sensor. But any moment now someone’s gonna link an array of them together to get nearly-full 3d video. That would be awesome.

Keep track of these projects at http://openkinect.org/wiki/Gallery

Neumodo’s Photoshoot

Edited some clips I took during the photoshoot