A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label untested. Show all posts
Showing posts with label untested. Show all posts

How to use Catalyst to automatically create Perl DBIx::Class modules

UNTESTED:

1. install Catalyst

2. pretend like you're going to create a catalyst app

catalyst.pl MyFakeApp

3.

cd MyFakeApp
./script/myfakeapp_create.pl model MyModelName DBIC::Schema \
MyApp::SchemaClass create=static dbi:mysql:... user password


http://search.cpan.org/~rkitover/Catalyst-Model-DBIC-Schema-0.29/lib/Catalys
t/Helper/Model/DBIC/Schema.pm



one I did earlier

perl ./script/tagindexer_create.pl model RequestDB DBIC::Schema
TagIndexer::Schema create=static
'dbi:mysql:database=request;host=[ip address];port=3306' tagindexer
tagindexer

Edit text files on remote linux servers

UNTESTED:

> I've never managed to figure out how to rig up editors to edit
> files on remote servers.

On the server, put this in smb.conf

[homes]
comment = Home Directories
hide dot files = yes
read only = No
browseable = yes


Then in the finder/windows explorer connect to 'smb://hostname/' . Then make an alias to it on your desktop.

Alternatively, TextWrangler on the Mac has an ftp/sftp browser.

http://www.barebones.com/products/TextWrangler/

Apache: make file download instead of appear in browser

(Untested)

## FORCE FILE TO DOWNLOAD INSTEAD OF APPEAR IN BROWSER ###
-> http://www.htaccesselite.com/addtype-addhandler-action-vf6.html
AddType application/octet-stream .mov .mp3 .zip

validating xml files from the command line

It may need to be installed, but it really good at checking encodings, xml schemas etc..

http://xmlsoft.org/xmllint.html

xmllint --valid --noout test.xml

- worked for Rob H.