Bustikated

Equal parts geeknobabble & jackassery

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’.

more

Putting your GEMs on Ice

Posted by BM5k on March 19, 2008 at 09:53 AM

Mostly for my benefit later, but maybe helpful to you other rails newbs: I always seem to not be able to find this quickly when I want to freeze mah gems. It isn’t that hard, I’m just that absent minded.

To lock in a specific version:
rake rails:freeze:edge TAG=rel_2-0-2
Ensure all your config files match:
rake rails:update:configs
To double check which version is actually being run by your app:
script/about

More attachment_fu Failure

Posted by BM5k on February 08, 2008 at 05:15 AM

Continuing the saga started here, I now have a legitimate business need to get image uploading working. (Before, I was just screwing around.) I am running into a different problem.

To make matters worse, I some how managed to screw up my svn repository for my previous attempt, and lost enough of the app structure that what’s left is useless.

I’ll be updating this post with things that I (re)discover along the way. First off, for a detailed description (including code, this time) of the problem I’m having, see this post at RailsForum.

more

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.

more

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

  1. If you get the account creation wizard the first time you run ecto, just click cancel and dismiss the following error.
  2. Click “Add” in the Account Manager.
  3. Enter your site’s URL when prompted. Example: http://myweblog.com
  4. 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
  5. The Access Point should be the same thing as your URL, but add /xmlrpc/api. Example: http://myweblog.com/xmlrpc/api
  6. Click ‘Next’ and then enter your username and password (the same info you use to log in to the SimpleLog admin section).
  7. 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!

more

iPhone Site & Repository

Posted by BM5k on August 31, 2007 at 04:19 PM

sitesource

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.

Passwd

Posted by BM5k on August 14, 2007 at 08:49 PM

iPhone - Terminal

It is probably a great idea to change the default password on your iPhone, especially if you are using ssh or sftp (which I’ll get around to telling you how to set up) to install programs.

(Based on the info provided here)

From your local working directory, ie /Users/YOU/iPhone/, run (in Terminal, of course)
scp root@XXX.XXX.XXX.XXX:/etc/master.passwd master.passwd

Where XXX.XXX.XXX.XXX is your iPhone’s IP address. This will download the password file to your working directory.

Before you do anything else, make a backup of this file. DO IT!!!!

Next, run the command
perl -e 'print "\n".crypt("XXXXXX", "YZ")."\n\n"'

Where XXXXXX is your new password, and YZ are two random characters. This script will output an encrypted string. Paste this string in between the first two colons of the rows root and mobile in the master.passwd file you downloaded. Then re-upload the file using the same command used to install applications. Modified, obviously, to change the upload directory.

scp -rp master.passwd root@XXX.XXX.XXX.XXX:/etc

Reboot your iPhone. Any future SSH or SFTP connections will use the new password.

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

more

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.

more