Quick and Dirty Rails

1. Create rails: “rails recipe_book”
2. Create databasei in mysql
3. Create table in database — PLURAL, e.g. “recipes” NOT “recipe”
4. EDIT ruby database so it points to database — “config/database.yml”
5. Create model of table: go to apps directory “ruby script\generate model TABLE_NAME (i.e. recipe)” [SINGULAR]
6. Create controller of table: go to apps dire “ruby script\generate controller TABLE_NAME (i.e. recipe)” [SINGULAR]
7. Edit controller so it creates scaffold: “scaffold :TABLE_NAME” [SINGULAR]

** all done!**
8. You can edit all elements of CRUD — just edit the apps/view
9. LIST: appls/view –> create list.rhtml, and edit it.

** relational tables
10. If there is a higher group that it belongs to do the following
11. Create table in database — PLURAL, e.g. “groups”
12. EDIT FIRST table so it has one entry — TABLE_NAME_id (singluar!)
13. Create model of table and controller table
14. EDIT model of first table so it says “belongs to :TABLE2″ (SINGULAR)
15. EDIT model of second table so it says “has_many : TABLE1″ (PLURAL)

Mar
29
2006
12:31 am

There is a great tutorial on how to turn photographs to pictures.

Basically it is the following:

1) Create the photo-border by creating a rectangle shaped gradient
2) Create a selection that is 4 pixels less than the gradient … this is where the photograph will go
3) Open your photograph of choice and shrink it down a little bit so that it will fit into that selection
4) Save selection
5) Select “ALL” on the photograph, and COPY that selection
6) On the photo-border, load up the selection if its gone, and (HERE’s the KICKER) Edit –> Paste into selection
7) This will create an automatic mask! Adjust the photograph position
8) Then create another layer (transparent)
9) You should have three layers: 1) the photograph mask layer 2) rectangle shaped gradient 3) the new transparent layer(which is new)
10) You now need to create the shadow in the new layer
11) Load up that selection that you saved, and on the “PATHS” tab, click on the small arrow, and click on “make work path”
12) Click on the Pen ICON and stretch the corners of the work path so that they appear like the shadows around corners
13) right click path and say “Make selection”
14) Select “feather 4pixels”
15) Then fill the selection, but select that last transparent layer first, so that you can fill it with this “shadow”.
16) Arrange the Mask and the rectangle shaped gradient on top of the shadow layer — and voila!

Mar
19
2006
11:10 pm

The website is sort of up … in a ver 0.5.

Powered by: Dreamhost
CM by: Wordpress
Gallery by: Gallery2.02
WPTheme: vSlider

* Can upload pictures easily by just “Publishing through XP” plug in … and right through the desktop.
Nifty!

Currently: San Diego is up, and are some of pictures from Vegas.

Further Plans:
[? ] a web2.0 badge?
[? ] email addresses for the family
[? ] customized 404 page, since it is error protected.

Mar
19
2006
10:58 pm

Moral of the story: don’t do anything when you’re tired as hell.

So, the dilemma below is actually solved pretty easily with the following.

1. Download Gallery2 version 2.02
2. Download module: PublishXP from that SAME VERSION.
(where I previously downloaded PublishXP from ver 2.1!!)
3. Delete Gallery2
4. Upload Gallery2
5. Install modules: PublishXP, imageblock, imageframe
6. Delete plugin: WPG2 and re-install, and re-configure.

Mar
19
2006
12:48 am

Getting a good photo gallery up in Word press is a NIGHTMARE.

Gallery2 is probably the only decent alternative.

However, it is ABOMINABLY slow to upload, and unless you’re using something FileZilla, you can actually *lose* files to the upload making the actual script impossible to use. You can imagine how frustrating it is to start searching for those files, then manually uploading it thereafter.

Also, getting some of the modules to work has been an abomination too.

1) I wanted to get publishXP to work so Anita can upload images easily. Turns OUT that it only works with certain modules ALREADY installed … in the 2.1 version. Fine. I upgrade to 2.1

2) THEN when I go to WPG2 plugin, I find out (PULLING HAIR OUT) that it only compatible with gallery 2.0(!).

Dilemma: publishxp very slick … but otherwise cannot integrate it with WP as a plug in which also is driving me batty.

What’s really surprising is that no one has created an easy-plug-in gallery for WP that works really well.

Mar
19
2006
12:39 am

WORDPRESS THEMES
————————–
To muck around with Wordpress themes requires a bit of time and energy, and diligence in looking through the wikis of interest, and just pulling apart a few themes and going to town.

This is a useful site on Wordpress Templates

Basically every theme has a few important template files.? The main one is index.php.? There are others that can be created, to modify the different ‘blocks’ or ‘areas’ in a given wordpress page.? You can see why CSS is important, because each area is a ‘block’ that is identified through CSS.

Through the style sheet you can tell wordpress where to place each block, but also how to style it — text, graphics and so on.

The wiki above is a good place to start.? But the best way to learn it I think is to just pull apart other themes and test it out.

DYNAMIC TEXT REPLACEMENT
————————————

What was interesting was discovering the sIFR technique for improving typography on the web. (Here is the author’s website on it)

Still need to read up on it, but I noticed iwith Alex Allied’s website … they use it there for the typography of headlines. So there’s sIFR, which uses a combination of CSS, Javascript and Flash.

But, there’s also something called Dynamic Text Replacement. Which uses CSS, Javascript and PHP. List Apart has something interesting about it; so does the author himself, with examples.

Mar
13
2006
12:52 am

Normally the process I use to rip DVD’s is to use DVDShrink 3.2 … you can find a copy of it on afterburn.com I think, as it is no longer officially released.

However, some Sony DVD’s have an encryption scheme that DVDShrink is not able to crack. ?

Such as Hitch.

Anyway, to rip Hitch, I had to follow some instructions on Afterburn.com, and basically use another ripper.

As summarized you use another program called DVDFab Decrypter to rip the DVD only (usually DVDShrink does this automatically); then, you use another program called VobBlanker to ‘process this’? … I’m not sure what this means … and then use DVDShrink to re-encode the DVD.

Which worked with Hitch!

Mar
11
2006
12:06 am