Have you ever clicked on your FreePBX link, get prompted for a password, and then sit staring at your browser “connecting to…” your server forever? Restarting Apache doesn’t work, restarting MySQL doesn’t work, even restarting Asterisk doesn’t work. Meanwhile everything else is running just fine, but you need to restart the entire server before FreePBX starts working again.
Continue reading “FreePBX hangs at login”
Early History of Municipality of Maple Ridge with Port Hammond and Haney
The valley of the Fraser River is the bed of an ancient arm of the sea which extended as far inland as Hope. It is to a large extent made up of alluvial deposits, according to Dr. Dawson. The Indians have a very ancient tradition which bears out in a legendary way this more scientific premise. They say that the receding of the sea from this district explains the presence of certain varieties of fish. From Lillooet Lake to the Fraser and from Lillooet River to the Stave River is the district of Maple Ridge, which as the name implies, is a shelf or table-land, declining at the two ends, that occurs in the rise of the land from the Fraser River towards the mountains in the far background. It is the neighboring [sic] Municipality to that of Coquitlam and shares most of the natural features of the latter, but having the advantage of lying considerably higher above the level of the river. Briefly, this is how this part came to be settled:
Continue reading “Early History of Municipality of Maple Ridge with Port Hammond and Haney”
Setting NAS ID on pfSense
pfSense has a captive portal option that allows RADIUS authentication. However, it doesn’t include the option to set the NAS ID of your firewall, instead creating something automatically based on the hostname. Apply these changes (against 1.2.3-RELEASE) to enable a custom NAS ID.
Continue reading “Setting NAS ID on pfSense”
Cisco TAR file format
I needed to upload the device manager HTML files to a Cisco switch separately because I was low on flash space. You can’t download the HTML separately from Cisco (at least not for the 2950 switch I was upgrading) so I had to make the TAR myself.
So I made up a TAR file with the usual tar -cf
command and tried to load it, but got a checksum error:
Loading html.tar PaxHeader/html (unknown file type) -- ignored! %Tar checksum error in ftp://1.2.3.4/html.tar
Turns out that Cisco requires and old format TAR file (compatible with V7 UNIX.) Create the archive with tar -cof
and it will work out.
Using rrdtool with PHP
The PHP interface to rrdtool hasn’t been updated in 5 years and appears to have been deprecated by the developer, who doesn’t provide any documentation for it. Fortunately, there’s no functionality in the extension, so it won’t go out of date as long as the rrdtool library on your system is up to date. I’ve managed to figure out the functions by looking at the source code and thought it might be helpful for someone.
Continue reading “Using rrdtool with PHP”
Using iUI with XHTML
I’m creating an iPhone web application, using the iUI framework to give it a look and feel similar to native iPhone apps.
Easy SVG grid
I needed a grid in the background while I was debugging an SVG image I was creating, something like Photoshop’s transparency grid. Here’s what I did.
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="400"> <defs> <pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"> <rect fill="black" x="0" y="0" width="10" height="10" opacity="0.1"/> <rect fill="white" x="10" y="0" width="10" height="10"/> <rect fill="black" x="10" y="10" width="10" height="10" opacity="0.1"/> <rect fill="white" x="0" y="10" width="10" height="10"/> </pattern> </defs> <rect fill="url(#grid)" x="0" y="0" width="100%" height="100%"/> </svg> |
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="400"> <defs> <pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"> <rect fill="black" x="0" y="0" width="10" height="10" opacity="0.1"/> <rect fill="white" x="10" y="0" width="10" height="10"/> <rect fill="black" x="10" y="10" width="10" height="10" opacity="0.1"/> <rect fill="white" x="0" y="10" width="10" height="10"/> </pattern> </defs> <rect fill="url(#grid)" x="0" y="0" width="100%" height="100%"/> </svg>
“Actual” (apparently) English subtitles
There are hundreds of lists online of “actual English subtitles” from Hong Kong action movies, but only a couple with the movie titles. That sort of thing bugs me, so here’s one more list on the internet that includes the movie titles. Of course, I haven’t seen these movies so the subtitles could still be made up. Who knows?
- “Fatty, you with a thick face have hurt my instep.” 群龍戲鳳 (Pedicab Driver)
- “My daughter is so nice, she knows I love eating chicken ass.” 洪熙官之少林五祖 (The New Legend of Shaolin)
- “Beware! Your bones are going to be disconnected.” 九二神鵰之痴心情長劍 (Savior of the Soul)
- “I scare nothing! Even you become napkins!” 百變星君 (60 Million Dollar Man)
- “Quiet or I’ll blow your throat up!” 亡命鸳鸯 (On the Run)
- “You shot my dicky. You are that cruel!” 擋不住的瘋情 (Don’t Stop My Crazy Love for You)
- “It took my seven digestive pills to dissolve your hairy crab.” 射鵰英雄傳之東成西就 (The Eagle Shooting Heroes)
- “I please your uterus, you kiss my toes. It’s fair” 滅門慘案之孳殺 (Daughter of Darkness)
- “Check if there’s a hole in my underpant?” 俠盜高飛 (Full Contact)
- “Beat him out of recognizable shape!” 警察故事續集 (Police Story 2)
- “That may disarray my intestines.” 東方禿鷹 (Eastern Condors)
- “The bullets inside are very hot. Why do I feel so cold?” 驚天龍虎豹 (Lethal Panther)
- “How can you use my intestines as a gift?” 千人斩 (The Beheaded 1000)
- “I got knife-scars more than the number of your leg’s hair!” 旺角卡門 (As Tears Go By)
- “Take my advice, or I’ll spank you without pants.” 原振俠與衛斯理 (The Seventh Curse)
- “Damn, I’ll burn you into a BBQ chicken!” 香港奇案之吸血貴利王 (The Underground Banker)
- “I am damn unsatisfied to be killed in this way.” 武俠七公主 (Holy Weapon)
PHP 5.3 database connection problems
My database scripts were all hanging after an upgrade from PHP 5.2.8 to 5.3.1 on Windows. Turns out it’s a problem with the new MySQLnd library that doesn’t like IPv6. You need to comment out the line in C:\Windows\system32\drivers\etc\hosts that resolves ::1 to localhost.
Thanks to Corey Gilmore for documenting it; I figure the more people get it online the quicker it will be for people to find it.
You Haven’t Seen __________?
Movies I’d like to see but haven’t yet.
- Dogville
- Zodiac
- City of God
- Last King of Scotland
- Casablanca
- The Man Who Wasn’t There
- Shaun of the Dead
- Spirited Away
- Waltz with Bashir
- Grindhouse
- Closer
- Inglorious Basterds
- Double Indemnity
The New CBC Radio 3
I often listen to CBC Radio 3 at work. Recently they updated their website; while it’s mostly a change for the better (yay, the player doesn’t stop updating!) there were a couple of things bugging me about it. With the old design, you always had access to the player and the main navigation, but now they stay at the top of the page. Not helpful when you’re scrolling through comments and whatnot.
So I wrote a Greasemonkey script that keeps the player and the left navigation bar in place. It also clears out the CBC header at the top, as well as the CBC Radio header that sits below that, for a cleaner page.
Building a 64-bit Firefox on the Mac
With the release of Snow Leopard, Apple is really starting to push 64-bit programs. Firefox is working towards a 64-bit release but even though the bugs are all resolved, it won’t be shipping anytime soon. Here’s what I did to build a 64-bit LLVM version of Firefox. Important warnings follow the list!
Installing Nagios with MacPorts
A few quick notes on steps I took when installing Nagios from MacPorts. Most of this is given to you during the install, but there are a few missing steps that I’ve added here. Continue reading “Installing Nagios with MacPorts”
MacPorts upgrade to mysqlnd
I recently upgraded my MacPorts-based PHP install to 5.3 and thought I’d try out this new mysqlnd client library. Continue reading “MacPorts upgrade to mysqlnd”
WhatsUp Gold mobile interface
I created a mobile interface for this network monitoring software, and have made it available for download here. Below is a copy and paste from the original forum posting:
Working with HTTP_Request
I needed to make a bit of sample code for someone the other day, demonstrating how to log into a website and collect data programatically from PHP. The HTTP_Request PEAR class works fairly well for this; HTTP_Request2 should be a big improvement when it’s finished, as the original is geared toward PHP 4’s abysmal object model.
Continue reading “Working with HTTP_Request”
Donate!
I’ve made a few things that lots of people have found helpful over the years. A few of those people have asked for a button to click on to show their appreciation. Who am I to refuse them?
Making valid CAPTCHAs
The WP-reCAPTCHA plugin is very helpful, providing a way to stop spam comments, and assisting electronic storage of old books. It has as a feature “XHTML compliance,” but at the price of requiring JavaScript from users. I think I can get both.
Continue reading “Making valid CAPTCHAs”
Geography Class!
Click on a county for more information.
Living in Ireland
Or, as they call it in Irish, Éire. Brandi and I moved here in the fall of 2001, looking for a change in our lives, and hopefully some cheap travel opportunities to Europe, Africa, or maybe Iceland.
We came expecting the verdant green “emerald isle” that the tourist board spreads rumours of, but were a bit disappointed, especially by the environmental situation. The Irish people seemed to take their wonderful island for granted, dumping litter by the tonne everywhere, piping raw sewage into the seas, and vomiting on the streets every Friday and Saturday night (this with plenty of help from the British and American tourists.)
Over the last few years, these things have improved dramatically. As part of joining the EU, things like recycling and stronger environmental protection have come into law, and the government now acknowledges that alcohol is a problem in society, especially youth binge drinking. We saw many improvements in the environmental situation just in the first year we were there, such as the plastic bag levy of 15 cents and the immediate impact it had on the amount of litter.
But you can’t judge a country by its “green” cred, or I wouldn’t be much of a fan of my fellow Canadians either. There were, of course, many good things about living in Ireland, and I’d probably go live there again if I had the chance. A lot of people are very friendly. We had complete strangers offer us a room in their house when we first arrived, and were homeless and unemployed. The countryside is very beautiful, once you’re far enough away from the city. Green fields and castles and stuff, just like the tourist board says! The weather is pretty reasonable, despite what the Irish like to think. It’s a lot drier than my hometown of Vancouver, but feels a lot colder because of the ocean winds, which can produce some amazing storms. I did miss summertime though; we barely broke through 20ºC while we were there.
Finding a Job
We had the misfortune of arriving shortly after the terrorist attacks on 11 September, so Brandi wasn’t able to get a job as a travel agent, which she had been in Vancouver. And computer jobs were as scarce there as they were anywhere those days, despite all the rumours of the “Celtic tiger” economy. So after failing to find jobs in Cork, we relucantly moved to Dublin. Brandi found a job within a couple of weeks, working for AOL Europe as a billing administrator. After about a month I got a job as a box packer and paperwork filler-outer at Money Point. Fortunately I got a promotion four days later, after I was found to be one of those invaluable “computer guys.”
The most useful online resources we found for finding jobs were FÁS, the state employment agency, and irishjobs.ie. The other web sites, were largely filled with recruiting agency positions. For the most part, it seemed that recruiting agencies were just posting positions, even if they had been filled months before, just so they could get people signing up with them. The newspapers were likewise filled with a bunch of recruiting agency jobs, and not a lot of real positions.
After getting our jobs, we needed to get PPS numbers from the government. This was pretty painless, aside from the loooong wait in line with all the welfare recipients. We weren’t able to apply for this right away, because we needed proof of residency first, but the sooner you get it the better. Until you provide the number to your employer, you get taxed at the “emergency” rate, which at the time was 20% for the first month and 40% after that!
Finding a Home
Once we found jobs, we needed a place to live. We were in for a bit of a shock. In Cork, we looked at a few places, including a lovely new condo in Cobh, maybe 800 square feet, about 20 metres from the water, for €725. When looking in Dublin, most of the places were a minimum of €800 for a tiny one bedroom. Of course just over the short time we were there, rents continued to skyrocket even higher. If we had decided to go a year or two later it would have been really painful, but prices now (2009) actually seem about the same as when we were there. Anyway, we went through a property management company, because it seemed easier, and ended up paying €1100 for the two bedroom top floor of a 1960’s row house in Sutton (Bayside.) It had no insulation, so was very cold in the winter, but the furniture, carpets, and kitchen were all new, which was nice. Also, it was a 3 minute walk to either the DART station or the coast road, where we could catch the 31B into town. We could have got a cheaper place, but we wanted to be close to town and work. We had been doing hour long commutes back home, and wanted to avoid it in Ireland.
If I were moving back again, I would most definitely try to get one of the newer apartments in the IFSC district. They were a bit pricier, but it’s a 10 minute walk downtown, they’re warmer, and much more modern.
The Utilities
We had to get our own accounts with ESB (electricity), Bord Gáis (gas), and Eircom (telephone.) I don’t know if it’s the standard to have separate gas and electricity, but that’s the way our landlord had his house set up. Everything was billed bi-monthly, which also was strange to us; everything’s monthly in Canada. Prices weren’t too much higher than home, fortunately – phone was about €60, as was gas. Electricity was a bit less, maybe €50.
Most of the setup was pretty painless, but the phone was terrible. It took 9 weeks to get our phone line hooked up. And once it was hooked up, it was not very good quality. It was okay for phone calls, but our dial-up internet connections (which were free, but for the per-minute charges) were painfully slow. Eircom has reasonably priced high speed internet now, but when we were there it was just being introduced and was about €100 a month.
We didn’t have a TV for the first few months we were there, and when we did get one, we didn’t bother getting cable from NTL, Chorus, or Sky. We could pick up the four Irish channels with the antenna
(RTÉ 1 and 2, TV3, and TG4) so that was good enough for us.
Once we had some bills come in the mail, we could open a bank account. Under some very strict laws – which are supposed to prevent money laundering – we had to not only provide identification, but also a reference from a place of employment, and proof of residency in Ireland. We went with AIB just because they were next door to my wife’s job. The other big banks are Bank of Ireland, and Ulster Bank. There are also “building societies,” which are sort of like our credit unions. EBS is the big one, Permanent TSB used to be just TSB (a building society) but then they got bought, and are now a bank.
Keeping Busy
So we only got four channels on TV, our house was freezing, and we had a dodgy internet connection. As you might imagine, we didn’t hang out at home a whole lot, especially in the winter! One thing which I would recommend to any new residents is a trip to Cineworld Dublin on Parnell Street (behind ILAC Centre.) Not that the cinemas are that great (they’re not) but they have a monthly subscription. For €20 a month (we were paying €12 a month!) you can see as many movies as you like. Yes, that’s right, unlimited movies, for the price of 2 regular admissions. I don’t know if this is a normal thing in Europe, but to a North American it’s like finding the holy grail or something. And, if you plan on traveling, it’s good at dozens of Cineworld cinemas in the UK as well.
We also did a lot of walking around our neighbourhood. As I mentioned, we were only a couple of minutes walk from the coast road. A large proportion of Dublin Bay has a seawall with a bike and pedestrian path on it, which we often walked along. Sutton is situated on a thin little isthmus so we could also go north towards the DART station, and get to the sea that way. Sutton Strand was a very beautiful beach, big and sandy, with a lovely view across the water of Portmarnock and their beach (Velvet Strand.) Often we’d walk east along the beach until we got to Howth, where we could buy some fresh fish for dinner at Beshoff’s, walk around the harbour, or just watch the tourists.
Most weekends we’d go into town and do some shopping. We usually avoided shopping on Grafton Street, because of the large crowds and expensive trendy shops. We found Talbot/Henry/Mary/Earl Street (yes, it was all one street, just lots of names) had pretty much everthing we needed: Tesco, Marks and Spencer, Dunne’s (and of course “Mall Mart” – RIP) Sure it was a bit run down at the Talbot Street end, but we’ve got worse here in Vancouver. That’s not to say we never spent time on the south side of the river – I loved walking along the canal on a sunny day. St. Stephen’s Green shopping centre has a lot of stuff, and there were a lot of shops that we frequented down there. And as for shopping, there weren’t a lot of American companies with stores in Ireland; it was nice getting away from The Gap, Starbucks, Levi’s, Nike, and Sony Stores, etc. Although a lot of that’s going to change eventually. Starbucks, for example, invaded in Summer 2005; they now have 25 shops around Dublin alone.
Travel?
As for that traveling I was mentioning, we spent those first 3 weeks in Cork, visited Donegal and Belfast with Brandi’s relatives, saw Waterford and Galway with my dad, and lots of the countryside in between. I saw Wexford by myself, after Brandi had gone home, although I was shown around by one of the locals. We did get to do a bit of traveling outside Ireland while we were there, to Luxor, Egypt; Oslo, Norway; and Edinburgh, Scotland. We didn’t get away as much as we had hoped, due to the high cost of living and all the money we sent home, but it was nice paying 4 cents to go to Oslo!