PunBB SDK for Rails

October 10th, 2007

PunBB SDK

Authentication and Object Wrappers for PunBB alongside Rails

Get it Here


./script/plugin install svn://ahgsoftware.com/punbb_sdk/trunk

ErbBuffer

Painless Nested output buffering, for the masses!

Get it Here


./script/plugin install svn://ahgsoftware.com/erb_buffer/trunk

Example usage in a typical Erb view

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@contents = capture_buffer do
   %># view code here<%
end

<%= @contents $>

# For nesting, here's an example from the readme
<% @contents_surface = capture_buffer do %>
        Top level goodies
        <% @contents_shallow = capture_buffer do %>
                Mid level content
                <% @contents_deep = capture_buffer do %>
                        deeper deeper, i say, deepah
                <% end %>
        <% end %>
<% end %>

<h1>Contents top level</h1>
<%= @contents_surface %>
<h1>Contents medium level</h1>
<%= @contents_shallow %>
<h1>Contents deep level</h1>
<%= @contents_deep %>
<h1>An odd juxstaposition</h1>
<%= @contents_surface + @contents_deep %>

About Me

October 10th, 2007

AHG Software, is Michael Cerna's (me) webspace and weblog. I'm 50 percent Software Developer, and 50 percent musician (Yes, I went to school for both, otherwise, I'd just give one up and focus on the other.) My Music-related blog will be at Axehomeyg.com shortly.

I'm not much of a blogger, however, I do have many bits of code that I would like to make available, so keep checking back for new plugins or any advice (I don't like preaching, but, if something saves me tons of time, I'll be sure to let everyone know!).

I'm generally WAY WAY WAY WAY WAY too busy to take on any contract work, but, I'm always available for advice or high-level consulting. Send me an email at 'mcerna' at this domain, and I'll get back to ya about whatever ails ya!

I love using SWFObject in javascript to generate clean embed tags. But, most of the time, I just want a simple plugin, that works just like an ActionView helper, and generates my embed tags intelligently from the filetype that I pass in! So, here is what I use, Lemme know if you find it useful!


./script/plugin install svn://ahgsoftware.com/simple_object/trunk

Typical usage..

1
2
3
4
5
# In a 'view', with just default parameters
simple_object_tag "/example.mp3"

# with some additional parameters, real ones, and crazy ones..
simple_object_tag "/flashgame.swf",:scale=>"tofit",:junk=>"shizzle"

Thats it, simple, but, one of my most used personal plugins!

GnuPG plugin for ruby on rails! The README in the plugin has all the basic usage info. Its fairly easy to use. The hardest part, by far, is setting up your environment to use GnuPG for web-applications (permissions, security, all that jazz).

Get it here


./script/plugin install svn://ahgsoftware.com/gnupg/trunk

Example (assuming you have 'private key' imported into workdir)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# We're using the same workdir for pub and sec, they could differ!
workdir = File.join(RAILS_ROOT,"tmp","gnupg")
passphrase = "uglydonkeys"

# This is a darwin-ports on Mac OS X version of gpg
gnupg = GnuPG.new :binary=>"/opt/local/bin/gpg",
   :workdir=>workdir,
   :homedir_pub=>workdir,
   :homedir_sec=>workdir,
   :recipient=>"your uid"

plain_message = "no more mustachoed tyrants, muhwahwahwa, buhwahwahwa"
encrypted_message = gnupg.encrypt(plain_message)

# Load ascii sec key, from wherever you might have it
gnupg.load_key File.read("sec_key.asc")
decrypted_message = gnupg.decrypt(encrypted_message, passphrase)
gnupg.drop_key

puts plain_message
puts encrypted_message
puts decrypted_message

PhpCompat

Php functions all wrapped up in a ruby interface! Basically, when I get last minute 'we must migrate this huge PHP codebase to Ruby' projects, I'll use this compatibility layer, and do a huge SED replace on all available methods.
The methods that might be of most use to us Ruby nubes are probably...

  • posix methods (posix_getpwnam, posix_getuid, posix_setguid, etc..)
  • date method (it takes the secondary timestamp argument, AND, converts the php date format characters into ruby Time format characters. Check out the tests for examples
  • File methods are coming next, although, local-file versions of file_get_contents, and file_put_contents are already in place.

Get it here


./script/plugin install svn://ahgsoftware.com/php_compat/trunk

Examples

1
2
3
4
5
6
7
8
9
10
# Dates
PhpCompat.date("F j, Y, g:i")   # Translated to Time.strftime chars
PhpCompat.time  # Integer unix timestamp

# Posix methods
PhpCompat.get_pwnam('localusername') # Struct with passwd info

# File methods (not network enabled... yet!)
PhpCompat.file_put_contents('/tmp/file.txt',"yo yo yo")
PhpCompat.file_get_contents('/tmp/file.txt')

Rails Plugins

October 10th, 2007

You can check out version history/info at svn.ahgsoftware.com

Php Compatibility for Ruby on Rails


./script/plugin install svn://ahgsoftware.com/php_compat/trunk

GnuPG plugin for Ruby on Rails


./script/plugin install svn://ahgsoftware.com/gnupg/trunk

Object & Embed Tag plugin for Ruby on Rails


./script/plugin install svn://ahgsoftware.com/simple_object/trunk

ERB nested buffer capture plugin for Ruby on Rails


./script/plugin install svn://ahgsoftware.com/erb_buffer/trunk

PunBB SDK for Ruby on Rails


./script/plugin install svn://ahgsoftware.com/punbb_sdk/trunk

Testimonials

October 10th, 2007

To convince you that my company is fully capable of delivering you solid web-based products, I've amassed a few testimonials from my clients/colleagues. Short of rampant narcissism, they'll clearly indicate our ability to scale any challenge you can throw at AHG Software.

Michael Bloch

I've worked with Michael since late 2003 when he was contracted by the company I manage, ThinkHost, Inc. to complete our Control Center. This was a huge task as Control Center is the nerve center of the company (web hosting). It controls the admin/client interfaces, plus a great deal of general server functions.

I can't even begin to explain just how complex this task was - there were so many aspects, but he completed the project where others had failed. We've had Mike working on a variety of other related projects as well, some where he has had to untangle a mess left behind from a previous programmer and he has been able to do so on each occasion.

Michael has carried out work for some other ecommerce related projects I have via my own business, Taming the Beast.net; including a custom Content Management System based on XML feeds. This project required many special modifications in order to make it search engine friendly.

I have witnessed Michael's competence in a variety of applications - PHP, MySQL, JavaScript, PERL, XML and HTML.

One of the other great aspects about working with Mike is his communications abilities. Having worked with many programmers, I discovered this can be a real challenge. Michael is able to relay technical concepts in simplelanguage. He listens to what the client wants; then carries out their instructions, instead of going off on his own tangent as many programmers have the tendency to do. He provides valuable advice while working on a project that can save a client money, or to just help make the project more effective and user friendly. Programming is more than a job to Mike, it's a passion.

I have no hesitation in recommending Michael Cerna as a competent programmer, an excellent communicator and someone who is a pleasure to do business with.

Referrals

October 10th, 2007

Obviously, outsourcing has done a great deal to erode the fast-paced and lucrative career of independent software consultants here in the United States. I have, however, found a treasure trove of colleagues and clients that can make mince-meat out of your projects or projected web investitures (in a good way). Here is a listing of resources, referrals for your needs.

Coding/Design

Audilis

Daniel, over at Audilis is a fantastic programmer, designer, system administrator, AND animal-lover. His development style offers a nice contrast (and often a complement) to our development philosophies here at AHG Software. Check out his site here..

3D Modeling/Design and Flash

3D Impulse

Jorge, at 3D Impulse, is a masterful 3d artist, proficient in Maya and Lightwave. He can crank out very organic models quickly for any type of project and has even been involved in numerous projects that integrate Flash and 3D models!

Project Management

Highend Network

These guys know what they are all about. If you give them a large-scale dilemma, they'll give you a lean-mean solution, carefully documented and forward-looking in both software-design and useability. Check them out..

Pixabit Interactive

Robert, over at Pixabit, is a fantastic designer, planner, and project planner. The guys is a jack of all trades, and he truly understands the meaning of a quick-turnaround. For those of you that fear software-consulting companies extending deadlines and derailing a project through wasted time, you owe it to yourself to check out Robert's fast-paced development style! Check him out..

RepeatNone

These guys have some really clean code. They truly nail that Web2.0 aesthetic. Check them out..

Hosting

Thinkhost Inc

There are many reasons to host your site at Thinkhost. Some practical reasons...

  • The company ideology is highly community-based.
  • They use re-useable energy credits.
  • They have solid Ruby/Rails support.
  • They have extremely high-tech backend software, keeping emails,sites, and most importantly, businesses, running smoothly.

If you are one of my clients, then you are probably already on one of my companies internal servers. Thinkhost will offer Enterprise hosting solutions in the near future, at which point, you might also want to consider their affordable and highly stable services.

 

Michael Cerna Chicago-based Rails Developer and Avid Musician. More ...

Search

Categories

  • Home (15)
  • Rails Plugins (5)
  • Pages (9)
  • Archives

    Tags

    BlogRoll