the fish epic

story of the fish

Archive for the ‘mundane’ Category

Apache with Coldfusion, PHP, and ruby on Ubuntu

without comments

This is for setting up everything to appear under http://localhost/, i.e. http://localhost/phpmyadmin and http://localhost/redmine. I did it “properly” with aliases (mostly) and stuff.

I don’t know if anyone else would want this crazy set up, but here it is for posterity.

First install apache2 with sudo apt-get install apache2. Test it out in http://localhost/. If it says it works, it works.

Download Coldfusion from the Adobe site. MX7 supposedly has kinks with installing on Linux, so get 8 or 9. I’m using 8. chmod u+x the binary and then run it. Follow the prompts and let it configure apache for you; don’t use the standalone server. The standalone server probably eats resources like mad, though I eschewed it mainly for sanity since I wanted apache to do it all. Feels less dirty.

sudo apt-get install php5. Then aptitude search php | grep apache to get the necessary mods if it’s not installed already.

sudo apt-get install ruby rubygems ruby-dev and also look through aptitude for the necessary mod. You need the ruby-dev to install stuff later with gems.

I’ve stuck my project files in my homedir because I prefer easy access from my homedir. Some peeps say this is not as safe, but for local sandboxy development it’s grood.

Now lets install us some gems. sudo gems install passenger come to mind, and install whatever else it says you need. If it installs stuff to your ~/.gem folder because you didn’t call it with sudo, rm -rf .gems and redo it properly this time, you nonce.

Now to put it all together in your /etc/apache2/ confs:

The CF installer should have written something to the httpd.conf. Again, for sanity’s sake, I moved this into its own file in conf-available then symlinked it in conf-enable.

In the now-blank httpd.conf, put in:

LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.15
PassengerRuby /usr/bin/ruby
DirectoryIndex index.phtml index.php index.php3 index.shtml index.html index.htm index.cfm

And rig up the necessary aliases in sites-available/default:

RailsBaseURI /redmine
<Directory "/var/www/redmine/">
        Options Indexes ExecCGI FollowSymLinks
        Options -MultiViews
        AllowOverride all
        Order allow,deny
        Allow from all
</Directory>

Redmine was the only one that I couldn’t get to go just with an alias, so I cheated and symlinked to its ‘public’ directory in /var/www/. I’m not sure why. Ruby had some other fussiness as well. I can’t remember what exactly, though. Just pushed it around until it worked. Look around on google if it gives you error messages; ruby’s good for that. Check stuff inside /var/logs/apache2/error.log to see if you can get more details.

Alias /cf/ and /cf to your coldfusion apps directory. Same goes for your php apps, like my phpmyadmin, which can be symlinked from /etc/phpmyadmin/apache.conf.

Written by Lo Chan

August 30th, 2010 at 12:35 pm

Posted in mundane

Server woes no mo’! Also, horses and bikes, words and diaspora

without comments

Just finished porting over the last of the stuff that was locked in facebook-neverland. <smacks lips>

Brief synopsis: after upgrading to Lucid, my slicehost server went kaput and couldn’t get up for some time. I tried all the pills I could, but finally declared it unrevivable and nuked it. I thought I could export my blog posts from facebook afterwards but noooo… The RSS feed was broken and there was no guarantee that it would ever come back for the handful of us who care enough to want it. So it was manual copy+paste for the 40 or so posts stuck in facebook neverland.

BUT NOW

WordPress is up running this blog, tracks is up on a subdomain, and squid3 is making life easier at work too!

The main problem I had with tracks today were goofs… First I used the wrong password in database.yml, then I told lighttpd to look for dispatch.fcgi in the wrong place. BUT NOW everything is working and I can start focusing on getting the WP theme to not suck.


W is a sweet boy of six years, which is about 13 or 14 years in human years. He’s quite a dear for trying to rub me off on trees, but otherwise he was fairly laid back and would have to be pushed quite a bit to get up to a good speed. P is the opposite. The chubby girl was raring to go at every chance, and barely needed a nudge to take me on a short canter. Freaked out our hosts. They kept saying I did good.

The part that surprised me was how much Papa knew about horses. Over dinner one night he rambled off all sorts of breeds from around the world, who raced in what races, what awaits a horse when he comes of age… I think I’ve found that bond I need with my father, at last. I wager he’s probably a better rider than I.

I’ve also started riding my bicycle again. It was spurred on by the need to get better at it for my 101 pledge, and again by the peeps who got me into motorcycles. M is en route to getting his motorcycle already and soon I’ll get my gear as well, so I can ride safely on his bike. I wanted to get licensed myself this summer but there isn’t enough time. So I just got a new pedal-bike. Good enough. <rubs hands together>


I started writing on 750words as much as I could to get my writing going again. It’s fun, almost obsessive-compulsive. (Gotta ollect all them badges!) I’ve been griping about not creating enough recently—I’m reading tons of blogs, too many perhaps, and am immersed in social media stuff, again too much perhaps—so the free-writing opportunity was a great place to kick that.

The content of that isn’t too different from my other writing, but I do tend to self-edit more here than there. It’s almost difficult for me to not self-edit as I write. I’m not used to the mechanism of simply writing… it seems the voices in my head quiet down when the spotlight is shone on them.

Anyway, I feel I’m off balance again. Too much consuming not enough creating. I need to rein in from the diaspora.

Not to be confused with the Diaspora, of which I am lucky to backer (albeit a minor one).

I am also a backer of Am I Broken?

I am also loving education blogs. I might become an educator some day, though right now I oughta focus on becoming a shrink.

Right now right now I oughta go to bed…

Written by Lo Chan

July 7th, 2010 at 10:30 pm

Oh, stupid me

without comments

Being forced to go through old blog posts has its perks. Such as: gives me the chance to correct myself.

In The True Cost of Things, I compared American Express (credit card company) with banks; huge commitment of fallacy!

Written by Lo Chan

June 23rd, 2010 at 5:12 pm

Posted in mundane

ColdFusion, apache, virtualbox shared setup

without comments

My setup is super hackery and isn’t necessary unless your VPN provider sucks and only supports Windows. Do not do try this at home without adult supervision.

Preamble: I have an ubuntu host and a Windows XP virtual machine. I prefer doing most of my development in linux and it works out OK when I’m physically connected to the work network, but because a) I’m too lazy to copy over the MS SQL Server database to work locally somehow and 2) I don’t have a linux VPN client I have to do pretty much everything through VirtualBox. That is the way of the world. So here’s what I do—I can think of only one other person who might want this, but I’ll jot this down for posterity anyway:

1) Make everything work in ubuntu first—get all the needed tools (git, vim, etc.) and mappings in CFIDE working. Installing ColdFusion 8+ with Apache2 in ubuntu is a piece of cake nowadays.

1a) Little quirky step that’s just for me: symlink ~/Public to /var/www so I can do my development all inside my homedir.

2) Share ~/Public with the Windows virtual machine.

3) Install all the necessary tools in the Windows VM: git, vim, xampp, and ColdFusion. Make CF use Apache instead of the standalone server.

4) Fix up apache’s conf to include the UNC path (//vboxsvr/public) as an alias (to /public)

5) Map everything in CF Administrator with the UNC path, NOT THE MOUNTED PATH, FOR THE LOVE OF GOD.

Written by Lo Chan

June 21st, 2010 at 10:39 pm

Posted in mundane

Tagged with , , ,

git woe: git checkout not resetting my file?!

without comments

Jotting this down for posterity:

If I want to add a file to the index to be committed and then don’t commit it, and then want to pull a newer version of the file from remote, well uh, I can’t do that. Git will say “you have changes to this file that you didn’t commit! commit or stash it first plz.”

Do: git reset HEAD and unstage the file.

Don’t: git checkout over and over and hit the return carriage with rage because it doesn’t really fix anything.

Written by Lo Chan

June 18th, 2010 at 6:26 pm

Posted in mundane

Tagged with

Technojoy

without comments

Survived my first WordPress “Blank Screen of Death” last night. Source? I goofed and did chmod 600 wp-config.php but did not chown it to www-data. Durr. Hint was from Colin McNulty’s blog where I figured out pretty fast that I did something bad to my config file.

Still not sure why I had to chown the wp-content directory to make auto-updates work, though. Everything got chgrp‘d to www-data and g+w was on wp-content.

Also, I need to fix the css bits for code.

Written by Lo Chan

June 16th, 2010 at 10:06 am

Posted in mundane

Tagged with

Life’s mysteries of this morning

without comments

Moments ago I took a few hot items out of the dryer (draping them around me, enjoying the crisp hot clean linens, mmm yes) and then restarted it with some dampish things left inside. Moments later it stopped. That was fast. I got up to check on it (procrastinating about work) and found the dryer door open, two socks neatly tumbled out onto the surface below. I guess that’s an automatic feature I never noticed, or I checked on it so absent-mindedly that I didn’t even remember it. The socks are warmish instead of hot now. Hmm.

Moments later I went to switch off the bathroom light and found a red bump on the bridge of my nose. Yesterday I thought it was a pimple. Upon closer inspection it is in fact a series of three small scratches, two of which have scabbed over. If I got punched when wearing glasses it would be obvious, but I did not get punched and I don’t wear glasses.

Written by Lo Chan

March 24th, 2010 at 8:29 am

Posted in mundane

The Scattering

with one comment

Following a period of mindfulness and intention, lately I’ve been faffing about in a lot of social media apps that I half-shunned previously (namely foursquare, tumblr, facebook too in small amounts) and I’ve also changed my work email notifications back on.

I call this “The Scattering.” which is both a reference to the period of chaos and unrest in Frank Herbert’s Dune saga following Leto’s death, and to the sort of energy I’m feeling at the moment. There’s a number of ways I could look at this but essentially I got some pent up creativity that I wanted to release. Hmm!

Some of it got turned into undesired outcomes, such as checking out an old facebook app. Some of it was fruitful, using tumblr to collect things from various corners of the web. Some of it I’m still ambivalent about, like “playing” foursquare.

Time to hone it all back down to essentials though. It’s a bit messy using identi.ca/twitter, AND a tumblelog, AND a blog. Deciding what content falls into where is a bit hazy for me. I also share articles with Google Reader, which overlaps with the tumblelog but feedly seriously lacks with the distinguishing-by-type bit.

Or do I even need that at all?

Email notifications are sort of essential when I work at home, though now that my boss got me a cellphone I could probably safely turn it back off.

Hmm!

Written by Lo Chan

March 22nd, 2010 at 9:31 pm

Posted in mundane

My movie rant of the year

without comments

I have a bunch of these cheap movie tickets that I bought from a friend, so I am watching more movies in cinemas than usual, which is something I am growing to dread.

The most recent film I saw was Percy Jackson and the Olympians: the Lightning Thief, toted by many reviewers so far as a Harry Potter knock-off — both feature a teenager with hitherto-unknown special powers, both are awkwardly going through puberty, both are composed of many books, each of which describe one year of the protagonist’s growth.

The comparison pretty much breaks down here. Why? Because Percy Jackson… really doesn’t compare to the world created by J. K. Rowling.

Roger Ebert once described a poor movie by its “clangs” — when a film asks for one too many suspensions of disbelief due to shitty scripting or acting or sometimes, as in this case, when the plot holes gape so wide they threaten to swallow Poseidon’s fat mother whole:

  • Why are all the demigods trained only in combat? No “Athena’s school of battle strategy”? What about Aphrodite’s partyin’ sorority girls — do they fight in steel-plated bikini? Why are sons of Hephaestus fighting instead of manning the smith? What about something along the lines of, oh, Percy naming the seven seas over which his father is dominion? Gee, all the power and might of the Greek gods have just been flattened to a single-dimensional group of teenagers with a single skill-set — how to play capture the flag while waving swords, sitting in leather armour.
  • The armour and weaponry need a bit upgrading, methinks. Leather’s pretty crap unless it’s magically imbued. Magically imbued cloth armour would probably provide better resistance. And probably make them blend in a bit better with the rest of society.
  • Okay, I get that the children of the gods are supposed to have superpowers related to their parent, and I’ll look aside the fact that nowhere in the old myths were there any suggestion of demigod heroes having any fancy powers like… spontaneous healing, or manipulation of water. I’ll suspend that. But why on earth do they have to like the stuff that their parents liked? How many of us like the stuff that our parents liked? Bellbottoms… no. Celine Dion… no. Affinity for the stuff, yes, but there was not a single character in Percy that deviated from that. It was all… mother’s Demeter? Ok grass sod roof. Dad’s Hermes? Ok thief. Mother’s Athena? Architect prodigy. Right.
  • There is strong evidence supporting the theory that brains are not “hardwired” for languages. All the teenage demigods having “dyslexia” because they’re all “hardwired for ancient Greek” reeks of the author shoehorning something in without doing his homework.
  • Where are the adult demigods? Why are all the important demigods annoying teenagers? Their existence was sort of alluded to, and they’re all off doing important things, but the world coming to an end and they’re sitting around doing fuck-all. Clang.
  • What about new gods? Given the prolific pantheon created in the first couple hundred years of its inception, I doubt the gods have stopped shagging each other in their free time. I mean, they had this serious-sounding pact to not procreate and two of them still broke it within years. At this rate they must have created at least a dozen new full-fledged gods.
  • What about demigods from other countries? Why not, you know, Greece, or is that too obvious? Why’s their stronghold in the fucking United States? Surely places under less scrutiny, such as, say China, are pretty sweet breeding ground for all sorts of wacky stuff. Here’s a brilliant chance for the author to show off any trace of worldliness that isn’t so typical of North American culture, and he did fuck-all with it.

As someone who’s tried to create worlds, I have boundless respect for Rowling’s nice, thoughtful fantastical world requiring really only a single suspension of disbelief: “normal folks lack some special likely-genetically-linked trait and would never see magic”. Most everything is built from that premise and it never really falls apart. Rowling’s no Frank Herbert, but her stuff’s pretty good. Her characters grew from the world. In contrast, the story of Percy Jackson can be told with their magical abilities substituted with, say, special gun abilities. The story would still, basically, work. Sometimes that’s the mark of an immature world, sometimes it’s shitty character development. In Percy’s case, it’s a bit of both.

Don’t get me wrong — I totally admire the effort that’s gone into writing the Percy series (here’s me, who’s never written anything longer than a 10-page short story), and I love me my Greek mythical stories so this was a great refresher. Modernifying Greek myths isn’t easy. But for the love of… Zeus, don’t compare it to Harry Potter. Harry’s actually a pretty decent piece of contemporary literature that dares to explore the darker sides of adolescence and humanity in general, not some fluffy bedtime stories that was ad libbed and then made into a movie.

The only reason I enjoyed it in the theatre was because there was no one telling me they were sure I would love it. Which brings me to the next object of my wrath: Avatar.

Just about everyone who’s seen the movie before me told me not only that it was amazing and awesome and groundbreaking but that I would certainly love it. Usually when this happens alarm bells go off in my head (unless it was a film made by Pixar), but I’m sure my prejudice was only part of the reason I came out seething with more hatred for James Cameron than ever.

Let’s get the good stuff out of the way. I liked the 3D effects. The planet Pandora looked pretty, ooh, ahh. My puny brain appreciates the greatness of the technology. Ok, let’s move on then…

  • American army type people being the ugly bullies are a yawn. Tell me something new. And not real.
  • The evolutionary biologist in me screams for an explanation as to why the whole world of Pandora turns into a Dance Dance Revolution gamepad at night. Yes it’s pretty. But why? What advantage does it serve itself, or Eywa? To be frank, this is a small clang that I could’ve ignored if only they didn’t try to stuff science into everything else. Neurons in plant matter? Connected to everything so organisms can potentially upload their memory and communicate to each other? Seriously neat stuff! But DDR? Clang.
  • Eywa being the mother goddess thing was really cool up until it was revealed that she was real. Then it was only sort of cool, because that is awfully simplistic. Basically Eywa is what us hippies already believe in, except concretified on a different world and given a different name. That’s just fucking plagiarism.

The plot was pretty shallow, but that’s not the worst part. What I hate is the fact people love this shallow, unchallenging movie and call it “deep” and “revolutionary.” Disney is not revolutionary. James Cameron retold a story already retold by Walt DIsney, except he didn’t even have the balls to kill off the main guy at the end. Oh and the morons who want to kill themselves so they might reincarnate on Pandora? How about they open their fucking eyes and look at this beautiful world?

For bonus points, read Charlie Stross’ Star Trek-hatin’ explanation and you’ll see why I hold Frank Herbert and G. R. R. Martin and such high regard.

Written by Lo Chan

March 15th, 2010 at 1:13 am

Posted in mundane

Halcyon on and on

without comments

The day after we arrived at M’s mum’s house the tension was thicker than the sweetest oxygen. I left the room crying on Christmas morning. After that, I kept my head low and dared not speak unless spoken to.

The same thing happened last Christmas too, M’s mum confided later, and she was the one who left crying. She went shopping for hours afterward so she might heal. So this year’s impulse for a getaway, though sudden, made all the sense in the world.

Five of us crammed into M’s car and drove to the hot springs nearby — we are quite lucky to be near so many here — and we soaked for several hours in the sulphurous pools. It was good to float. (Well, I tended more to sink.) I love water. I suspect I would wilt and die if I could not live near a large body of water.

I could scratch off this item on the list but, to be frank, I was a little disappointed. The hot springs I grew up knowing about were not mere swimming pools filled with steamy hot water that smelt funny. In the manga I read as I was growing up the hot springs had stone steps and stone walls and was mostly a wild place, except for the little bathhouse that neatly blocks its entryway. There were no spas or restaurants that gouge you simply because there’s nothing else within reasonable driving distance.

So I’m amending this goal to be “visit a (more) natural hot spring” because damn, this kinda sucked.

Written by Lo Chan

January 1st, 2010 at 1:49 pm

Posted in mundane