Karthikeyan A K
Hi, I am Karthikeyan, a tech freak from Chennai, India. I am a free software advocate.
Posted in Ruby on November 11, 2013
Saw this code posted by my friend. Thought it was worthy to tell many
I am very much fond of rvm http://rvm.io/ . All the apps I have deployed runs on it. RVM needs funding so that it can be developed further. I want to hasten the process of funding.
I have written a ruby programming book named ‘I Love Ruby’ thats totally free, you can get it here http://goo.gl/FW6slH (this book will be released on jan 2014 or earlier)
If you donate $2000 to RVM I will grant full page advertisement, half page for $1000 and quarter page ad for $500. If you have donated these amounts you can contact me on mindaslab at gmail dot com so that I can put your ad in it.
The advertisement will stay till Jan 31 2014. It must be designed by you.
Please donate to RVM by going to https://www.bountysource.com/fundraisers/489-rvm-2-0
Well, I am a web developer for some long long time and web has changed a lot. A good change is Microsoft is almost out of web. No servers that are known to me run Windows and Internet explorer is dead for good (except few bloody large corporations). This blog is not about that it about another stuff.
Long before the term called “smart phones” was coined, we developers designed pages that can be seen even in mobile devices. This thing is now called responsive design and is promoted as a big thing. I really don’t understand what the fuss is about. When it was difficult to do, none promoted it, when it becomes easy, people give it a name and if they can do the most difficult stuff they project themselves as a big thing.
And there is another thing now called the cloud. Which essentially is cheating. Since we have a computer that have tetrabytes of memory, but memory on our handhelds is only gigabytes, but we are now in a age where tons of data can be streamed to us and we need real time stuff (thats the socio illusionary status society has created). If we have one data or update in one device we need that to be updated in another device too, this called for centralized server to sync things, and thats its. With virtualization we can have banks of computers say in USA, Europe, Australia and configure it in such a way that even if one fails other will take over. This thing too has been done for a long time. Now they call it the Cloud.
What the &^#!@$$#@$#
Mozilla is one company that really respects the freedom of internet users. While its browser rival Google Chrome ttys to track users and recommend advertisements and search results that suits them, Mozilla’s firefox tries to respect ones privacy if one wishes to be so.
For long we have this single sin on, that is each website needs to authenticate user, and it has to make user under go painful task of creating an login account. This process is eased by stuff like openId, Google, Facebook and Twitter’s sine sign on process. But Google and Facebook track a lot of ones behavior since their business is based on advertisement revenues, which depend on these websites knowing what exactly the user wants, and hence tracking is inevitable and your privacy i compromised.
Mozilla is a non profit company that runs on ones donations and it has put up a single sign on framework called persona https://developer.mozilla.org/en-US/docs/Mozilla/Persona . Persona does not track a person, compromise ones security and possibly won’t collaborate with NSA.
So try using it in your website. Any gem for it anyone? It would be nice to to have a compact gem to us it in ones web applications. hopefully it catches up and leads.
Okay, you might encounter a need to put very simple search for active record / model in your Rails app and here is it. Put this code in your active record model:
Note this line
columns = [:name, :address, :city, :pin, :ph]
in the code snippet, give your own column names in that array. This array can contain columns that are string and text type. Lets say you have put these stuff in a class called Person , to search it you need to issue a command like this
Person.search "Karthik chennai"
This stuff works well with Sqlite, Postgre and MySQL. If you have tried this out with other DB, please add it in comments. Bye.