Archive for September, 2013

Create and start VirtualBox VM from command-line

September 28, 2013 Leave a comment

Categories: ubuntu Tags:

Securing an Ubuntu server

September 26, 2013 Leave a comment

Some tips on installing/securing an Ubuntu server:

Categories: ubuntu Tags:


September 26, 2013 Leave a comment

Some notes about ssh

Install the sshd server:

sudo apt-get install openssh-server

Server start/stop/status/restart:

sudo service ssh {start|stop|status|restart}

Server config file:

/etc/ssh/sshd_config    # make a backup first

Here you can change the port (which is a good idea), disable PermitRootLogin, etc. You can also add these two lines to the end:

UseDNS no

Where USERNAME is the username of the user who can log in. Only (s)he can log in, nobody else.

Log in to a non-standard port:

ssh username@host -p PORT
Categories: ubuntu Tags:

HTML: add syntax-highlight to textarea

September 26, 2013 1 comment

You have an HTML form with a textarea where you want to accept some source code. You want to turn this simple textarea into a fancy input area that adds syntax highlighting.

I tried EditArea, and it suits my needs. See this SO page for more alternatives.


EditArea is a free javascript editor for source code. This editor is designed to edit souce code files in a textarea. The main goal is to allow text formatting, search and replace and real-time syntax highlight (for not too heavy text).” (source)

For Python support, I had to add these lines to the HTML source:

<script language="javascript" type="text/javascript" src="../editarea/edit_area/edit_area_full.js"></script>
<script language="javascript" type="text/javascript">
    id : "src_input"       // textarea id
    ,syntax: "css"          // syntax to be uses for highgliting
    ,start_highlight: true      // to display with highlight mode on start-up
    ,syntax: "python"
    ,replace_tab_by_spaces: 4

Related work

  • Ace (it seems a more professional solution)

Ubuntu: disable Alt to launch HUD

September 26, 2013 Leave a comment

In Ubuntu (with Unity), Alt launches the HUD. Fine. However, if you have a Windows in VirtualBox and you want to switch windows in the guest VM with Alt+TAB, that damn HUD always appears in the host. How to disable it?

I found the solution here.

In short: top right corner, System settings… -> Keyboard -> Shortcuts tab -> Launchers. Assign a new key to “Key to show the HUD“, or disable it completely by pressing the Backspace.

Categories: ubuntu, windows Tags: , , , ,

mkdir && cd

September 24, 2013 Leave a comment

Has it ever happened to you?

$ mkdir something
$ cd something

Damn, that’s 2 commands. How to simplify it?


$ pwd
$ mdgo something    # mdgo stands for: mkdir-go
$ pwd

That is, the command “mdgo” creates a directory and enters in it. An alternative name could be “mdcd“.

If you want this alias, add the following lines to your ~/.bashrc:

if [[ -z "$1" ]]
    echo "Usage: mdgo <dir>"
    mkdir $1; cd $1
alias mdgo=mkdir_go
Categories: bash Tags: , [hu]

September 24, 2013 Leave a comment

This post is written in Hungarian.

A azzal a céllal jött létre, hogy a gyerkőcök olyan meséket is láthassanak a weben, amiket a tv nem közvetít. Főleg a régebbi, klasszikus meséket helyezzük középpontba. Véleményünk szerint amíg a gyerekek ezen az oldalon nézik a jobbnál-jobb meséket, nem fognak a televízió előtt ülni és esetleg a nem nekik való műsorba futni.

Igyekszünk folyamatosan bővíteni a kínálatot!
Jelenleg 55 mesekategória és 1500+ meserész található oldalunkon!
” (source)


Categories: fun Tags: , ,