Script: Wireless Strength Polling/Logging/Graphing

Initially, I wrote this script to give me frequent feedback on the signal strength. This is useful when adjusting antennas to that sweet spot that give stronger signals; especially if you’re testing some homemade tinfoil parabolic reflectors! ;) If you have a portable wireless device, like a netbook, you can ssh into your (wireless) desktop and run wireless-strength to get realtime feedback on adjustments to the access point’s antenna… assuming the connection doesn’t break. :P And, of course, you can just walk around running it on your mobile device to create a kind of wireless heatmap.

If you have gnuplot, you can also generate graphs from the data with ws-plot. This is me walking around my house with my notebook:

I started in my room (40% :( ), which is where the first peak is – near the window. Left my room, back to 40%, peak near window again, then bathroom… 40%. The climb from 40-80% is me walking towards the TV room (PS3 lives in a solid 80% zone, at least!). Walked upstairs, got 100% in most areas (that’s where the Access Point is) – tried a bedroom, dropped to 40%.

Download the scripts and get more details here: https://github.com/izm/wireless-strength

Nerdy Ramblings

This script originated years back, but I recently tried using it on my laptop and it didn’t work! Unacceptable! The original parsed the output of iwconfig. But what showed up as “Quality=30/70″ on my desktop, would show up as “Quality:4″ on my laptop. COMPLETELY DIFFERENT. Even the character after “Quality” was different! o.O The output of iwconfig is driver dependent, which is why I looked to network-manager. I figured there’s probably a nice dbus command I can send to network-manager for that purpose – but I got tired of looking and decided to just parse output again. :/ Luckily, network-manager includes nm-tool. It’s certainly not a clean solution, but it works for now.

I also used updating rewriting the script as an excuse to get better acquainted with git – which I’m really liking.

Every time I do a bash script, I vow to do the next script in Python. I like Python and I don’t like Bash… but there’s a certain… nativeness or dependency-free elegance to bash scripts. Still, I hate writing them, and the next script’s in Python! :P

Theme updates

Made some adjustments to my blog theme.

Old

New

  • search box graphic and placeholder text
  • added jetpack subscriptions module and some css to handle it
  • gave page a max width so it doesn’t look ridiculous on wide screen monitors.
  • sidebar: removed dotted borders added white space, toned down colours – reduced noise
  • Removed grey post-meta-content (categories, tags) boxes. Put all post meta data in TOP, with comments repeated at bottom. (Similar to when I started this theme!)
  • Added hover highlight to gallery images (now consistent with image links not in a gallery). Cleaned up some of the code (to not generate HTML comments) and random fixes here and there.
  • Removed lots of black. Too harsh.

You might have to click refresh. And you might not even notice any changes. :P

Feel free to leave a comment or use Markup to make suggestions. Markup’s a pretty cool tool.

It’s interesting to compare the progression of my themes. Well, interesting for me, at least. :)

I think the next time I decide to work on a theme, I will start from scratch. Clean slate. Make it more consistent with my root page.

On a related note, the latest version of WordPress, 3.3.2, is really nice.

Happy Mother’s Day 2012!

It was Mother’s Day! I love cooking, so I made something special for my mom. Actually, me and 2 of my sisters were the kitchen workers today. I made a salad. So I know my mom likes this shrimp and avocado salad that is served at the restaurant where I went to culinary school. Fine. I’ll make that. Again. At home. For her. :)

This is how it turned out:

This was a sample plate I did. I changed the plating a bit… moved the tomatoes face-down on the cucumbers.. and added a full steamed prawn. But it looked something like this.

It was good! If I were to do it again, I’d play around with the plating some more… and I’d make the balsamic reduction thicker (when I tried to spell “Mom” in cursive on my mom’s plate, it gradually expanded until you couldn’t read it…. >.< ). But it turned out pretty good. But the chive oil… oh man… is it ever perdy. Put it in a custard cup in some good light: sexy.

That other thing in the photo is dry whole wheat pasta – another experiment. ^_^

Happy Mother’s Day!

Dessert

After hurting my shoulder, I had to take a 2 month break from culinary school. Hopefully, I’m fit for the kitchen again, because I go back to school tomorrow. Better start doing more cooking!

Last night, I had company coming that I knew liked dessert. There wasn’t going to be many of us, so I decided to make crème brûlée, a classic French dessert.

Turned out good, but I guess I could have caramelized them a bit more.

Then I had the dilemma of what to do with the egg whites. I’ve seen a few Australian cooking shows recently, and pavlova is something that is always mentioned and held in high regard. So I decided to try it.

I guess it turned out okay. No weeping at the top, but the bottom had a bit of syrup weeping out. I’m thinking it may have been slightly undercooked. It deflated a bit as it was cooling, but that’s normal, apparently.

All pavlova recipes I found on the Internet called for an insane amount of sugar, so I found the most reasonable one and cut it back a bit. Even after cutting the sugar in the recipe, I still found it cloyingly sweet. So for a sauce, I made a tart raspberry and mango coulis. The combination was actually quite good. It should also be served with fresh fruit and some kind of creamy sauce… pastry cream or whipped cream or something. Since we were already having crème brûlé, making a creamy accompaniment wasn’t really appealing to me. Was thinking fried bananas might be nice. Next time.

Gedit 3.2 GDP Completions on Ubuntu 11.10 Oneiric Ocelot

Curiosity gets the best of me sometimes. Okay, most of the time. Did you know GNOME’s text editor, gedit, has a plethora of extensions which can basically transform it into an IDE? Something I’ve always wanted is intellisense-style autocompletion. The closest thing I’ve found for gedit is GDP Completions Plugin in the gedit-developer-plugins package in Ubuntu.

sudo aptitude install gedit-developer-plugins

However, there’s a bug in that package and the popup menu doesn’t actually work. Ctrl + Space is supposed to bring it up. So you want to add the Gedit Developer Plugins PPA and upgrade to the more recent version.

sudo add-apt-repository ppa:user/ppa-name
sudo apt-get update
sudo apt-get upgrade gedit-developer-plugins

If you try to run gedit now, you’ll notice it won’t… run, that is. Great. I know, right? The problem is that the bzr plugin (also included in the gedit-developer-plugins package) is trying to use the gtk2 version of bzr-gtk, but that doesn’t work in the gtk3 gedit. Anyway, you can pull a copy of the gtk3 bazaar plugin into your local bzr plugins directory. (I found this info here). Create ~/.bazaar/plugins/ if it doesn’t exist.

mkdir ~/.bazaar/plugins
cd ~/.bazaar/plugins
bzr branch lp:bzr-gtk/gtk3 gtk

The gedit-developer-plugins package and gedit should work after that! An alternative to the above would be to add a PPA that includes bzr-gtk 3. Not sure if one exists at the moment, but that would be a cleaner solution. And you thought it would be simple. I know I did. :P

It’s not as polished or featured as other implementations, but it’s a good start. Here’s a screenshot after I type os. then hit Ctrl + Space:

Further reading

External tools plugin

Rolling your own gedit 3 plugin

Back to School with Cheesecake

Recently, I’ve been busy for a variety of reasons. The most significant reason? I’ve gone back to school! :o

Shocking, I know. But it’s probably not what you expect. Since April 11th, I’ve been going to culinary school in downtown Vancouver. It’s an 11 block program (each block consists of 4 weeks, so… 44 weeks) – I should be done in February 2012. In addition, I just completed a 4-month stage (unpaid internship) at a hotel. I would go there after class (or before class, depending on the class) about 3 times a week. Lots of getting up early, and some getting home late. It can be tough work. I’ve been physically exhausted. Heck, I’m exhausted, right now. And you know what? I love it. There is something really satisfying about cooking. You produce something you can be proud of in relatively short period of time… and the kitchen can be an exhilarating place to be. I’ve always liked a bit of adrenaline in my life and I guess I didn’t find that in an office environment.

Anyway, I haven’t been taking photos at school. And I should be. So today I took some photos. I’m currently in block 7: baking and pastry. Here are some cheesecakes I decorated today. My partner and I had finished pretty much everything, so we had lots of time to play around. :)

whipped cream rosettes with orange segments and strawberry. Probably should have left the orange bits off the rosettes, but oh well.


rosettes on top of kiwi slices, with strawberry on top of orange segments.


The cheescakes turned out really well. No burning, no cracks (thanks to a sour cream topping), and quite level and smooth. Clean!


Spent way too much time on this, but had a lot of fun doing it. Marzipan pumpkin and chocolate "Booo" leaning on rosettes, Messy spider is 2 strawberries covered in chocolate with marzipan eyes and chocolate disc legs. All on chocolate webbing.

The cheesecakes go for $18. It’s a good deal considering how much cream cheese is in them… each about 750g? But whoever gets that halloween one will have a bunch of chocolate shrapnel when they attempt to cut it. Hah! :)

Attacked and almost robbed

Last night, at about midnight, I was attacked while approaching my parked car at a bus exchange in North Vancouver. I was returning from downtown and was on my way home. I had just got off the bus, walked over to my car, put my bags in my trunk and was unlocking the driver side door when I saw a man approaching me in the parking lot. I didn’t think much of it, I thought he wanted to ask me a question or something. So I just stood there and waited for him to approach me. He yelled something, which I didn’t understand until he said it a few more times, “Give me your shit!” I was totally taken aback. Was this really happening? Is he serious? I noticed he was holding something threateningly in his left hand, thought it might be a chain or something. It was dark and hard to see… and I still couldn’t believe this was happening.

My door was open, but I didn’t let on to that. I lowered my key and tried to talk him out of it, saying it couldn’t end well and stepped cautiously towards him. I may have had my hands up and open. Obviously, he wasn’t a rational person. Even if I did pop my trunk and give him all my stuff, I had no insurance he would leave me alone. I suppose that’s when I decided I would have to defend myself as best I could and find help. He swung his weapon at my head a few times, some of which I managed to block with my arm and sweatshirt. I charged him, knocked him back a bit and retreated to the bus exchange looking for help.

I was being pursued, but I didn’t have have to try very hard to keep a safe distance. As I jogged through the bus exchange, there was a young couple there (waiting for their bus, presumably), no buses, and no authorities. I didn’t really want to bring this lunatic into them, and felt a sense of regret. They cast concerned glances at me and asked if I was alright. The assailant was still a safe distance behind me, ranting and stomping on. That’s when I noticed blood on my hands. I was bleeding? I was aware of a different sensation on left side of my face, but it didn’t hurt. I may have actually said that aloud, both shocked and annoyed, “I’m bleeding?!”

Then I actually got a bit of luck. Nearby, I noticed the police had set up a roadblock, so I ran over there and got help. The assailant was surprisingly cooperative, dropping his weapon, lying down on the ground and putting his hands on his head. I later found out it was a studded belt – I guess he was swinging the clasp at me? He was taken away, would be put in jail for the night (minimum) and be charged with assault and robbery. I was interviewed, the young couple were interviewed, and I got a ride home from the officer. After I was home, I was finally able to see what I looked like.

After cleaning up and sleeping, it looks a bit better. Bit of a shiner, though. :P

Aside from being a little shaken, a couple cuts and welts, I’m okay. I was not robbed. Nobody else got hurt. And I’m thankful that things turned out the way they did, as it could have been much worse. :)

UPDATE 2011/09/04:
The shiner keeps developing. It’s so… colorful! ^_^

GNOME 3.0 Beta v0.0.6 Impressions

GNOME 3.0 is due for release April 16 and I’m pretty excited by it. So I finally decided to check out first-hand how it’s progressing. My perspective is that of a GNOME 2.X user, but like many people, I was a little skeptical of the changes in 3.0. I tried the 0.0.6 image from the GNOME3 website and ran it off the USB key.

The Good

  • It’s pretty. And minimal. Love the new font.
  • High quality and scalable graphics and interface – tried it on both a 10″ netbook and a 23″ monitor with success. Large title bars and close buttons – easy to hit.
  • All the updated core GNOME programs! I especially like the progress with Nautilus, the file manager. Instead of using a status bar, it uses a floating alt-type yellow info box to display info. Plus it seems much faster.
  • Single stroke exposé-like effect that reveals all windows, scaled and tiled. This is bound to the Windows (Super) key, which actually makes it more appropriately named for GNOME3 than any version of Windows. Note: It can also be reached by clicking Activities in the top-left corner. From here, you can use your mouse to switch to a window or quickly close windows, launch/switch-to a program from the left sidebar, or you can start typing a substring of a program to run, or a string to search using wikipedia or google (these options appear after you type something… OR you can browse applications by clicking Applications. Additionally, on the right, you can manage workspaces. With the smart launcher and window manager functionality tied to a single key, I found myself actually starting to heart the windows key and its prime keyboard real estate.

  • Don’t worry, you can still alt-tab! :) And it’s improved, with mouse input, and grouping instances of the same program.

  • Integrated chat with notifications is great.
  • Modal windows are now attached to their parent window (by default, this can be changed).
  • Slick animations with meaning. Like the modal windows that slide out of the parent window’s title bar. I think OSX does something like this….
  • Yelp, the Help browser is about a billion times faster. Seriously. This is largely due to the shift from gecko to webkit, I believe.
  • No more minimize/maximize buttons. At first, I wasn’t sure about this and thought I wouldn’t like it, but the way the new desktop is designed, I don’t miss them. You can add them back, if it’s a concern. And all the old window shortcuts still work: [Alt+F9] = Minimize; both [Alt+F10] and [double-click title bar] = Toggle Maximize; [Alt+right-mouse-button] = window menu.

  • GNOME is just much leaner than it has ever been before. Instead of starting 3 different programs at login (nautilus, gnome-panel, metacity), it simply starts gnome-shell.

The Bad

  • Requires 3D support. Unfortunately, this is not always a simple request for us Linux users. Tried it on my netbook and failed. Couldn’t run it and probably never will thanks to the terribly supported poulsbo integrated graphics.
  • And not just any 3D support… Tried it on my desktop, also with integrated graphics, but a better supported ATI x1250 – performance wasn’t stellar, but it was usable.
  • Not very mature and not very customizable (yet). Panel Applets in prior versions of GNOME are extremely popular. Now we have this huge piece of space we can’t do anything with. But I’m sure something like panel applets will come eventually.
  • It’s really hard to train myself to look to the middle of the top panel for the time/date… I keep looking at the top-right. :P
  • Some of the changes had me fishing for functionality. Like, where is the control-center? It’s not in the Applications list under the Activities window. It’s under the user menu, under System Settings.

    And once you’re in the System Settings, you often want to change many things. At first, I was opening System Settings, selecting a component (they’re called Panels) to adjust (Background, for example), making changes, closing, repeat. When you open a panel from the System Settings window, that panel replaces the contents of the System Settings window. I didn’t notice the All Settings button that replaced the search entry in the dark grey area! After realizing that, it wasn’t so bad. :) And to be honest, I think the theme or something is not quite finished. Looking at other screenshots on the web, the button is much more noticable.

The Ugly

  • BIG change in the way it expects people to use it. This will likely cause lots of frustration.
  • Doesn’t quite seem ready for prime time. I guess that makes sense, it’s still beta.
  • Some odd input lag every now and then. Visual artifacts. For both of these, I point my finger at my integrated graphics. Just a general lack of polish. But that’s to be expected with alpha/beta software.
  • Bold, black window titles with same-colour shadow. Ugh… I expect that will change soon. :)

After trying Shell, I’m actually more excited for it. It still lacks polish in areas, which is expected at this point, but I love the direction GNOME3 is taking GNOME. I’m hoping I can get by on my integrated graphics, but I’m probably willing to purchase a low-end video card to get better performance. Anyway, I’m really interested to see how Canonical’s Unity and GNOME Shell will evolve side by side. Now I have to try Unity, I guess….

Japan Disaster

http://www.boston.com/bigpicture/2011/03/massive_earthquake_hits_japan.html

http://www.boston.com/bigpicture/2011/03/massive_earthquake_hits_japan.html

As you no doubt already know, Japan has been devastated by a monstrous natural disaster. On Thursday March 11th, at 2:46pm, Japan experienced a massive magnitude 9.0 earthquake originating just a few hundred kilometers north-east of Tokyo. The quake caused a giant tsunami which actually caused much more damage than the original earthquake. I’ve been constantly glued to the news.

An effort to summarize some key events follows…

At this time:

  • Over 3000 confirmed dead, many more expected (upwards of 10,000)
  • Thousands still missing
  • Complete cities destroyed, thousands made homeless.
  • A nuclear power plant in Fukushima was damaged from the quake. People near the plant were evacuated and fears of a meltdown are growing as the plant grows more unstable.
  • Aftershocks are expected to continue for months, most recent one was magnitude 6.1.
  • To provide power to the eastern part of the country, all Kanto regions have cycling blackout periods, which apparently also affects hospitals.
  • Food and gas are running out and being rationed. A friend of mine, in an area largely unaffected by the quake and tsunami, says it takes 2-3 hours to get to a gas station.
  • In the areas hit hardest, it has become colder and snow is expected, lowering chances for trapped survivors.

Vivid Images at Boston.com: 1 (source of image above), 2, 3, 4

News Coverage: BBC Live. BBC has been my primary source for the above information.

If you are able, you may want to consider donating to relief efforts. Donate to the Canadian Red Cross. Or, take a look at some other well known charities listed at the CBC.

Japan is special to me. Having lived there for a year, I fondly consider Japan to be a second home. I have many friends and acquaintances in Japan. Fortunately, everyone I’ve contacted, so far, is safe. I still can’t believe the destruction. My heart goes out to all of Japan….

I encourage you to leave links to images, videos, news updates, and corrections in the comments.

Beware of Snoctopus Man

Snoctopus Man says this blog is not dead. …It’s just on holiday.