Minecraft Server and Direct Connect

Refer: http://gaming.stackexchange.com/questions/133658/how-do-you-make-a-local-lan-server-in-minecraft

Five steps for Direct Connect - No Server Needed

  • Open to LAN
  • It will give you a cache numb er (5 numbers)
  • Find your IPv4 Address using ipconfig in Command prompt (search CMD in search bar)
  • combine to make something like 123.456.7.8:89072
  • use direct connect and go on

Running a Minecraft Server

Using Parallels with a Windows 7 appliance.  It was necessary to download a minecraft_server.exe or the jar equivalent from the minecraft.net site.  Once launched, you could connect to it via localhost on the appliance, since the game was running on the same place and then other machines could connect to it.  It was also necessary to have the appliance bridge the network adapter too.

Installing Java 7, 8 or 12 in Ubuntu

Refer: https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get

Installing default JRE/JDK

This is the recommended and easiest option. This will install OpenJDK 6 on Ubuntu 12.04 and earlier and on 12.10+ it will install OpenJDK 7.

Installing Java with apt-get is easy. First, update the package index:

sudo apt-get update

Then, check if Java is not already installed:

java -version

If it returns "The program java can be found in the following packages", Java hasn't been installed yet, so execute the following command, but you may want to move to Oracle 7 or 8 instead:

sudo apt-get install default-jre

Oracle JDK 7

This is the latest stable version.

sudo apt-get install oracle-java7-installer

Oracle JDK 8

Get repositories to install Java 8

$ sudo apt-get install python-software-properties
(Deprecated in Ubuntu 18.04)

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update

Now Install Java 8
$ sudo apt-get install oracle-java8-installer

Manage various Java 8 Versions
$ sudo update-alternatives --config java

Oracle JDK 12
$ sudo add-apt-repository ppa:linuxuprising/java
$ sudo apt update
$ sudo apt install oracle-java12-installer

Managing Java (optional)

When there are multiple Java installations on your Droplet, the Java version to use as default can be chosen. To do this, execute the following command:

sudo update-alternatives --config java

It will usually return something like this if you have 2 installations (if you have more, it will of course return more):

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 manual mode

Press enter to keep the current choice[*], or type selection number:

Setting the "JAVA_HOME" environment variable

To set the JAVA_HOME environment variable, which is needed for some programs, first find out the path of your Java installation:

sudo update-alternatives --config java

It returns something like:

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 manual mode

Press enter to keep the current choice[*], or type selection number:

The path of the installation is for each:

/usr/lib/jvm/java-7-oracle

/usr/lib/jvm/java-6-openjdk-amd64

/usr/lib/jvm/java-7-oracle

Copy the path from your preferred installation and then edit the file /etc/environment:

sudo nano /etc/environment

In this file, add the following line (replacing YOUR_PATH by the just copied path):

JAVA_HOME="YOUR_PATH"

That should be enough to set the environment variable. Now reload this file:

source /etc/environment

Test it by executing:

echo $JAVA_HOME

Open here terminal in Ubuntu

Refer: http://askubuntu.com/questions/602234/is-it-possible-to-open-a-terminal-in-the-current-directory

Run sudo apt-get install nautilus-open-terminal in a terminal, followed by nautilus -q to quit all open nautilus windows. When nautilus is next opened, a line saying open in terminal should appear in the right click menu.

Please note that the package nautilus-open-terminal is in the universe repositories.

Installing NPM and NodeJS in Ubuntu

Possible Solution (Not Tested):
http://www.hostingadvice.com/how-to/install-nodejs-ubuntu-14-04/

Updating NPM
Refer: http://stackoverflow.com/questions/23393707/how-to-update-npm

This will update npm using npm itself:

# This is for initial installation
$ sudo npm install npm -g

# This is for upgrade
$ sudo npm update npm -g

From article: If you are stuck, try sudo npm update npm -g. All credit goes to Tim Castelijns. I have tested it on ubuntu 14.04, npm 1.3.10

Note that if you are using nvm for managing multiple versions in your local dev environment for e.g. testing purposes, all your installed versions (listed by nvm ls) are in ~/.nvm, hence you just omit system wide installation (i.e. omit sudo):

$ npm install npm -g

Updated version of NodeJS - Chris Lea
Refer: https://nodesource.com/blog/chris-lea-joins-forces-with-nodesource

Improve Battery Life in Ubuntu

Refer: http://www.makeuseof.com/tag/easily-increase-battery-life-tlp-linux/

Ubuntu
In Ubuntu, you’ll want to do the following:

$ sudo add-apt-repository ppa:linrunner/tlp.
$ sudo apt-get update
$ sudo apt-get install tlp tlp-rdw

If you are on a ThinkPad, you’ll need to install a few more packages for maximum battery life, which you can do with the command sudo apt-get install tp-smapi-dkms acpi-call-tools.

# Start the service, only needs done once, will start automatically on boot-up
$ sudo tlp start

Installing Splunk

Go to Splunk.com, and download the 64-bit version of the Linux *.deb

Install through the software center.

Start with the following command:

$ sudo /opt/splunk/bin/splunk start

In the browser, load the portal here: http://127.0.0.1:8000/