RubyDubee

  • Archive
  • RSS

Start to End : Twitter client in Shoes

Prerequisites :

  1. I hope you have Shoes installed on your machine, operating system does not matter :)
  2. oauth gem (gem install oauth will do the trick or sudo if you have to!)
  3. json gem as well(to parse the response) (gem install json)

Let’s start :
Step 1 : Register your application at Twitter (HERE), give some cool name like “Rubydubee”(not this x-( ).

Step 2 : Lets first write our own library(ehh? don’t worry you can just copy the code here :) ), But you can try to understand that… very small & simple if you know the OAuth protocol.(the oauth gem does all the magic.)

Step 3 : Let’s write our Application


The code is intuitive! isn’t it? if you need any help plz comment!
After you run this “shoes main.rb” it will look somewhat like this :

Thanks for reading this post!
Next post will bring following points :

  1. Error handling
  2. Sophisticated architectural design and UI
  3. More features

Keep reading!!! :)

    • #Shoes
    • #Twitter
    • #Json
    • #Oauth
    • #Ruby
  • 1 year ago
  • 10
  • Comments
  • Permalink
  • Share
    Tweet

Just another problem with Chrome

Writing this post cuz i thought it would be useful for some web UI designers out there who deal with percent level details e.g Statistic Apps, graphs, Maps…

Chrome has one serious problem with calculating number of pixels in one percent. I was designing some UI in which i needed to divide some area in 50 parts, so i used 2% width for each part. now consider following scenario :

If the total width of the area is 625px, 4% = 25px, so if you are using 1%=6px then in every 4 percent you should add 1px, Now firefox will do exactly the same. But this is not the case with Chrome, Chrome will allocate 13px to first 25 parts, and 12px to remaining 25 parts which is weird. Now if you are designing some statistics app which uses percent scale, then you are completely screwed up.

Beware, Bye.

    • #html
  • 1 year ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

Standard KT session

  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Ruby GUI - Web to Desktop

Hello! to all those good looking(:p) unhealthy smart creatures out there, A very very good morning(its 2:35 AM here :D ).
You might have made some guesses about this post from the title, and if you are excited to read the whole post then let me tell you that you are the right kind of person to do this. Please go on —-

There are thousands of web developer who are master at designing a web gui. but when it comes to designing the similar kind of gui for desktop application, it becomes very very tough for them to get the same look and feel.Hence for those i propose a very very simple way to port the web gui to desktop application.

I have started a project (webtodesktop) which will convert an HTML file into a desktop application along with the same styling.

See the demo … Check README.

Will soon be writing more HowTos on that…Cya!!!

    • #html
    • #Shoes
    • #Ruby
  • 1 year ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

Minesweeper board generator.

Have you ever played Minesweeper? This cute little game comes with a certain operating system whose name we can’t remember. The goal of the game is to find where all the mines are located within a M × N field.

The game shows a number in a square which tells you how many mines there are adjacent to that square. Each square has at most eight adjacent squares. The 4 × 4 field on the left contains two mines, each represented by a “*” character. If we represent the same field by the hint numbers described above, we end up with the field on the right:


* . . . * 1 0 0
. . . . 2 2 1 0
. * . . 1 * 1 0
. . . . 1 1 1 0


Solved this Problem check it out here.All you have to do is checkout the Minesweeper folder and ruby the main.rb file.

See ya!!

    • #algorithm
    • #game
    • #Ruby
  • 2 years ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

Started a new SVN repository

Hello all,
I have started writing some crappy Ruby code in my new SVN repository. If you don’t know what is SVN, you are just impossible 8-) let me help you (->) .
This repository is called “Ganimi”. The name has nothing to do with anything(Just random historical marathi word). It is hosted on Google project hosting( click here if you don’t know about this too).
To start with something, I have written one new number system(NS) converter, this class will help you to convert a number in decimal(base-10) NS to any other base-n NS. So you can convert a decimal to binary / Hexadecimal / Octal /… number.
You can checkout my BaseConverter class here and then try this


Savvy?
But there is more :

Ruby has a very easy way(Rubyish) of doing this. Check this out :


Happy coding.
Will see you again.

    • #svn
  • 2 years ago
  • 6
  • Comments
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 2 of 4

About

I am Pradyumna and You can read my Rubyish Resume (once it is done) to know more about me!

Pages

  • My Rubyish Resume

Twitter

loading tweets…

I Dig These Posts

See more →
  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr