feel the chi

Neat stuff about programming and technology

Take my quick survey (just 4 questions)

Hi

I created this really quick survey and was wondering if anyone reading this might take the time to do it. It's just 4 questions and non-intrusive. 

http://www.surveymonkey.com/s/MZVKKYX

Thanks! 

- The Net Duck

Posted June 16, 2010
// 0 Comments

Mysql , Mac and Gems

Very good tutorial, up to date
http://otype.de/index.php?id=201

Posted May 21, 2010
// 0 Comments

Installing mysql5 on a mac with MacPorts

Many of you (like me) have been looking through the different blogs trying to set up mysql with macports with this command

sudo port install mysql5 +server 

The problem is, that command is no longer used anymore. Read this post http://stackoverflow.com/questions/1081231/macports-doesnt-install-org-macports-mysql5-plist-with-mysql5-server

It's changed to sudo port install mysql5-server

I hope this helps someone. I know it helped me. Also, they apparently have updated things like automatic symbolic links and stuff 

- The Net Duck

Posted May 21, 2010
// 0 Comments

Reload your ruby script/console on the fly!

yup, you can do it. just type in ..... "reload!" and your done. (no quotes)

- The Net Duck

Posted May 17, 2010
// 0 Comments

Very Cool for Rails Docs

http://github.com/voloko/sdoc/

Posted April 20, 2010
// 0 Comments

Rubyonrails.org is down! What do we do?!

Ladies and gentlemen boys and girls, it has happened. Rubyonrails.org is down. Yes, it is now replaced by that college girl ad we all know so well ...

So it looks like someone forgot to pay their bill on time. One again the ad gods strike! I want my api! I want my rails tutorials back! I want.... rubyonrails.org restored to it's true owner, some nerd living in his basement (or maybe a nice house). For me, the sense of security that surrounds knowing rails "got my back".... is slowly being dissolved into... well something else.
So where did it go? When will it come back? We may never know.. just like Why, the luck still, vanished without a goodbye.
- The Net Duck

Posted April 20, 2010
// 0 Comments

Your physical body effects your emotions!

This is an absolutely amazing discovery. I can hardly believe how simple this concept is but at yet how effective it is. Not just for motivation, but for any type of emotion you desire in your life! Try this, (if you want). Smile, yes, force yourself to smile then stand up tall, fill out your body and then try to think about something that normally gets you depressed. It's really had isn't it? This is because your body makes mental associations to being happy, sad, depressed, motivated. For instance, if you practice walking with confidence you are going to feel more confident! Amazing isn't it? It seems so simple but yet this one tool has so many powerful uses.
For instance, maybe your feeling blue. Go somewhere private and just smile and move your body quickly. This will really get you feeling less down. Also, when you walk, don't look down, look higher, you will be surprised at how much better this makes you feel. You can do this for about anything.
Fantastic.
- The Net Duck

Posted April 19, 2010
// 1 Comment

I found this great template for creating a simple rails app

If you don't know what Rails Templates are, they are pretty much a way of generating rails code the way you want it to be generated. For example, you find yourself "always" doing the same thing over and over again to set up your authentication, a template will automat that task for you. This guy created what I think is a pretty good one

 

http://github.com/hectoregm/groundwork

Here is another I like

http://github.com/devinterface/authlogic_subdomain_fu_startup_app

- The Net Duck

Posted March 6, 2010
// 0 Comments

Best game ever! I can't stop playing

be careful, it will waste your time

 

http://games.adultswim.com/robot-unicorn-attack-twitchy-online-game.html

 

- Ya...

Posted March 4, 2010
// 1 Comment

Make Ruby on Rails select_tag stick

I spend a couple hours yesterday trouble shooting a very minor bug in my code that had be grinding my teeth. This was the link of code

Hidden: </label><%= select_tag :hidden, options_for_select({'No' => 0, 'Doesn\'t Matter' => -1 ,'Yes' => 1}, params[:hidden]) %>

The problem here, was the last part of this code "params[:hidden] should be setting the default correctly every time the page is called again. The problem is, the contents of params[:hidden] is in string format while it should be in int format. This is an easy fix all you have to do is something like ....

params[:hidden].to_i

And your done. So in conclusion, pay attention to your data types! Ruby doesn't always handle eveything for you.

 

- The Net Duck

 

Here is the funished line that works.

Hidden: </label><%= select_tag :hidden, options_for_select({'No' => 0, 'Doesn\'t Matter' => -1 ,'Yes' => 1}, params[:hidden].to_i) %>

Filed under  //   programming  
Posted March 2, 2010
// 0 Comments