Ruby Rabl Gem08.27.13

Lately I’ve been using Rabl in Rails to serve json. I’ve used it a few months ago but clearly I don’t remember so much about. Now that I’ve been using more I’m starting to like it more. As soon as I understood how it worked it was more fun to use than rendering json in Rails via “render :json => {}”

Note to self, when I have some time I’ll create a screencast on how to use it

Posted in Ruby, Ruby On Railswith Comments Off on Ruby Rabl Gem

Preview Email in Rails07.02.13

I’ve recorded another video showing RailsMailPreview and FBDistributedNotification specifically on how to preview your email from a rails app.

http://www.youtube.com/watch?v=RBChCL_LP5U

Posted in Programming, Projects, Ruby, Ruby On Rails, Snippets, videowith Comments Off on Preview Email in Rails

Ruby Web Scraping Using Nokogiri and Curb06.25.13

I made a video on using nokogiri and curb to web scrape. Simple but to the point maybe I’ll start to make more of this stuff.

http://www.youtube.com/watch?v=eumekfP4IKQ

Posted in Programming, Ruby, Snippets, videowith Comments Off on Ruby Web Scraping Using Nokogiri and Curb

Ruby url encode01.20.13

In one of the projects I’m working on I’ve been seeing the following all over the codebase.

CGI.escape(plaintext).gsub(“+”, “%20”).gsub(“%7E”, “~”)

At first you wonder why are they replacing “+” with “%20”.
Then you realize what they really wanted to use was “URI.encode”.

When using “URI.encode” you don’t need to gsub “+” with “%20”.

Posted in Uncategorizedwith Comments Off on Ruby url encode

RailsMailPreview updated for 10.812.10.12

RailsMailPreview has been updated to work on Mac OSX 10.8.
To download visit: http://nufex.com/

Posted in Cocoa, MacRuby, Programming, Ruby, Ruby On Railswith Comments Off on RailsMailPreview updated for 10.8

MacRuby, Rails Mail Preview10.26.11

I recently wrote an app called RailsMailPreview which will capture any emails being sent from your Rails app.
Once they are captured you can preview what they will look like to the end user.

It is available for purchase from the Mac App Store:
http://nufex.com/link/rails-mail-preview

Posted in Cocoa, Mac, MacRuby, Objective-C, Programming, Projects, Ruby, Ruby On Railswith Comments Off on MacRuby, Rails Mail Preview

has_distance08.09.11

Today, I published a Ruby gem called has_distance. has_distance is used to return nearby records based on the record’s origin (latitude, longitude).

More info can be found at: https://github.com/fernyb/has_distance

Posted in gem, Ruby, Ruby On Railswith Comments Off on has_distance

Skatr updates07.27.11

Lately I’ve been working on updating www.skatr.us which is a site built with Rails and the new code will be ridding Rails 3, and I’ve been porting it over to use HAML as it’s way better than writing erb.

I’m also now using the new sass which I can now get rid of the css less plugin which essential did the same.

For Fixtures I started using machinist and it’s just awesome, at a project I used to work on I had to use monkey type fixtures and that was not fun, machinist makes it fun again. Try it see for yourself.

Posted in Programming, Projects, Ruby, Ruby On Railswith Comments Off on Skatr updates

I’m now using MacVIM…07.10.11

In the past years I’ve always tried to use MacVIM but I just couldn’t keep with it because for one it didn’t look great and I had grown to like Textmate. Recently I decided to get back into learning and use MacVIM for all my development needs except for Cocoa Development where I use XCode because it works awesome with it. I think it has taken me about a week to start getting used to it, the only problems I have at the moment are, I will sometimes type the wrong command but it’s getting better. Practice makes perfect so I will keep trying.

Posted in Mac, Me, Programmingwith Comments Off on I’m now using MacVIM…

iOS development locally05.09.11

When I test my iOS apps on my local network to debug issues I setup a host on my router to point my mac on the network. On my development machine I port forward all requests from port 80 to port 3000 because I’m using Rails and want to view the request log.

This is what I used to forward port 80 to 3000.

Posted in iPhone, Mac, Ruby On Railswith Comments Off on iOS development locally

Capture NSWindow screenshot03.29.11

This weekend I was playing with some neat Core Animation and was looking into how to get an NSImage of a NSWindow. My first solution was to find out if someone already figured that part out and yes of course they did according to google. But the problem was all the examples never had the shadow of the window and I wanted the shadow. So I poked around the docs for some long hours and I came out with this after looking at SonOfGrab sample code.

Posted in Uncategorizedwith Comments Off on Capture NSWindow screenshot

Adding a new person to AddressBook, Cocoa AddressBook.framework02.24.11

In the current project that I’m working on I wanted to give the user the ability to add an email to their address book.

The thing I wanted the user to see was AddressBook.app open and show the current person’s email in edit mode.

The way I did that was like so:

Posted in Cocoa, Mac, Objective-C, Programmingwith Comments Off on Adding a new person to AddressBook, Cocoa AddressBook.framework

PHP GAMV is back online01.17.11

A while ago I wanted to get GAMV back online and I decided to use Cupcake the PHP Framework I wrote. If you’re looking for it go to: http://gamv.fernyb.net/

Posted in GAMV, PHP, Projects, Uncategorizedwith Comments Off on PHP GAMV is back online

Cocoa for today10.24.10

I’m going to start posting more code snippets on my blog and each of those posts will be called Cocoa for today and of course the title changes for the specific code I’m writing.

If your working with NSOutlineView and need to deselect all items you can use

the deselect all method from NSOutlineView

[myOutlineView deselectAll:nil];

Posted in Cocoa, Objective-C, Snippetswith Comments Off on Cocoa for today

Update NSConference 201002.25.10



Yes that’s me the first blurry one. Photo by Chuck Toporek.

After attending NSConference USA 2010 in Atlanta, GA all I have to say it was awesome! Really it was. The content was great. The folks were cool and the food was ok not bad. One thing that I really did not like and I think everyone would agree, food was not allowed in the auditorium. I’ve managed to record a few of the talks using QuickTime on my Macbook. I think one of the best talks was “Spelunking OSX” it’s just awesome. The lunch talks were also great. The Cocoa Rumble was really great and entertaining. Hopefully next year it will be at a different city, I have nothing against Atlanta but having a conference in different cities will be great.

Posted in Mac, NSConference, Objective-C, Programmingwith Comments Off on Update NSConference 2010

  • Recent Comments