Category: Linux

MySQL Accessible Beyond localhost

This is something that had eluded me in the past so I wanted to write a very quickly documentation on the subject.
(In the past, I always thought the issue was purely firewall related.)

For MySQL running on an Ubuntu 14 server, the change is extremely simple to allow for incoming DB connections.

Continue reading

Increase Upload File Size for Apache Ubuntu 14

This documentation/guide is for how to modify Ubuntu 14’s Apache PHP5 so that a larger file size can be uploaded.
In this example, I modified the file size limit of 2mb to 4mb, as well as increased the max_execution_time so that there’s enough time to actually upload the larger file size to the server.

The process can be achieved several ways.

The easiest method is to modify php.ini.

sudo nano /etc/php5/apache2/php.ini

Modify the following lines:

upload_max_filesize = 4M
post_max_size = 8M #default
max_execution_time = 300

After saving the file, restart apache:

sudo service apache2 restart

Apache and PHP for Raspberry Pi

(Source from: stewright.me)

Step 3 – Install Apache

Here’s where the fun begins. We’re going to start by installing Apache and some other packages. To do this its begin with entering:

sudo bash

This means we’re not having to type sudo each time we run a command. When you’ve done this, enter the following:

apt-get install apache2 apache2-doc apache2-utils

This shouldn’t take long. Once we’ve done that we’re going to install a few support packages including PHP. Once complete, enter the following command:

apt-get install libapache2-mod-php5 php5 php-pear php5-xcache

This too shouldn’t take too long. Follow up with installing the support package for database connectivity:

apt-get install php5-mysql

Now we’re going to install MySQL server. Do this by entering the following command:

apt-get install mysql-server mysql-client

As part of the installation, you’ll be asked to set a root password. Enter a password and then confirm it when prompted in the blue screen.

THEN!

sudo apt-get install libapache2-mod-php5
sudo nano /etc/apache2/apache2.conf

#At the end of the file add: (if it’s not there)

AddType application/x-httpd-php .php

Welcome To Pascal

For reasons related to work, I will soon begin learning Delphi and Pascal.

Lately I’ve been using Ubuntu more often than my Windows 8.1 OS.

As such, I decided to see if I could compile and run my first Pascal code snippet in Ubuntu.

And well… here’s how to do just that!

Continue reading

Erlang Notes on Concurrent Programming

One of the most complicated things I encountered while learning Haskell and Erlang (in particularly, Erlang) had to do with the area server example and understanding it in order to apply it to an homework assignment.

First I watched this video here: https://vimeo.com/37921309

It was extremely helpful in being able to understand the concepts behind setting up a spawned process and referencing it.

Below is the code for the area_server.erl example we (the class) were provided…

Continue reading

Guide: How To Type In Japanese for Ubuntu 14

  1. Install The Japanese Language Input
    1. Open your “System Settings”
    2. From there, select and open “Language Support”
      img1
    3. Click the “Install/Remove Languages…” button found within Language Support.
      img2
    4. Then, select “Japanese”, and ensure the proper checkboxes are checked.
      img3
  2. Next, logout (or reboot, whichever you prefer).
  3. After logging in, open “System Settings” and then open “Text Input” from there.
    img4

    1. A Quick Side-Note: If you’re familiar with the Windows shortcut for switching languages, I would suggest changing it to the Alt+Shift L (left shift) as displayed in the screenshot below.
      As for the shortcut for switching between Hiragana and Katakana, my advice is to simply type in Hiragana, then press the F7 Key.
      This will convert the Hiragana you entered into Katakana easily (for Windows or Linux).Actual Step: The next step however, is to simply click the + symbol to add a new language input.
      img5-2
    2. A list of languages will appear, select the option “Japanese (Anthy)” and click the Add button.
      img6
    3. From there you should be ready to go!

 

How to install Haskell on Ubuntu:

sudo apt-get install haskell-platform