Posts

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)

Two Extremes of Awareness - Zero to PhD in Psychology

Image
The difference between someone who has no idea what they're doing, versus someone who knows exactly what they're doing.

Hans-Peter Dürr: The spiritual is the driving force

Image
Let's say I mean I'm a dyed-in-the-wool quantum physicist. So that means that I fully consciously took part in this development that took place at the beginning of this century. It started with Planck, with Einstein and so on. But the important thing is that Planck and Einstein, who started this development, actually didn't believe it. Because they interfered, uncertainty principle and so on and then quantum physics and so on. They said it can only be a transitional stage. And it was the young people, Werner Heisenberg, in whose office I am sitting here, Werner Heisenberg at the age of twenty, who said: this is the breakthrough! We need to see reality totally differently. No longer material, but much more open.  For these people, the difficulty then arose: how can something that is so open, which could also include people at once, because we never wanted to submit to determinism, because we naturally thought of ourselves as creative. In such an open world, how can you ever ...

Linux Firewall (iptables) commands for DDoS attacks

Image
You may need to check your logs and block some IPs manually on a regular basis. Always use ipsets for efficient filtering, especially when dealing with larger numbers of entries. sudo ipset create gvset1 hash:ip sudo ipset create gvset2 hash:net sudo iptables -A INPUT -m set --match-set gvset1 src -j DROP sudo iptables -A INPUT -m set --match-set gvset2 src -j DROP For example, any IP that has more than 10 access denied or page not found errors in the last 24 hours and are not Google or MSN IPs. Ensure that the hosts do not resolve to Google search, MSN search or the Amazon crawler. It's usually ok to resolve to Amazon AWS. Use at your own risk. This method may block some legitimate ISPs. Also block the SSH port ( 22 ) on your server hosting provider firewall, if possible. Important: Make sure your own IP is not in a range before running the commands. Also ensure that any IPs within the googlebot IP range below, are removed. sudo iptables -D INPUT -s 66...

Why Body Count Matters - Biologically

Image
Biological reproductive constraints require one side to psychologically optimize for quantity, and the other to optimize for quality; as so elegantly demonstrated by the highly skewed ratios on dating apps. Note that optimizing one does not imply neglecting the other, just giving higher priority. So while a high count is a genuine challenge for one side, it's simply an indication of poor judgment on the other. Simply put, one side claiming a high count has the exact same effect as the other side claiming extreme restraint. Both claims indicate high quality when done by one side, and poor quality when done by the other. This is also why social proof is such a powerful stimulant, but only for one side. Then there's telegony .

Cosina CT1 - Diamond In The Rough

Image
Some of the legendary premium Film SLR cameras such as the Voightlander Bessaflex and other expensive top brand models were just rebranded and white labeled Cosina CT1 s, a camera I've used since childhood; for almost 40 years now.