Change Date and Time in Linux Mint LXDE 12

Posted by & filed under Linux.

So I decided to try and install Linux Mint LXDE 12 to my eeePC 1005ha. The installation took a few minutes and very fast and everything is working great, I don’t have to install codecs manually either as it is included by default in Linux Mint LXDE 12.

But then when I wanted to change the date and time, I cannot find any option from either the “Preferences” or “System Tools” menu at all to change the date and time. I think they forgot to include this option by default.

Anyway, after I tried to post and ask about the matter at Linux Mint forum where after a few hours no one replied at all (maybe I should wait for a little longer for someone to reply, but.. Riceball gah.. I just can’ wait), so I decided to try and figure out the problem myself.

So, I figured out two ways to change the date and time, by using command line or installing the missing date and time configuration GUI in Linux Mint LXDE 12.

The Command Line way

Changing the date and time using the command line is not that difficult either, you can use the “date” command to change date and time. So, open up the terminal of your choice. I’m using lxterminal in this case since it is the default terminal in Linux Mint LXDE version and type in the following command to get the current date and time:

date

Yes, as simple as that! and the current date and time will be displayed in the terminal as shown in the screenshot below:

Linux - "date" command

So, to set a new date and time, we are going to use the same format as above but this time change the date and time to any date and time that you wanted, just keep the formatting intact, and oh, don’t forget to use the “sudo” command this time. For example, I’m going to change the date time to ‘April 5, 2012 21:00′:

sudo date -s "April 5 21:00:00 2012"

Notice that you can safely leave the day and timezone (WIT) when setting for a new date and time using the above method, if you did not specify the timezone, it will use the same timezone as the previous date and time.

And oh, you can also set the date by using the “date” command by using another method using the following sequence: month, day, hour, minute, and followed by year. Take note that everything should be in numeric (digits). For example, to set the date and time to ‘April 5, 2012 21:00′ using this method, I would type in the following into the terminal:

sudo date 040521002012

Either method that you use, your system date and time should be set to the new one now.

Installing the Missing Date and Time Configuration in Linux Mint LXDE 12

If you’re not fond of dealing with command line, you can simply install the missing date and time configuration GUI instead. To do this, open up the ‘Software Manager’ and search for the following package and install it:

gnome-time-admin

If you notice it’s actually part of gnome control, but don’t worry, I have tried to install it and it doesn’t install any dependencies at all and it works great. So, just install it from the ‘Software Manager’. The installation should take less than a minute.

Alternatively you can also install the package from the command line:

sudo apt-get install gnome-time-admin

After you’ve finished installing the package, a new ‘Time and Date’ menu will be available under the ‘System Tools’ menu.

Time and Date Settings under System Tools Menu

Open it and click on the lock icon to make changes/change your system date and time (the system will ask for your password). You may need to relog for the date and time panel applet to update itself.

Time and Date Settings Window

Frankly, I prefer this method than the command line method Riceball.

WordPress, Markdown, and Syntax Highlighting

Posted by & filed under Article.

Markdown is a pretty neat alternatives if you are bored with the default WYSIWYG editor that wordpress has to offer, off course you could always use another 3rd-party WYSIWYG editor available for wordpress such as TinyMCE. But if you want something simple and neat, try markdown instead.

What is markdown?

Markdown is a text-to-html conversion tool, the idea of this is to write in plain text format without the need of special tagging or formatting. That’s right, in PLAIN TEXT format! For instance, in html if the writer want a text to be bold they need to enclose the text in <b></b> html tag, whereas using markdown, writer could simply write the text in plain text formatting encolsed with ** without worrying to convert them to valid XHTML or HTML as this will be converted automatically by markdown tool.

But you may wonder, what’s the different then if you still need to enclose the texts with special symbols to make them appear in special formatting as in bold or italic? Well for comparison, consider these two short article written in html and markdown:

HTML Tag:

<h1>Heading 1</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut sit amet enim justo, sed tempus sapien. Maecenas scelerisque ante at turpis varius eget vehicula orci placerat. Sed faucibus eleifend lorem, eget elementum nisi blandit ac. In eget sem sit amet massa aliquet facilisis. Suspendisse molestie, tortor ut fringilla rutrum, risus dui dapibus diam, sit amet eleifend felis purus vel turpis. Proin lacus mi, pretium eget volutpat vel, euismod et turpis. Aenean scelerisque varius pellentesque. Donec eleifend, dui in vulputate imperdiet, urna nisl condimentum erat, quis consectetur urna magna sed quam. Donec accumsan justo at libero faucibus volutpat.</P

<h2>Heading 2</h2>
<p>Duis sit amet gravida ante. Aenean sed eros neque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent cursus mi eu sem sollicitudin in ullamcorper lectus ullamcorper. Nam convallis nisi eu neque tincidunt ut tincidunt velit pharetra. Nam id dolor vitae ante auctor dignissim eu eu neque. Fusce condimentum fringilla nibh, et suscipit lorem porttitor in. Pellentesque nulla libero, auctor ut cursus vitae, tincidunt feugiat magna. Etiam sit amet consequat tellus. Curabitur rhoncus convallis nunc, viverra auctor mauris tristique a. Phasellus ornare massa eget sem vehicula eget accumsan quam congue. Integer ipsum lacus, aliquet a feugiat sed, condimentum ac lorem. Sed in velit sed leo faucibus sollicitudin.</p>

<img src="http://someimage.jpg" alt="image">

Markdown:

# Heading 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut sit amet enim justo, sed tempus sapien. Maecenas scelerisque ante at turpis varius eget vehicula orci placerat. Sed faucibus eleifend lorem, eget elementum nisi blandit ac. In eget sem sit amet massa aliquet facilisis. Suspendisse molestie, tortor ut fringilla rutrum, risus dui dapibus diam, sit amet eleifend felis purus vel turpis. Proin lacus mi, pretium eget volutpat vel, euismod et turpis. Aenean scelerisque varius pellentesque. Donec eleifend, dui in vulputate imperdiet, urna nisl condimentum erat, quis consectetur urna magna sed quam. Donec accumsan justo at libero faucibus volutpat.

## Heading 2
Duis sit amet gravida ante. Aenean sed eros neque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent cursus mi eu sem sollicitudin in ullamcorper lectus ullamcorper. Nam convallis nisi eu neque tincidunt ut tincidunt velit pharetra. Nam id dolor vitae ante auctor dignissim eu eu neque. Fusce condimentum fringilla nibh, et suscipit lorem porttitor in. Pellentesque nulla libero, auctor ut cursus vitae, tincidunt feugiat magna. Etiam sit amet consequat tellus. Curabitur rhoncus convallis nunc, viverra auctor mauris tristique a. Phasellus ornare massa eget sem vehicula eget accumsan quam congue. Integer ipsum lacus, aliquet a feugiat sed, condimentum ac lorem. Sed in velit sed leo faucibus sollicitudin.

![image](http://someimage.jpg)

From the comparison above, which do you thing is more neat and clean? HTML or Markdown? I’ll leave that for you to decide.

For more information about markdown, you can go to the project’s site here. More information about Markdown syntax can be found here.

Getting Markdown to work with WordPress

Now that you know what Markdown is, let’s integrate it with WordPress. There are three main components that is crucial to get Markdown working with WordPress:
- PHP Markdown (Main component, WordPress Plugin)
- WP-Syntax (WordPress Plugin)
- Markdown Geshi (WordPress Plugin)

1. Installing PHP Markdown

The first and main component to get Markdown working woth WordPress is PHP Markdown, written by John Gruber. PHP Markdown is available in two version, Regular version and Extra version. The difference between the two is that the extra version contains additional features that are not available in the plain Markdown Syntax, such as creation of tables, adding footnotes, and definition lists using Markdown. For WordPress, we will be using the Extra version. Grab PHP Markdown Extra from this link:

http://michelf.com/projects/php-markdown/

After you’ve finished downloading the archive/.zip file, extract only markdown.php to wordpress plugins root directory:

wp-content/plugins/

PHP Markdown extra support additional Markdown syntax that is not available in the original Markdown. Read more about it here: http://michelf.com/projects/php-markdown/extra/

2. Installing WP-Syntax

The next component is WP-Syntax, a WordPress plugin that provides syntax highlighting for wide range of languages using GeSHi1. Grab WP-Syntax plugin from it’s wordpress plugin page:

http://wordpress.org/extend/plugins/wp-syntax/

Again, extract the contents of the archive to your WordPress plugins directory:

wp-content/plugins

3. Installing Markdown Geshi

The third and last component required is Markdown Geshi, a plugin created by Gerard van Helden. This plugin will integrate GeSHi module used by WP-Syntax plugin to Markdown plugin, hence you will be able to highlight code syntax using Markdown. Grab Markdown Geshi from its github page:

https://github.com/drm/Markdown_Geshi

Download markdown-geshi.php from the link above and save it to wordpress plugin folder:

wp-content/plugins/

4. Wrapping it up

All three components/plugins should be in your WordPress plugin directory at this point. You WordPress plugin directory should somewhat looks like this:

+ wordpress  
    + wp-content
        + plugins  
            + wp-syntax             (wp-syntax plugin folder)
            + markdown.php          (component for PHP Markdown)
            + markdown-geshi.php    (component for Markdown Geshi)  

Activate all three plugins from WordPress Dashboard, under Plugins page. You need to activate the following plugins:
- Markdown Extra
- Markdown Geshi
- WP-Syntax

The next step is to disable visual editor to allow the use of Markdown for writing posts. To do this, go to Your Profile page from WordPress Dashboard and tick the Disable the visual editor when editing box and update your profile. The default WYSIWYG editor in post or page editing should now be replaced with simple editor. But don’t worry, you can use Markdown syntax to create and edit your post now.

5. Syntax Highlighting

Now that you’re able to use Markdown to edit and create post in WordPress, using GeSHi to highlight languages syntax is as easy! Remember that earlier we had setup all the required components to get syntax highlighting working in Markdown by using GeSHi module from WP-Syntax plugin. Hence, all you need to do is to place #!language@linenumber tag to your code block. Consider the following example:

<html>
    <head>
        <title>Markdown Geshi</title>
    </head>
 
    <body>
        <h1>Heading 1</h1>
        <p>This is paragraph</p>
        <ul>Unordered List
            <li>First Item</li>
            <li>Second Item</li>
            <li>Third Item</li>
        </ul>
    </body>
</html>

By adding #!html4strict@1 tag to the code block above, the html code will be highlighted using GeSHi, but the shebang tag itself will not be shown when converted to XHTML/HTML. Let’s take a closer look at the shebang tag above:

#!html4strict@1

The text html4strict in the shebang above is the language type used for highlighting. Hence, if you want to display PHP code, you would replace html4strict with php. Next, the number 1 in the shebang above determine the starting line number in the code block, hence if you want your starting line number to start from ten, you would replace number 1 with 10. As simple as that!

So now that you know how to use the shebang tag to highlight language code, what are the languages supported by GeSHi? There are a lot actually, here are the list of the supported languages2:

abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autoit, avisynth, bash, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cil, cfdg, cfm, cmake, cobol, cpp-qt, cpp, csharp, css, d, dcs, delphi, diff, div, dos, dot, eiffel, email, erlang, fo, fortran, freebasic, genero, gettext, glsl, gml, bnuplot, groovy, haskell, hq9plus, html4strict, idl, ini, inno, intercal, io, java, java5, javascript, kixtart, klonec, klonecpp, latex, lisp, locobasic, lolcode lotusformulas, lotusscript, lscript, lsl2, lua, m68k, make, matlab, mirc, modula3, mpasm, mxml, mysql, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle11, oracle8, pascal, per, pic16, pixelbender, perl, php-brief, php, plsql, povray, powershell, progress, prolog, properties, providex, python, qbasic, rails, rebol, reg, robots, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, tcl, teraterm, text, thinbasic, tsql, typoscript, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xml, xorg_conf, xpp, z80

6. Further Customization

By default, PHP Markdown will apply to both your wordpress posts and comments. To apply PHP Markdown only for posts, edit the markdown.php file and look for MARKDOWN_WP_COMMENTS and set the value to false. Similarly, if you want to apply PHP Markdown only for comments, look for MARKDOWN_WP_POSTS and set the value to false.

P.S: This post is created using Markdown :D


  1. More information about GeSHi can be found here: http://qbnz.com/highlighter/ 

  2. List of supported languages taken from WP-Syntax Plugin page: wordpress.org/extend/plugins/wp-syntax/other_notes#Supported-Languages 

Save Pinned Tab on Exit – Opera Browser

Posted by & filed under Opera, Web Browser.

Save Pinned Tab on Exit - Opera

By default if you pin tabs in Opera, those tabs will only be pinned for that session, meaning that if you exit or close your Opera Browser, the tabs that you’ve pinned will not be saved. Thus the next time you run your Opera Browser you’ll need to re-pin those tabs again which is really inconvenience Riceball.

Read more on “Save Pinned Tab on Exit – Opera Browser” »

Create your own Windows 7 USB Installation Disk

Posted by & filed under Windows.

Windows 7 USB Installation Disk

If you’re using netbook and want to install Windows 7 into it, you’ll most likely need to use a USB Installation Disk since Netbook doesn’t has a CD/DVD Drive (unless off course you have an external CD/DVD Drive). This guide will guide you on creating your own Windows 7 Installation USB. Read more on “Create your own Windows 7 USB Installation Disk” »

Facebook Chat in Adium

Posted by & filed under Mac OS.

Facebook Chat - Adium

If this is the first time you connect to facebook chat through XMPP, please read the note at the end of the Post

Adium is one of the best Instant Messaging Client out there for Mac, it can be easily customized or themed, and it supports multiple Accounts and Instant Messaging Protocol. But for some reason, Facebook Chat doesn’t seem to work in Adium (with latest stable release 1.4.1), I can add my Facebook Account but it kept asking for authorization thus I can’t connect to Facebook chat. Read more on “Facebook Chat in Adium” »

Create a Unified Inbox Folder in Evolution

Posted by & filed under Ubuntu.

Unified Inbox Folder in Evoluton Mail

Evolution Mail doesn’t have a feature to show all your mail account inbox in one inbox folder (or what is known as a Unified Inbox Folder), thus you need go to your mail account respective inbox folder to be able to read new mail messages Riceball, unlike Mac OS Maill app (and Thunderbird) which group all your inbox folder in one folder making it easy to read new mail. Read more on “Create a Unified Inbox Folder in Evolution” »

Watch YouTube Videos in Full Browser Window

Posted by & filed under Internet, Web Browser.

This simple trick will enable you to watch YouTube Videos in Full Browser Window Halo.png (it’s not Fullscreen), good for those who want to watch videos without getting distracted with other unnecessary items such as the Comments, Suggestions, Infos, etc but still be able to monitor other things in your desktop, such as IM, or maybe other browser tab. Read more on “Watch YouTube Videos in Full Browser Window” »

Keep Track of your Cliboard History in Ubuntu using Glipper

Posted by & filed under Ubuntu.

Glipper Residing at the indicator-applet located at the bottom right corner of the screen as a simple ‘G’ Icon

Install this tiny application in your Ubuntu to keep track of your Clipboard history  Wink.png , this tiny application will reside at your indicator-applet, it’s very easy and simple to use. It also support plugins to boost up the application features itself ohnoes.png ! To Install this application in Ubuntu, open the Terminal and type in the following commands: Read more on “Keep Track of your Cliboard History in Ubuntu using Glipper” »

Updating to Snow Leopard 10.6.6 in eeePC 1005HA

Posted by & filed under Hackintosh, Mac OS.

Snow Leopard 10.6.6

There’s an official Twitter application available for mac which you can get for free, but sadly you can only get it from Mac App store, which is available in Snow Leopard 10.6.6 or later. So, last night I decided to update my Snow Leopard from 10.6.5 to 10.6.6. The updating process is rather easy and doesn’t require much effort, I just need to make a backup of 10.6.5 mach_kernel and a few kexts, just as what I did when updating from 10.6.3 to 10.6.5 (written in this guide). Want to know how? Here’s how you do it:

  1. First make a backup of the following kexts. Copy it to desktop or anywhere you want to. In case you forgot, the kexts are located in ‘/System/Library/Extensions’:

    • AppleIntelGMA950.kext
    • AppleIntelIntegratedFrameBuffer.kext
    • IO80211Family.kext
  2. Next, you need to make a backup of your current mach_kernel (10.6.5) or you can use the mach_kernel from the Snow Leopard 1005HA Installation Kit which I posted in the previous guide, or you can get it here (10.6.5 mach_kernel only).

    • Read this if you decided to make a backup of your current mach_kernel (assuming that you’ve updated to Snow Leopard 10.6.5 by following this guide before). For a safer way, I suggest you use the mach_kernel from the Snow Leopard 1005HA Installation kit or download the 10.6.5 mach_kernel from the link above. – Open the Terminal (Applications > Utilities > Terminal) and type in the following commands:

      sudo -s cd / cp mach_kernel ~/Desktop

    • Read this if you decided to use the mach_kernel from Snow Leopard Installation Kit or if you downloaded the 10.6.5 mach_kernel.

      • Open the archives and extract mach_kernel_atom to Desktop (located in /Mach_kernel/10.6.5/)
      • Go to Desktop and rename ‘mach_kernel_atom’ to ‘mach_kernel’
  3. Download Snow Leopard 10.6.6 Combo Update from here. After you’ve finished downloading the combo update, run it and install. Wait for the installation process to finish. After the installation process has finished, DO NOT restart your computer (you’ll be prompted to restart your computer, ignore this message and minimize the window).

  4. Open the Terminal (Applications > Utilities > Terminal) and type in the following commands:

    sudo -s cd / mv mach_kernel mach_kernel_old cp ~/Desktop/mach_kernel / chown 0:0 mach_kernel

  5. Close the Terminal and open the installer window that you minimize erlier and click the ‘Restart’ button.

  6. If everything goes well, you should be back to your Mac Desktop. But we’re not done yet, copy all the kexts that you back up earlier back into ‘System/Library/Extensions/’.

  7. Then the last thing that we need to do is to run ‘pfix’. To do this, open the Terminal and type in ‘pfix’. Wait for the process to complete and restart your computer.

That’s it! Now you have Snow Leopard 10.6.6 in your eeePC 1005HA and off course, Mac App store!