05.3.11

Uninstall Flash Builder 4.5 Burrito (and more adobe things)

When I tried to install adobe flash builder 4.5 final, I found a problem that it complains about having burrito (the pre-release) version of 4.5, I run the uninstall included in the burrito dmg but points me to an “adobe application manager” … to keep it short, it didn’t work.

The real deal is here

http://www.adobe.com/support/contact/cscleanertool.html

Just uninstall the flash buider and you are good to go

Happy coding :)

.

04.29.11

Rails 3 STI

I was doing an ETL for a client, and I get into the issue of defining a way in the DB to define “tasks”, the main issue here is that many tasks have similar fields, so its useless to get them on different tables, a good friend told me about Single Table Inheritance , it was very useful and proved to work.

I decide to do an example of this, in Rails3 for sharing, the idea is basic, you have different tasks, right now it only have a mysql task, and a ftp task, in a very simple scaffolded app.

The interesting things get in the model, and the controller, you can see how the STI magic happens, I leave a lot of comments and links on the code, to better understand this.

I will update it to get more useful information on the github example, you can download it from here:

https://github.com/warstories/TheTasker

.

09.26.10

Rails 3 on Mac OSX Snow Leopard

I used to work with rails 2.3.8 and I wanted to know all the buzz around Rails 3, everybody knows that it’s a new development beast.

So I decided to install it and after a lot of digging on the internet, I managed it to install it, one requirement for me its that I *need* both RoR running, so I go with the RVM approach, and even without this requirement, it’s the recommended approach (not by me but recommended by a good friend and a real ruby/ror expert).

Why RVM ? for certain gems you will need ruby version 1.9.2 (1.9.1 has known bugs, and rails will throw you a warning if you choose this), and the snow leopard version is 1.8.7, so you will need this. Explaining RVM goes beyond the scope of this tutorial, so I will recommend you to read the basics from the RVM page and also this tutorial of a good friend.

1. Before you start be sure that you have the xcode tools at least on version 3.2.1 (1613) you won’t be able to do anything without this, so go ahead to developer.apple.com and grab it, its a little big (2.9 gb the current version), so you better start right now.

2. You will need git and curl, so I recommend you to use macports, but you can also install it from different sources

3. Install RVM, the instructions are very strightforward and almost a copy & paste from this page, but I will wrote the commands here, just to make it as complete as possible

  • bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

4. Configure RVM, this is open your .profile (this is the apple recommended, but if you override this, and used bashrc you will add it there), and then write this line at the end of the file (if you are a linux user and you are here for coincide please see the RETURN issue on the install page, specially ubuntu/debian ones)

  • [[ -s "$HOME/.rvm/scripts/rvm" ]] && source “$HOME/.rvm/scripts/rvm”  # This loads RVM into a shell session

After adding this, you know the steps, load a new console, and you can test it whit this command

  • type rvm | head -n1

It *have* to return “rvm is a function” otherwise, please refer to the troubleshooting section of the RVM install page.

5. Now, time to install ruby 1.9.2.

  • rvm install 1.9.2

6. Once is installed you can switch to this version with this command

  • rvm 1.9.2

you can check the installed version with

  • ruby –version

7. Create a new gemset (read more about gemsets here)

  • rvm gemset create ror3

Switch to this gemset

  • rvm gemset use ror3

8. Before installing the rails gem, you need 2 gems, rdoc and rubytree, otherwise the installation will fail

  • gem install rdoc rubytree

9. Now install rails

  • gem install rails

10. Bonus track, some commands don’t work well without this gem, install it also

  • gem install sqlite3-ruby

And you are done!!! Happy coding :D

.

09.24.10

Ruby 1.9 and 1.8 on ubuntu 10.04

After asking a lot of people , and trying to go with the ubuntu way, a.k.a. synaptic I realized that the best way to install ruby on ubuntu is to avoid the ubuntu solution, it doesn’t get a lot of flexibility, and you may get in troubles when you want to do a strange thing.

So I advice you, to install RVM, and go this way, you will find a great tutorial on how to install it on ubuntu

http://rbjl.net/19-rubybuntu-1-installing-ruby-and-rails-on-ubuntu

also a great friend do a kick start tutorial on RVM here

http://blog.crowdint.com/2010/07/28/getting-started-with-rvm.html

Happy coding :D

By the way, if you are trying this to install RoR3 be sure to install first the following gems rdoc , test-unit and rubytree or you will get errors like this:

ERROR:  While executing gem … (Errno::ENOENT)
No such file or directory – lib

ERROR:  While executing gem … (Errno::ENOENT)

No such file or directory – lib

09.6.10

From flex to ruby on rails; A kickstarter guide

First, be calm, you will miss the canvas object like your girlfriend on a business travel, sooner or later you will remember that you had been there, and she has to return.

I recommend you to use RadRails you will understand it a lot because is eclipse based, like Flex Bulider, an it has a pretty good debugger with breakpoints and all that stuff.

You probably already have it, but I also recomend that you keep using charles proxy (and if you are not using it on flex, shame on you!), also install the firebug extension for firefox, if you are a safari man enable the developer menu

I know that you probabliy have to start with RoR without time of reading a book, I recommend you this few pages, first this getting started guide, also a page about migrations, and also about generators, and if you had time this book will help you a lot The Rails way

Now, find yourself a new life, and open a github account, you will realize that the ruby community is mostly git based.

Forget about CammelCase, and start getting used to snake_case you will notice that is a minor but useful change.

Keep the terminal in your dock if you are using mac, if you are using linux you probably had one opened, and if you are using windows consider seriously migrate to linux, your life will be easier that way.

Get used to the idea to deal with javascript, but you don’t have to do it alone, use jQuery.

And finally when you are ready to leave your training wheels (rad rails) and move to TextMate don’t forget this two bundles: RoR bundle and git bundle

Anyway I think this links would help you, but If you had another one you want to share, please add it on the comments, I will be happy to include them.

Happy coding.

Tags: , ,
| Posted in RoR, development, flex | 3 Comments »
08.4.10

Jailbreaking iOS4, the good, the bad and the ugly

Finally after waiting, and waiting the expected jailbreak for iOS4 came, the problem was I had a 3.1.3 “spirited” iPhone, so, the pwned version wont work for me. But thanx to @comex (et al) the great jailbreakme came, and I can join the iOS4 party.

The good:

Fast, I can’t believe its my old 3GS, is blazing fast, even with some “background jobs” its faster than 3.1.3. Another good things are folders, I used to have about 6 pages of apps, now I only had 2

The bad:

I can’t get to enable the “tethering” option on preferences, you can use the program tether (I kind of dislike it because its actually a socks proxy, not a NAT or something more native), or you can use MyWi4 , I used to like this on 3.1.3 but 2 things made me think about it, 1. you can not enable bluetooth tethering anymore, you can do USB tethering and wifi, but for example for my linux laptop I can no longer use bluetooth :( , 2. When you install MyWi4 it depends on a package mobilesubstrate, and this breaks a lot of things (and I’m not blaming anyone, I’m just saying this breaks things), for example, the “always on” functionality on skype, no longer works. check update, this is now working

Update: ( http://twitter.com/saurik/status/20294560499 )

The ugly:

I really hate that even applications that system preferences stays working on background, I might be wrong here (can be only showing the icon for example), but almost every app stays on this “taskbar” (the one you get when you doble click on the home button), and yes, the battery suffers even with only the skype running.

Well, anyway, I can’t go back , so I hope the hacking team can get the tether toggle enabled again. Consider this post a big thanks to the jailbreak team :)

.

Tags: , ,
| Posted in osx | No Comments »
07.31.10

Playing with geektool (first the lyrics)

I always work with music, and I sometimes like to sing, so I want to see the lyrics of the current song, without opening itunes, and then the properties, so I use the Geektool project (a little old, but it works wih 64bits kernel), this app, will enable you to run commands and put the output on the wallpaper, you can see a lot cool screenshots on the developer site.

I will stick on the basics, I only want my lyrics (and some ps ax info).

So this scripts will help you to do this, there are 3, “itunes_artist_lyrics.sh” will get you both artist name/title and lyrics, and “itunes_artist.sh” will get you only the artist name/title, and itunes_lyrics.sh will get you the lyrics (if you want to run it on different output windows). By the way, this script don’t open itunes if it’s not running .

You can download it here -> (or download the git repository)
http://github.com/warstories/Geektool-Scripts

If you don’t want to clone the git repository, I added you a zip on github:
Download release 1.0 from git

This is a screenshot on how I show the lyrics, may be simple, but It works :

screenshot_lyrics

(you can se the lyrics on the left, some process information on the center, and the day on the right just above the watermark)

Next time I will try to load the artist cover and get it on the desktop with geektool, but for now, lets just listen to Arctic Monkeys, 505 (I can’t stop listening this song).

02.19.10

iPhone USB tethering, error 0xE800006B, OSX 64Bit Kernel

Yeah thats right!, It took me too long to realize that, but its true.

You CAN NOT do usb tethering with a 64Bit Snow Leopard Kernel, I guess the drivers are still 32Bits.

You will not find this info on apple because, first tethering is not available on many countries (yes I have a jailbroken iPhone I’m not ashamed of that), and second the 64bit kernel is still targeted to servers, not users.

But I guess you are a power user :D , so don’t waste more time trying via usb, and do the tether stuff with bluetooth, it works great :D

.

Update Aug 2 / 2010, Today I updated to itunes 9.2.1 the usb tethering is now working on 64 bit kernel

.

02.18.10

Flex: Dynamic Background Image on Canvas (redraw version)

Today I tried to load an image form an url and apply it to a background, well appears like setStyle don’t have the ability to load an image from URL.

So I had to look another alternative, I load the image using an Loader, but I couldn’t found a way to apply it to the background  style, I did a workaround, I draw it on the graphics object, I guess it is helpful because the image is titled, but I will try more options I didn’t quite like 100% this solution.

IMPORTANT : dont’ forget the security restrictions of doing this, remember that flash can’t load images from another domain, and www.zerokernel.com is different to zerokenel.com, see Adobe for more information ( Player 9 restrictions from Adobe – PDF )

Anyway, here is the demo:

http://zerokernel.com/demos/flex/backgroundChanger/

And the code:

http://zerokernel.com/demos/flex/backgroundChanger/BackgroundChanger.zip

12.4.09

Teztoc updated

A good friend of mie has released a library to test individual flex components, its very useful when you build large apps with smaller components because it allows to check exactly how it behaves but without loading the whole app.

You can check the project here:

http://code.google.com/p/teztoc/

I will be posting an example soon

  • hp support 2133
  • new england patriots 50
  • bengals 08 schedule
  • searchbugsearch engines
  • randy moss autograph
  • chicago bears 09 draft
  • dis lyrics
  • pedals
  • bengals for adoption
  • new england patriots espn blog
  • chicago bears tattoos
  • vince young uncle rico gif
  • hp support 6500a plus
  • chicago bears number 17
  • connecticut quarter error
  • avenue
  • new england patriots 1996 roster
  • augustine
  • battleship vittorio veneto
  • mtv american idol
  • cspan kucinich
  • chad ochocinco vs skip bayless
  • connecticut 104.1
  • cspan ap government review
  • connecticut 30 news
  • connecticut lottery
  • new england patriots 65
  • heidelberg
  • tea party birthday
  • hp support monitors
  • new england patriots rumors
  • randy moss wallpaper
  • search engines internet
  • new england patriots jake locker
  • mtv rivals
  • dist 95
  • search protocol host
  • zara phillips royal wedding picture
  • hp support center
  • bellsouth
  • greg olsen football
  • bengals job fair
  • discjuggler
  • tea party 8 28 09
  • bengals history
  • dis v44
  • vince young 10 11
  • battleship classes
  • hp support contact number
  • mtv cartoons
  • search vim
  • hp support greece
  • connecticut natural gas
  • search 2.0
  • new england patriots store
  • zara phillips wedding plans
  • di's hallmark
  • zara phillips wedding date
  • c span youtube obama
  • vince young z
  • dis systems
  • randy moss bio
  • beau coup
  • search in vi
  • connecticut quarry
  • configuring
  • tea party zombies download
  • bea rims
  • cspan hosts
  • chicago bears garter
  • mtv 25 lame
  • bea zuberbühler
  • la ink 04x01
  • tea party young people
  • vince young 2008
  • hp support error 1005
  • vince young yahoo stats
  • greg olsen 2009 calendar
  • lilburn
  • hp support greece
  • search engines 9
  • zara phillips kids
  • dis n dat band
  • needles
  • hispanic
  • randy moss university
  • stefani
  • vince young jersey texas
  • peek
  • battleship kirishima
  • bea verdi
  • battleship aurora
  • tea party nj
  • search engines rankings 2011
  • bengals football
  • greg olsen vikingsgreg olsen wife
  • search 4
  • brugge
  • search engines before google
  • primer
  • chicago bears schedule 2011
  • freida pinto green dress
  • la ink price list
  • chad ochocinco traded
  • connecticut 7 day weather forecast
  • zara phillips tongue
  • hp support id
  • recoil
  • chicago bears gifts
  • cspan government shutdown
  • battleship texas hours
  • search 78search 800 numbers
  • applebees
  • hp support driver downloads
  • impairment
  • greg olsen boulder
  • hp support helpline
  • mbna
  • duggan
  • la ink tattoos
  • sheetmetal
  • new england patriots xxl
  • greg olsen twitter
  • morris
  • freida pinto 1995
  • tea party ribbons
  • hp support chat
  • cspan question timecspan radio
  • randy moss jail
  • cspan washington correspondents dinner 2011
  • zara phillips husband
  • beagle
  • freida pinto chanel
  • chicago bears training camp
  • alum
  • connecticut post
  • hp support center
  • greg olsen mormon
  • vince young dadvince young eagles
  • dis tester
  • randy moss height
  • randy moss 98 vikings
  • cooling
  • zara phillips and the queen
  • la ink upcoming episodes
  • 4pm cspancspan area 51cspan 90.1
  • new england patriots 80
  • dis 2012 conference
  • hp support 6310hp support 7200
  • beta
  • tea party medicare
  • vince young released
  • deflector
  • chad ochocinco free agent
  • search 5500
  • zara phillips baby
  • freida pinto can't act
  • hp support error 1005
  • chicago bears zip hoodie
  • chicago bears football club
  • bea 460 bosch
  • addiction
  • cspan streaming
  • acdc
  • freida pinto miral
  • trojans
  • mtv jams
  • kimberly
  • search engines 2008
  • cspan goldman sachs hearingcspan history
  • freida pinto jeansfreida pinto kissing
  • cadet
  • hp support hard drive replacement
  • bea goldfishberg
  • connecticut law tribune
  • vince young status
  • chicago bears jewish players
  • bear gryllsbea hive dance studio
  • search engines images
  • dis poem
  • connecticut transit
  • bloods
  • search cfisd.net
  • dist 91
  • feeders
  • bea 4603