It is often helpful to be able associate a private IP address with the local loopback. This may be required to allow references to host services from within the private network space of a Docker container for example. Configure a Local Network Interface in Mac OSX We will associate a private IP address 10.10.10.100 with the lo0 (127.0.0.1) network interface of our Mac. Create /Library/LaunchDaemons/ca.epbc.loopback-dev.plist: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.
Let’s say there is a remote service – maybe a Postgres or MySQL database server – running on a network that doesn’t expose the service port. If you have SSH access to a host on that network – let’s call it jump – and jump can access the service, it is possible to create what is called an SSH tunnel through jump to the remote service. Here’s how. Let’s use the example of accessing Postgres on its usual port 5432 on host pgsrv on the same network as jump.
Ref: http://float-middle.blogspot.ca/2009/07/find-missing-value-in-sequence-in.html Suppose you have database table with a unique auto-increment primary key. Over time, entries may be deleted from the table, so there are “holes” in the primary key’s values. Find the missing IDs as follows: SELECT DISTINCT id + 1 FROM mytable WHERE id + 1 NOT IN (SELECT DISTINCT id FROM mytable);
A quick way to get the public facing IP address of a system: $ curl ifconfig.me