Convert MP4 to MP3 on Ubuntu 14.04 Trusty and Tag Meta Data Software

There is a program available on Ubuntu youtube-dl, that can download videos from youtube.com or other video platforms. But it stores the file in mp4, since it contains video. But sometimes you do not want the video and only the audio. To extract only the audio part, you can use the pacpl comamnd line tool.

Use "Sound Converter" Application for simple conversion

Usage:

$ youtube-dl -f mp4 --output "yourfilename.%(ext)s" https://youtu.be/your-link-here
$ youtube-dl --extract-audio --audio-format mp3 --audio-quality 256 --output "yourfilename.%(ext)s" https://youtu.be/your-link-here

Older Method:

pacpl --to mp3 -v -r -bitrate 256 targetfile.mp4

Ubuntu Software: EasyTAG to modify MP3 MetaData

Update MP3 tags with the command line:

$ sudo apt-get install id3v2

Some useful commands

List all of the tags or specific for a particular file without wild card
$ id3v2 -l *.mp3

Example of how to update title, album, year
$ id3v2 -t "My Title" file-to-update.mp3
$ id3v2 -a "My Album"
$ id3v2 -y 2016

Install SQL Developer in Ubuntu 14 in VirtualBox

When launching the SQL Developer bash script it asked for the Java location, could not find it.

If you’ve installed Java 7, and you launch SQL Developer, use this as the path, or the equivalent:
/usr/lib/jvm/java-7-oracle

You can set your java_home but this does not help the above:
sudo nano /etc/environment
JAVA_HOME=/usr/lib/jvm/java-7-oracle

SQL Developer that works with Java 7:
http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-downloads-403-2529784.html
sqldeveloper-4.0.3.16.84-no-jre.zip

Bonus:

Use Filter: WEB% for HAL

Flush DNS Without Rebooting

Mac El Capitan 10.11.1
$ sudo killall –HUP mDNSResponder;say flushed

Mac Yosemite 10.10.4+
$ sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed

Mac Yosemite 10.10.3-
$ sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed

Ubuntu:
Note: Ubuntu doesn't cache DNS by default unless you install a DNS cache service manually.
$ sudo /etc/init.d/dns-clean restart

Windows:
Right-click Command Prompt and select Run as Administrator.
Run the following command: ipconfig /flushdns

Important:
Don't forget to change your host file's IP to 10.57.225.54 for halprdgit01.hq.halw.com if you use a Mac or Linux machine and hard-coded the IP into the host file.

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