The Linux Page

node

Running a specific version of Node.js

The Node.js environment is a backend server-side JavaScript environment which is being used more and more.

Under Ubuntu, we generally get pretty far behind on a TLS version. Ubuntu 16.04 offers a version 4.x when we now have 8.x avaiable! There are many reason for that problem, but that's not the point of this post...

So, I wanted to write a Zapier App. They only run your Zap tests if you have version 6.10.2. Any other version will break their test system because you cannot hope that a test will work perfectly between versions.

Therefore, I had to install the correct version. I found ...

Cassandra node says it owns 0%??

Today I ran in a little bit of a problem with an new Cassandra node installation.

After the node was created, I ran nodetool and got this:

 $ bin/nodetool status
Datacenter: dc1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens       Owns (effective)  Host ID   Rack
UN  127.0.0.1  219.83 KiB 256          0.0%              73bd8721  rack1

It took me a little while to find out that the problem was the IP address. Although it clearly says 127.0.0.1 here, the cassandra.yaml configuration file had localhost.

I edited the ...

Comment spam attack from 109.230.213.100

Network connections

This morning I was attacked by a robot. I quickly noticed that my websites were slow and saw a pretty large amount of traffic on port 80: 208 connections!

tcp        0      0 192.168.1.1:80          109.230.213.100:65413   ESTABLISHED
tcp      441      0 192.168.1.1:80          109.230.213.100:65445   ESTABLISHED
tcp        0      0 192.168.1.1:80          109.230.213.100:65071   TIME_WAIT 
tcp        0      0 192.168.1.1:80          109.230.213.100:65279   TIME_WAIT 
tcp      497      0 192.168.1.1:80          109.230.213.100:49326   ESTABLISHED
tcp ...

AddThis is down, how to prevent the slow download of your pages?

Today AddThis is down, big time! For hours...

So to make my websites load faster (although I did not delete all the caches, which is a problem too?!) I removed the functionality. If you have Drupal, there is what I have done to leave the settings the same but still hide the AddThis button and thus get all the pages of all my websites to load fast.

First we remove the link by returning an empty array:

/**
 * Implementation of hook_link(). 
 */
function addthis_link($type, $node=NULL, $teaser = FALSE) {
return array(); // immediate return
  $links = array();

  if ($type ===  ...

There are some forms where Drupal '#size' does not seem to work, why?!

I created a form a while back and included an entry like this:

  '#size' => 10

in several text fields of the form. Especially useful when you add a suffix:

  '#field_suffix' => 'Something'

But that would not do anything... I looked at the output of the form and it looked 100% correct. In other words, the input tag had its size="10" properly set. So the next step was to find whether some CSS code would be in the way.

You bet! The node.css file includes the following:

My customer cannot edit pages?!

I created a website and handed it to a customer... without realizing that the customer could not edit the pages of his site.

He reported the problem and I was rather surprised since I had not installed any module that would protect the editing of pages based on a role... what could it be? I checked the Drupal permissions a couple times... he had the right to edit all the nodes, his own and anyone else's, hmmm...

I looked at the code to try to figure it out, and there is a call to the filter module: filter_access($node->format).

Yes! Of course! I had forgotten to add his role to the ...

Macro

This is the title of your node: [[node:* cck=title; plain]].

Code references

The following are three distinct nodes using geshifilter which is a filter used in Drupal (and other systems) to transform the content of the node from code to colorful HTML.


And here is the end of this page (from the <hr> to the bottom)

Taxonomy error generated from invalid nodes

Today I ran in an error that looked like this:

Invalid argument supplied for foreach() in <path>/modules/taxonomy/taxonomy.module on line 1214.

The line number may vary depending on the version you are using. At the time, I had Drupal 6.14 and the line number was 1214.

The problem is with a node that has an invalid definition of its taxonomy field. In other words, the $node->taxonomy is not defined. If it were an empty array, the function would not fail.

[toc hidden:1]

My title, test #7

Hmmm... Okay... so Facebook has a latency, but ping.fm does not seem to take anything in account!?

I'm wondering whether ping.fm checks the PTR (whatever that is, hey?!) and if incorrect, refuses to forward the post. That would make sense since the PTR is 99% of the time wrong when spammers send emails.

Well! Today it worked 8-) After more than 7 tests because I did not always increment that number, but still. That's good. I'm moving forward. More soon! 


Inserting:

This is the title of your node: [].

Syndicate content Syndicate content

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • EDLL
    Enhanced Dynamic Link Library--an enhanced dynamic linker that simulates the behavior of the Linux and other Unix linkers by offering a way for libraries to link back inside the main executable. See the EDLL website for more information.
  • auto
  • console
  • deassociate
  • template