Rails + vCard
Posted by BM5k on June 19, 2008 at 04:52 AM
I was looking at microformats for use in a current project, and decided that I’d like a way to export contact data as a vCard. A quick google search revealed this, which just happens to be by Derek Neighbors. It uses the VPIM library, which I found here.
Being the “There’s no way I’ll remember any of this later” person that I am, I tossed this into a pastie, and am blogging about it more for my benefit than yours.
Leopard Server + Blog
Posted by BM5k on April 13, 2008 at 07:48 AM
Man, I am getting warmed up to Leopard Server quick. Although I don’t think I’ll be replacing Simplelog just yet, the ability to use 3rd party apps to interface with the built-in blog system makes it that much more attractive.
From the Server’s help page:
To access your blog, use an applicatioin that works with the Metaweblog API. Use the following information to configure the editor:
RPC Access Point: http://serverDNSname/RPC2
Username or Blog ID: Your user name or the name of your group
Warehouse + Leopard Server
Posted by BM5k on April 13, 2008 at 04:03 AM
I’ve managed to get SVN & Warehouse somewhat up and running on my server, and now that he’s online, I’m trying to get everything 100%.
Right now, I’m testing the following post-commit hook in one of my repositories to see if it works. The directory names have been changed to match my server, but otherwise this is just the basic suggestion from the Warehouse FAQ.
#!/bin/sh
cd /Library/WebServer/Rails/warehouse-1.1.6
/usr/bin/rake warehouse:post_commit \
RAILS_ENV=production \
REPO_PATH=$1 \
REVISION=$2
CSS Media Fu
Posted by BM5k on March 21, 2008 at 10:51 PM
Inspired by a similar php solution found here, I decided to try and do this in Rails.
I quickly realized that something like this could be implemented as a plugin, in spite of it’s simplicity.
Google led me to this howto on creating generators, and following along with this and another of Urubatan’s guides, I was able to get a working plugin created.
Installation
As of right now, I do not have a public subversion repository. This should change within a week or two. The only way to install the plugin is to manually unzip it into your application’s vendor/plugin directory.
Get the zip here
This is my first plug-in, and was written more as a chance for me to explore plugin creation than out of necessity.
If you’re interested in creating your own plugin, you can read my notes by clicking ‘more’.
One More Reason
Posted by BM5k on March 21, 2008 at 03:25 PM
to Love Safari
With one simple command, you too can force Safari to open all “new window” links as new tabs. Open up terminal and paste in this line. Don’t forget to restart safari afterward!
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
I wonder if there is a similar fix for WinSafari
[From Terminal Tip: Safari 3.1 brings true one-window mode – (TUAW)]
Acts As Taggable on Steroids
Posted by BM5k on March 15, 2008 at 03:02 AM
Most of this was stolen directly from the Readme
Since I stole everything else, I figured I’d duplicate the donation link as well.
If you find this plugin useful, please consider a donation to the author to show your support!
Author’s Email: jonathan.viney@gmail.com
Installation
ruby script/plugin install
http://svn.viney.net.nz/things/rails/plugins/acts_as_taggable_on_steroids
ruby script/generate acts_as_taggable_migration
rake db:migrate
Quick & Dirty WeeWar
Posted by BM5k on March 15, 2008 at 12:48 AM
The Window
All of the action takes place in the window.
- Map – Where the action is
- Cash and income
- Inspector
- Name & Description of currently selected (hovered) terrain or unit
- The current unit is strong against these units
- The current unit is weak against these units
- The current unit can’t be used to attack these units
- Terrain effects on this unit
- Chat Window
- Player List
The point of WeeWar is to build an army and destroy your opponents.
To do this, you need to build units.
To build units, you need money.
To get money, you must capture bases.
Only bases generate income. The amount varies from map to map. This cash will be deposited every round.
Bases also build ground units and hovercraft.
Airports can build helicopters, and planes.
Ports can build hovercraft and ships.
Repair patches aren’t capturable. Repairing a unit on a patch totally repairs that unit!
Most units can either
1. Repair increase 1 or 2 HP
2. Move and stay
3. Move and attack
- Infantry & Hovercraft can capture if they are on a building. Infantry are a LOT weaker during capture.
- The Light Artillery, Heavy Artillery, and DFA units can not attack after moving.
- Planes can move, attack, and move again.
- Air units can’t be repaired.
- The Battleship can move and then attack twice.
Most units can only attack adjacent units, that is units they are right next to. Indirect units can fire on units in their range.
| Indirect Units | Range |
|---|---|
| Assault Artillery | 1-2 |
| Light Artillery | 2-3 |
| Heavy Artillery | 3-4 |
| DFA | 2-5 |
| Battleship | 1-5 |
Terrain
- Different units move differently over the different types of terrain.
- Some units can’t cross certain terrains.
- Some units get bonuses or penalties in combat if they are on a certain terrain.
Leopard Server + Subversion
Posted by BM5k on March 14, 2008 at 04:10 AM
One step closer to getting my server up to production!
After several mis-steps, I’ve finally configured subversion in leopard server, and have mostly gotten Warehouse running.
I can’t wait to migrate all of my sites over to the server and get it live!
What kind of how-to would this be if I just sat around cooing about my own accomplishments? After all, I just stole the work from other people. And here it is:
Subversion
This page was instrumental in getting subversion up and running properly. A lot of other pages helped/got me started, but in the end I just wiped all of that other crap, and started over from the top of this page. When I finished, Subversion worked. That simple.
One gotcha, noted in the comments, is that for some reason OS X Server Admin seems to be fond of changing the line DAV svn to DAV off. Some vigilance in TextMate prevented this from bringing me down!
I’ll be posting more specifics about my Warehouse experience as soon as it’s actually working ;)
Proper Flickr Image Attribution
Posted by BM5k on February 25, 2008 at 03:30 PM
This is how I would attribute this particular picture. The usage of my Flickr screen name or my full name is a matter of preference, and doesn’t bother me either way. The picture itself links back to the Flickr photo page, as well as the text link below. One, the other, or both is good.
The CC license requires all copyright notices to remain intact. The third image is a link to the “human readable” license text, which satisfies this requirement.
Also note that the image title (as provided on the image page) is intact in the title of the link. This is another requirement of the CC license.
I encourage everyone to familiarize themselves with the restrictions and expectations they release their intellectual property under. As a producer of content, take the time to know the license you are extending. As the user, be sure that you follow the guidelines and requirements set forth. These licenses and agreements exist to allow content use, not prevent it.
As the copyright holder, it is your job to actively protect your content. Failure to do so effectively terminates your copyright.
Ruby API Development with WeeWar
Posted by BM5k on February 24, 2008 at 07:32 PM
As a ruby newb, I thought that I’d document my first trek into API development.
Lately, I’ve been quite taken to wasting hours in front of WeeWar, to the extend that it’s interfering with my normal goofing off. Among other things, WeeWar has a relatively simple API. An introduction can be found here.
There are only a few API accessible objects, Players, Games, All Players, and the HQ. Click on the preceding links for sample of the data returned by each.
These URLs are pretty straight forward. The key thing to realize is that while games are selected by numerical id, players are selected by name. (Names are NOT case sensitive, i.e. Bert is the same as BeRT.) Also, accessing your HQ requires both a user name and an API token. You can find your API token on your account page.
Quick & Dirty Handbrake
Posted by BM5k on February 15, 2008 at 08:07 AM
A quick screencast I made for the basic handbrake config.
FancyZoom
Posted by BM5k on February 08, 2008 at 12:20 PM
Thanks to John Siracusa for pointing me to Fancy Zoom
This seems to be similar to the javascript image library I’ve already set up, possibly better.
iPhone 1.1.3 Upgrade
Posted by BM5k on January 28, 2008 at 01:40 AM
Ok. The 1.1.3 iPhone Jailbreak software is out. I’m ready to try the upgrade on my phone. I’m currently running 1.1.2 jailbroken. A link in the comments on a post at Engadget led me to Nawaf’s site where he has a complete list of instructions for how to get your iPhone up to 1.1.3 and still have all your unofficial native apps.
Here’s a link to the original post on Engadget.
Quick & Dirty Rails Subversion
Posted by BM5k on January 27, 2008 at 01:26 AM
There’s a good how-to over at the RoR Wiki but I’m going to repost a quick & dirty reference here, mostly for my own benefit the next time I go through this.
The point is to ignore sensitive info in the database.yml file, and the ever-changing log & tmp directories. I’m no SVN guru, so feel free to point out flaws in this system.
FAIL: Rails + Images
Posted by BM5k on January 21, 2008 at 02:28 AM
My latest rails project involves uploading images, and having them automagically thumbnailed. So far, it isn’t looking so good.
Upload
Google pointed me at the attachment_fu plugin and a how-to by Mike Clark. Attachment Fu was a pretty simple install/config. Now I can upload images.
This is where the fun ends.
Startup Disk Round 1
Posted by BM5k on October 31, 2007 at 05:11 AM
In the never ending battle for hard drive space, the first place any sane person will look is media. Movies. Music. Photos.
Using an external disk for your iTunes library has one downside: If you use a laptop, your library and your computer might not be in the same place at the same time. You’ll be able to sync your devices and browse your library, but obviously you’ll be unable to partake in any media consumption.
This should be of little consequence as your iPod will probably be with you, and probably has some of your media on it. However, if you must have everything, all the time, consider getting a small external drive before abandoning this approach all together.
OS X: Full Startup Disk
Posted by BM5k on October 31, 2007 at 05:10 AM
About a month ago, my mom mentioned that her iBook’s startup disk was getting full, and that she had started to receive warnings from OS X about it.
Since my mom isn’t the most technically inclined, I told her that I would get some easy to follow tutorials together. Well that hasn’t happened yet, so I’m doing it now.
There will probably be a few articles in this series, as there are several things you can do to save yourself from a full startup disk.
Obviously, the easiest, fastest, and all around best way to alleviate this issue is to upgrade your internal drive. If that’s not an option for you, follow along.
SimpleLog + Ecto
Posted by BM5k on August 31, 2007 at 04:33 PM
Stolen from here, mostly because its a publicly editable wiki. I had to edit the page and revert a bunch of spammed changes to find anything useful!
Setting up Ecto
- If you get the account creation wizard the first time you run ecto, just click cancel and dismiss the following error.
- Click “Add” in the Account Manager.
- Enter your site’s URL when prompted. Example:
http://myweblog.com - ecto will attempt to get information about your weblog, but you’ll need to clarify a few things when it’s done as such
System Other (select API)
API Movable Type - The Access Point should be the same thing as your URL, but add /xmlrpc/api. Example:
http://myweblog.com/xmlrpc/api - Click ‘Next’ and then enter your username and password (the same info you use to log in to the SimpleLog admin section).
- Enter anything for the Profile Name. ecto will get your blog information and then ask you a few questions. UNCHECK ALL BOXES and click ‘Next’. Click ‘Finish’ and ecto will get all of your entries.
If you are asked which mode you want to edit in by default, you should choose HTML. You can also set this via the Preferences.
You can now edit, delete and post from ecto!
iPhone Site & Repository
Posted by BM5k on August 31, 2007 at 04:19 PM
I’ve finally gotten around to adding an iPhone specific area to the site.
I’ll be using the space to put up info about how to abuse your phone, as well as maintaining a small repository of installer.app packages.
I’ll probably be reposting/moving my existing tutorials there, as well as adding a few new ones as new shits are added.
SimpleLog v Godaddy part 2
Posted by BM5k on August 01, 2007 at 05:40 AM
Continued from Part 1
The Godaddy Config (Step 3)
I created a database & user for the SimpleLog program, and FTP’d the program to a subfolder of my hosting root.
At this point, http://bustikated.net/mysimplelogdir/ was giving me Permission Denied errors & http://bustikated.net/mysimplelogdir/public/ was giving me Bad Request errors.
Using the phpMyAdmin db management on Godaddy’s server, I was able to modify the domain preference in the simplelog db. Trial and error later revealed that /public/ had to be present @ the end of the url, for now I just left it blank.
Also, I had to get the IP address of the server from phpMyAdmin (I couldn’t find a server name).
All of this fixed nothing
Textile Reference
Posted by BM5k on July 31, 2007 at 07:04 PM
I can’t tell you how many times I’ve had to read this Textile Reference . Its amazing. I even printed it to a PDF to make it easy to find.
SimpleLog v Godaddy part 1
Posted by BM5k on July 31, 2007 at 06:04 PM
I started off at the Simple Log homepage after about a minute and a half of googling Typo alternatives.
My Situation
Since Godaddy doesn’t offer SSH access on its shared hosting accounts, I had to manually configure my install locally, then upload everything. Your process should be similar if you’re also installing without SSH.



