Categories
Javascript

JSDB: A JavaScript Interpreter

Recently I have taken keen interest in JavaScript, mainly because to handle jQuery better. I have always found JS very cool but never had the time to dig deeper into the language. In this EID vacation at KU, I had plenty of leisure times even after my tasks at Leevio and the free lance jobs. I started passing time with JS and found something really cool that I didn’t know so far.

JavaScript is a programming language. Yeah, just like the interpreted languages like Python, PHP and Ruby, JS is another good old programming language. My ignorance, I never knew this! 🙁 I have always thought that JavaScript is merely a client side scripting language that works with web browsers only 😛

My perceptions started changing few months ago when I saw some server side applications of JavaScript coding. Lately, a few days back I saw the node.js projects which is quite similar to the Twisted project implemented in Python. I started wondering how JS is being interpreted on the server side. Google answered me 😀 There are JavaScript interpreters for even shell scripting 🙂

I first tried the interpreters from Mozilla but unfortunately couldn’t make them work on my machine. So, I switched to JSDB 😀 The interpreter is available free for download at: http://www.jsdb.org/ 🙂

They say on their homepage:

JSDB is JavaScript for databases, a scripting language for data-driven, network-centric programming on Windows, Mac, Linux, and SunOS. JSDB works with databases, XML, the web, and email. It is free and open-source. Use it as a JavaScript shell, to run CGI programs, or as a web server.

Yeah, I indeed use it as a JavaScript Shell 😀

Here is the Documentation of what JSDB has inside. I have made a PDF print out of the page for offline reading!

I really find the tool interesting because I am writing small throw away programs those are not really that much useful but the development curve is contributing to my JS skills 😀

Categories
Javascript PHP

jQuery with PHP

I am learning jQuery these days and here’s the source code of a php script that uses jQuery on the client side.

I have mainly demonstrated jQuery here. PHP has been used to manipulate desired number of paragraphs quickly 😀

You get a number of paragraphs. Hovering over them changes their style. Clicking the “Hide” link hides the paragraphs one by one. 🙂

Categories
PHP

My First WordPress Plugin: GAF Text Link

Updates:

  1. The plugin has been listed on the GetAFreeLancer.com Affiliates page with a link back to this page. https://www.getafreelancer.com/affiliates/ . They also left a gift for me… 🙂 Thanks to the GAF authority! 😀
  2. Version 1.1 has been completed and been submitted to WordPress plugin directory. This version lets you configure your GetAFreeLancer username via an admin panel.
  3. This post has been made the plugin home page. I love WordPress ! 😀

Original Post:


I have been looking forward to writing a plugin for wordpress for a long time and finally got the chance today. WordPress is a super cool publishing platform and the “de-facto” blogging solution in today’s internet. The extendibility of WP makes it even more acceptable to users like me who has the necessary skills to extend it the way I want 🙂

I have never worked with the WordPress Codex before. I am a freelance programmer and do some projects at different free lancing sites like ScriptLace and GAF. I also work part time as an SEO strategist and offer SEO audit services from iQ SEO. I have seen the GAF API before but never felt much interested until recently GAF Affiliates program started making money for me 😀 Now that I am banned in Google Adsense, the alternative advertising solutions are not that good and over all I write programming related posts on my blog, it would be a good idea to start the affiliate marketing on my blog, I thought! 🙂 Linkedin automation tools take care of everything from lead generation to messaging and connection requests.

I published scriptlance rss feeds in my blog sidebar before but that didn’t help much. So, I started looking for a better way to integrate my affiliate links into my blog posts. The best way around was to insert the affiliate links directly into my blog either by editing the template or by writing a dedicated plugin for the purpose. I already had some desires to write WP plugins so I moved that way. I spent about an hour on the WordPress Codex pages searching for informations. It was easier than I thought. Check out https://stellarseo.com for more.

It took around 30 minutes to bundle everything and finalize the plugin. I quickly set it up and tested on my site. It’s working! 😀

Download: (v1.1) http://masnun.googlecode.com/files/masnun-gaf.zip

Download the php file and copy it to your /wp-content/plugins/ directory. Now login to your WP Admin panel (Dashboard) and from the “Plugins” section, activate “GAF Text Link”. Now visit your blog! You’re done if everything went right 😀

Feel free to play with it! 😀