Posts

Showing posts from June, 2011

Google Search By Image

Been waiting years for this! Works very well in recognizing identical pictures and even locations and landmarks from personal photographs.. But does not seem powerful enough for facial recognition yet. Inside Google Search · Search by Image Google Search By Image: Use A Snapshot As Your Search Query

Liquid Benchmark Exchange Traded Scheme (Liquid BeES)

For those looking for the equivalent of a retail bond market in India

Android browser simulate desktop browser

Start debug mode by typing about:debug in address window Use the new settings now available in the browser menu to simulate a desktop browser. The browser will now ignore mobile websites and stay at the main website for all addresses.

ubuntu youtube download

sudo apt-get install youtube-dl youtube-dl http://www.youtube.com/watch?v=QY8g_IsI_gY

File and string compare

On the Mac, you can simply use diff on the terminal to compare files. Original 2011 link - Tool for comparing strings directly The tool I use most often now (2022) is diffchecker

Drupal block visibility PHP

//To show a block only on user pages or certain nodes $ShowBlock = false; $ShowBlock = ((arg(0) == 'user') && is_numeric(arg(1)) && (arg(2) == null));  if ($ShowBlock)     return $ShowBlock; // Is user page     $ShowBlock = ((arg(0) == 'node') && (arg(2) == null)); if (!$ShowBlock)     return $ShowBlock; // Not node page     $ShowBlock = (arg(1)==1 || arg(1)==13926 || arg(1)==13927 || arg(1)==13928 || arg(1)==13929 || arg(1)==13930); return $ShowBlock; // Front page or not ?>

Drupal FBConnect

// Creating content profile programmatically bypassing validations function hook_user($op, &$edit, &$user, $category = NULL) { global $user; // Create a near empty content profile if ($op == 'insert' && $edit['fb_avatar'] == 1) { $node = array(); $node['type'] = 'profile'; $node['name'] = 'Profile'; $node['status'] = 1; $node['format'] = 0; $node['comment'] = 0; $node['promote'] = 0; $node['sticky'] = 0; $node['uid'] = $edit['uid']; $node['title'] = 'Facebook user - '.$edit['name']; $node = (object)$node; $node->field_aa[0]['value'] = 'asdf'; $node->field_bb[0]['value'] = 100; $node->created = time(); $node->validated = TRUE; node_save($node); }