Table of Contents

Miscellaneous about computing

TCP ports repartitions

The Epeios related software uses ports 53700 to 53799.

Sharing 'Linux' folder to 'Windows'

http://www.howtogeek.com/176471/how-to-share-files-between-windows-and-linux/

Under 'Linux'

[<name>]
path = /home/<user_name>/<folder>
available = yes
valid users = <username>
read only = no
browsable = yes
public = yes
writable = yes

Under 'Windows'

In the file explorer, type \\<host>\<name> (<name> is the same name as the one given in the above section.

'ssh' on same server but different OSes

When you try to connect with ssh on a machine with more then one OS (a tablet which can be boot under Windows or Android, for example), ssh will complain, or even forbid the connection when you switch the target machine from one OS to another.

One solution is to share the same key between both OSes.

The other solution is to connect to one OS, then comment out the concerned line in the known_hosts file, the connect to the other OS, and finally uncomment the previously commented line in known_hosts. You can no connect to the 2 OS and ssh will no more complain.

nmap

To scan local network : nmap -sP 192.168.0.1/24 (ip a for local address).

Dimensions of a SVG element

Function returning an array containing the x and y coordinate of the top left corner, the width and the height of the drawing area of a SVG of id id.

function svgViewBox( id ) {
 let x = 0;
 let y = 0;
 let width = 0;
 let height = 0;
 let svg = document.getElementById(id);
 let viewBox = svg.viewBox.baseVal;
 
 if ( viewBox !== null ) {
  x = viewBox.x;
  y = viewBox.y;
  width = viewBox.width;
  height = viewBox.height;
}
 
 if ( height === 0 ) {
  if ( width !== 0 )
   return "";
 } else if ( width === 0 ) 
  return ""
 
 if ( width === 0 ) {
  x = 0;
  y = 0;
  width = svg.width.baseVal.value;         
  height = svg.height.baseVal.value;         
 }
 
  return [x.toString(), y.toString(), width.toString(), height.toString()];
}