Posts

Showing posts from 2026

Hide wallpaper on Mac lock-screen

Image
In keeping with the brilliant corporate strategy of the steady decline of Apple's UX since the passing of Jobs, Macs no longer let you separate your private desktop wallpaper from your lock-screen wallpaper. Here's a quick hack to get past that. create a small script to open your wallpapers randomly cd ~/Pictures/Wps/ find . -maxdepth 1 -type f | sort -R | head -n 1 | xargs open Then create a cron job to run the script periodically. */30 * * * * /Users/name/Desktop/wpcron.sh  You may need to give cron permission to access your script and images.

Drupal 7 Search Nodes with Code

Image
<? $nodes = db_select('node', 'n')     ->fields('n', array('nid'))     ->condition('n.type','common_stock', '<>')     ->execute(); foreach ($nodes as $node) { $loadednode = node_load($node->nid); $wrapper = entity_metadata_wrapper('node', $loadednode); $body_value = $wrapper->body->raw(); $strpos1 = strpos($body_value['value'],'drupal_page_is_cacheable'); if ($strpos1 > 0)     echo '<a target="_blank" href="/node/'.$node->nid.'">'.$loadednode->title.'</a><br>'; } ?> 

Translations as Propaganda - Chanakya Niti example

Image
From Chapter 8 Verse 5 of Chanakya Niti चा डालानां सह े च सू र भ त वद श भः। एको ह यवनः ो ो न नीचो यवनात् परः।। "The wise who discern the essence of things have declared that the yavana (meat eater) is equal in baseness to a thousand candalas the lowest class), and hence a yavana is the basest of men; indeed there is no one more base." One word and three different interpretations. The word yavana is interpreted as meat eater in one English translation (above). Try and guess the translation of the same word in the version below. (not even historically correct, not remotely)