Skip to main content

Posting Source Codes

I have a draft post to the part 2 of my previous post about creating a chatbot, it seems like it has been stuck in draft for quite some time since I was looking for a solution on how to post source code here in Blogger. After trying out some stuff and having failed attempts, I went out for a while and shelved the whole thing.

<? PHP
echo ("Hello World!");
?>

Credit goes out to http://eli.thegreenplace.net/2006/03/20/posting-source-code-to-blogger/ which apparently, I've failed to see previously.

After trying it out, I've seen a  more proper and elegant solution. By enabling the "Show HTML literally" and adding a <pre> </pre> tag on the HTML source of the post one could obtain the formatting above. Hopefully I could finalize my previous post about setting up a chatbot.




Comments

  1. I want to thank you for writing this article.This is great Article for me. It also more very informative & awesome. I expect more articles from you in future.
    Awesome information. Great Contribution to blog. I
    expect more articles from you in future. Keep it up!
    XMPP

    ReplyDelete

Post a Comment

Popular posts from this blog

Self Signed SSL Certificates

Ever wondered how to enable SSL or HTTPS on your site? If you dont want to pay for commercial SSL certificates, you could create self signed certificates for your site by following the instructions here: https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04 The instructions in the site above will make your default site HTTPS enabled. If you prefer having a commercial SSL, save your certificate files and key files in your server and edit the location on the /etc/apache2/sites-enabled/default to point to the directory where you stored those files.

Moving to a New Linux Web Based Torrent Client

For years, I have been using TorrentFlux (url here) as my primary torrent client situated in my Ubuntu download server. But as time went on, the developers completely abandoned the development of TorrentFlux which led to several forks which I think is still insufficient for my needs. Main GUI of TorrentFlux Ive checked several options which runs on a GUI-less environment. Since my Ubuntu server is just running on command line to save precious memory, I needed something bare, simple and is packed with features. Installing uTorrent Server is pretty straight forward. Download. Uncompress. Run. This is better than the approach of TorrentFlux which you need to setup LAMP server and create a database. More often than not, it happens to me that some of the data in the DB gets corrupted. I normally just reinstall the whole thing again. Main GUI of uTorrent Server To further elaborate on the setup process, I've gotten an excerpt from this thread which, quite simply discusses ho

iPhone 4 Carrier Unlock Finally Here

The wonderful people of iPhone-dev Team (or I think they're called just DevTeam now) has realeased their iPhone 4 carrier unlock. What this means is you can unlock the iPhone 4 s you've purchased from any locked countries like the U.S.(with baseband 1.59 ).  iPhone 3G and 3Gs also benefits from this release which unlocks phones with basebands 04.26.08 , 05.11.07 , 05.12.01 and 05.13.04 As an excerpt from their blog post : Version 1.0-1 of ultrasn0w works for: iPhone4 baseband 01.59 3G/3GS basebands 04.26.08, 05.11.07, 05.12.01 and 05.13.04 (If ultrasn0w doesn’t show when you search Cydia, add the repo:  repo666.ultrasn0w.com) Quickest solution to unlock your phones is to visit www.jailbreakme.com which uses an exploit to jailbreak your device, and once you get the Cydia app, download (or add the repository if you havent) ultrasn0w. Restart and enjoy carrier freedom. Perhaps another implication of this with the iPhone 4 market now is that those people selling iPhone 4