Archive for the ‘Everything Else’ Category

March 5 2010 Photography Update

So I haven’t put up any photos in a while. I’ve been on a bit of a dry spell, but I went through my archives and pulled out some that I think were better. Comments, as always, are welcome and encouraged.

Next Monday, I have an interesting post for all of you with iPhones. One thing I really like about the iPhone is that I don’t have to delete text messages. I have a quick and free way for you to back up all of your text messages to read later on. There’s a lot of paid services out there to do it, but you don’t have to pay anyone for this quick-and-easy trick!

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit

ViM Made Easy – Part 1

Well, after the massive spike in traffic to my site after writing the blog post on GNU Screen and Byobu Made Easy, I decided to do another quick tutorial on another Linux command-line tool, ViM. ViM, or “Vi Improved”, is a command-line editor that has been around since the dawn of Linux command lines, and is deceivingly powerful. Although we won’t get into the more powerful parts of the program today, stay tuned for some power tips later.

Now, anyone that has been around two or more Linux command-line junkies I’m sure has heard the Emacs vs. ViM argument at some point. Regardless of which one you like, they’re both great editors. Give them both a shot and choose your favourite.

ViM Overview

Vim can be very overwhelming to start off on, but is great once you get used to it. When you first open ViM, you will be presented with a blank document and you will be in Normal mode (see below). Soon, we will be able to start writing text, undoing a mistake, perform cuts, copies, and pastes, as well as some search-and-replace.

A quick note that almost everything is case-sensitive!

Program Modes

There are six main program modes in ViM, listed below. We will only cover three of them in this tutorial for the time being.

  • Normal Mode. This is where you type all of your commands, typically to move into one of the other modes.
  • Insert Mode. Here is where you’ll actually type text into your document.
  • Visual Mode. Visual mode is mainly used for yanking (copying) and deleting (cutting). Although it can do more than this, we’ll focus on these for now.
  • Select Mode. Similar to Visual mode, Select mode is typically used for deleting a selection of text and immediately typing over top of it.
  • Command-Line Mode. This is where you type your commands, such as saving, searching (and replacing), and the ability to edit ViM’s options.
  • Ex Mode. All-in-all, this is pretty much command-line mode, except after typing a command you end up staying in command-line mode instead of reverting back to Normal mode.

Let’s Write Something!

You’ve just opened up ViM, but every time you try to type text, nothing seems to happen? What gives?! Well, right now you’re in Normal mode, and ViM is waiting for an instruction. In order to start typing text, just type “i” (for “Insert”) or “a” (for “Append”). The Append mode will move your cursor one character forward before you can type, so keep note of that. After you’re finished typing what you want, just hit Escape to get back into Normal mode.

Let’s say, that you just wrote “ViM is awesome!” in your spiffy new document, but saying it once just isn’t enough! You want to say it over and over again, but typing it out so many times just seems like a waste, doesn’t it? Time to go into Visual mode! Move your cursor to the beginning of your text using the cursors, then type “v” (lower-case). This puts you into Character-Select Visual mode. Move your cursor to the end of the text, and press “y” (for “Yank”), which copies the text into it’s built-in clipboard. Move your cursor to where you want to paste, and type “p” (for “Paste”). Note that “P” will paste BEFORE your cursor, so keep that in mind.

Fixing Screw-ups

Whoops! You pasted it one-too-many times, or you pasted it in the wrong spot! Never fear, the Undo tool is here! Make sure you’re in Normal mode (just hit Escape if you’re not sure), and press “u” (for “Undo”).

What if, for example, you ended up typing “ViM is awsemoe!” (hey, your fingers got tied up; it happens). It doesn’t make sense to undo all of that, so let’s just do a search-and-replace. Go into normal mode and type “:%s/awsemoe!/awesome!”, then hit enter. Poof! Problem solved! I’ll discuss the search-replace a bit more in the cheat sheet. If you just want to search for text, type “/your-text-here” in Normal mode, then hit enter. “n” will move you forward through all the findings, and “N” will move you backwards.

Saving and Exiting

Saving and exiting is really easy. “:w myfile.txt” will write the file to myfile.txt. If you opened an existing file, you don’t need the file name, so “:w” is all you need. To do a save and quit at the same time, type “:wq”.

What if you want to quit but don’t save your changes? The best way to do this is “:q!”, which will quit without heeding any warnings about the file not being saved.

Command Quick-Review

- a - Append
- i - Insert
- /<your-text-here> - Search for <your-text-here>. Does NOT use regular
  expressions
- dd - Delete the entire line that your cursor is on
- x - Delete the character your cursor is hovering on.
- :42 - Move to line 42
- G - Go to the last line in the document
- :s%/<search>/<replace> - Regular expression-compatible search-replace.
    - :s/<search>/<replace>/g - Same as above, except replaces everything on a
      single line. Remove the "g" to replace only the first occurrance.
    - :s42/<search>/<replace>/g - Same as above, except replace on line 42.
- V - Line-select Visual mode
- v - Character-select Visual mode
    - y - Copy (yank) the selected text
    - d - Delete the selected text
- :w - Write the file to disk
- :wq - Write and quit
- :q - Quit
- :q! - Quit without saving

Hopefully those that are starting out on Linux will find this useful. I plan on going in to greater depth in the near future, so stay tuned for that. If you like this article, I’d love for you to Digg or Reddit this page below. It’s such a great feeling when your traffic spikes to 1000 hits in a day. And, for those Emacs lovers, I’ll be doing an Emacs writeup as well.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit

I’m Back

Well, it’s been a while since I’ve posted; about three weeks, actually. To the one or two readers I have, my apologies that you don’t have something to waste your time on twice per week. I’m getting back into the writing mood, so I should be building up a buffer of things to write in the near future.

A lot has happened since I last talked about the IPAM presentation that I took part in. To start with the related topic, I was approached to do the presentation again, this time internally to other departments. Thus, the other co-op student and I set about cleaning up the presentation a bit, fixing some errors, and making it flow smoother. It went much better the second time, thankfully, both from a public speaking perspective and a demonstration perspective. As fun as it was to work on that, I’m glad it’s over and done with right now.

Speaking of work, the number of days that I have left at IPC are dwindling quickly as the new year approaches. I work until December 31st, at which point I’m back in class. It’s been a fun past couple of months, and the paychecks have been very nice, but I’m also looking forward to getting back on campus to get some more studying done. I’ve decided that I won’t get a job during the winter semester so I can concentrate on my studying; I’ll have more than enough money to get through four months, and then I’ll be working in the summer again.

After that presentation was done with at work, I found that I had a fair amount of spare time, as there weren’t too many tasks to work on. I spent that time learning Ruby on Rails, and putting that knowledge towards the new UMSwing site. Although on the outside it will look almost the same as before, this new site will have an extensive backend that will make UMSwing virtually paperless. Although you may not think we use that much paper, think again; I have a full 3″ 3-ring binder in our office that says otherwise. All of our memberships, attendance, and transactions will be tracked on the web application, thus eliminating the need for those pieces of paper to be printed in the first place. Anyways, I’ve been working very hard on the site, and it’s almost ready to be tested by some other people. So, if you’re interested in testing some software for an eco-friendly cause, let me know in the comments section and I’ll keep you informed.

That’s a quick update on what’s happened in the past few weeks at work. I have a few more updates to spew out in the coming days, one of them involving my server upgrade (*cough* RAID *cough*), and some involving some extra-curricular activities (including some new photos to go up soon).

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit

A Busy Past Two Weeks

So my twice-per-week updates seem to have fallen a bit behind as of late. To those one or two dedicated readers, my apologies for not giving you something to burn a couple minutes from your day with.

I have three culprits to lay the blame for this lack of updates. One of those has been a savage case of writer’s block. Another of those has been a very busy schedule for me. Busier than normal, even. As such, the third and final culprit goes by the name of “Sleep Deprivation”, which always seems to tag along with culprit number two. In a possibly vain attempt to get myself back on my writing pedestal, I figured I’d fill you all in about the past two weeks.

As those of you who are involved in the Winnipeg swing scene may know, UMSwing had two events to demo at last weekend, the first being the Gilbert & Sullivan Gala Fund-raiser, and the second being the Winnipeg Jazz Orchestra’s performance. The fund-raiser involved a couple of demonstration songs, and the WJO performance involved dancing for 20 minutes during their intermission, as well as the opportunity for one or two couples to dance on stage during one of their songs. Although they took place over the weekend, I’ve been in talks with organizers of both events for quite some time, and the last week became crunch time for me as I made sure everything went as expected. I’m really glad that we were invited to both events, and we’d certainly be interested in doing it again.

To swing (no pun intended) from one quirky interest to another, this Wednesday a couple of us took advantage of the day off and planned for a session of Dungeons & Dragons. I need to take a minute here to explain this:

  • No, it did NOT die out ten years ago
  • Yes, it IS fun
  • No, you do NOT need to be an über-nerd to play
  • Yes, girls DO play it.

Anyway, in this group (which has yet to receive a name), I am the DM; I’m the one who tells the story, plays the non-player characters (NPCs), and guides the other players through their adventures. Although very fun to DM, it also requires a lot of work to create your own adventures; dungeons, the global map, encounters, and NPCs all need to be planned. Thus, that chewed through a fair amount of spare time that I had. On the plus side, I over-prepared, so I have everything I need for the next time around.

This weekend, I have plans to go out to a friend’s cottage for some much-needed rest. It’ll be nice to get away from it all, and hopefully take some great photos, which I hope to put up for Monday’s post. I also have some ideas for another Linux command line tip, so those of you reading my previous post regarding Byobu: stay tuned.

“I’ve never seen you here before. I like that in a woman.”
– Renaldo ‘The Heel’, Crimewave (1985)

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit

Oct. 24 Photography Update

Now that I’ve been taking more photos recently, I’m getting into the habit of posting them up a little more frequently. Rest assured, I’ll keep you all updated when I put up new photos. If you want to take a look at some of my other photos, just head to the gallery.

As always, I welcome your feedback; just post a comment below!

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit

Have Air Miles, Will Donate To Charity

I’m sure many of you collect some sort of rewards on a reward program, be it Aeroplan or Air Miles, or some other similar program. Myself, I’m an Air Miles person, and a lot of that has to do with the really good deal that I get for Safeway prescriptions.

But I digest ;)

While casually browsing the rewards catalog online, I was going through the gift cards and subscriptions. I happened to notice a new section for charities. Under there, you have redeem 170 Air Miles to donate $20 to one of three charities: Kids Help Phone, Special Olympics Canada, and the World Wildlife Fund. Unfortunately, Air Miles has yet to add any more charities, but I sincerely hope that they add more than those three. I’ve made a firm decision to redeem a donation for every item I redeem on there.

I’ve never seen this on a rewards site, and I think it’s a great thing to do. Think about how many reward miles you have. When was the last time you redeemed them? Do you think you could spare a few to help a good cause? I hope the answer is yes. Some people don’t donate to charities because they can’t afford it. Now that you can use Air Miles, this should make things a little easier. Alternatively, redeem a gift certificate somewhere you would normally shop, and use the saved money to a charity of your choice. Either way, it’s a free donation.

Just a little food for thought.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit

Finding the IIS FTP Vulnerability

On September 1st, Microsoft released a security advisory regarding an exploit that was discovered in their IIS FTP service, which you can find here. In short, the vulnerability allowed servers which allowed anonymous write access to be compromised.

Opening up my email, I notice the vulnerability in my inbox, and a message attached asking me to find all the servers in the government which might be vulnerable to this exploit. Now, as you can imagine, it’s not like there’s 50 servers in the government. This isn’t a situation where you go to each server manually and check for the vulnerability. This worked out to be a perfect situation to use nmap.

Nmap, as I had mentioned last post, is a security scanner. It’s powerful: really, REALLY powerful. There’s so many command line switches that they have to use two characters for a lot of them, and they’re case sensitive as well. To top it all off, it also provides scripting support. In layman’s terms, you tell it to jump, and it asks you how high, how many flips it should do, what music should be playing in the background, and what the acrobat’s costumes should look like. You get the picture.

Anyways, the task was put before me to determine which servers were vulnerable, and how many FTP services could simply be turned off. After acquiring a list of IP addresses of assets, I sorted the list, changed each IP to refer to the class C subnet (255.255.255.0 or /24), and remove duplicates. I then came up with a list of IPs which had an FTP service. Some had closed ports, and others were filtered. Some of them were also open. A few quick grep commands and I had narrowed down the list to open Windows boxes. Below, I have the nmap command that I used to find all the servers with FTP running on them. I’d be curious to see if anyone has come up with a similar command that might be useful for this same purpose, and where improvements can be made.

./nmap -T4 -PS21 -p21 -O --max-rtt-timeout 200 --initial-rtt-timeout 150 --min-hostgroup 100 -oG /tmp/WindowsFTP.grep -iL ../WindowsServers24

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit

Upcoming Swing Events

For this Monday’s blog post, I’d like to stray a little from my typical technology discussions and focus on something far from that: dance. Not just any kind of dance, though. I’d like to quickly discuss swing dancing.

This might seem like an odd topic for a geek to discuss. After all, I’m supposed to be glued to my computer, make obtuse references to nerdy shows and movies, and have a natural inability to talk to women. While all of the above may or may not be true (heh), I also found myself two years ago to have an interest in swing dancing, thanks to a friend who convinced me to go to the University of Manitoba Swing Dance Club (UMSwing) open house (thanks Jacklynn!). Although initially I didn’t think I would enjoy it that much, I found myself addicted by the end of that open house, and walked out that night with a full membership. I’m still shocked that I’m even capable of dancing, but regardless, it’s a great way to get some exercise, meet new people, and get out of the house.

Two years later, and I’m on the executive committee for UMSwing as their omnipotent web administrator. I’ve met a lot of great people through the club, and by being on the executive committee, I can hopefully give back to a club which has helped me a lot. One of the events that is happening in just over a week is this semester’s open house, which I will be MCing. The club puts on one open house per semester, usually within the first few weeks. We pride ourselves on being able to teach anybody to dance, regardless of skill level. You don’t need to bring a partner to dance with, and you don’t need experience. We do some demos, teach you basic Jive, and do some social dancing. Oh yeah, and there’s a bunch of prizes that we will give away.

So, if you have nothing to do that night, come out and enjoy yourself.

UMSwing’s classes tend to be geared towards beginner swing dance. If you happen to have swing experience, HepCat Studio is a swing studio that is starting up today at 6:00pm. The first class today is free, and they will teach both beginner and intermediate swing dancing. You can find their website over at http://www.winnipegswing.com.

So, I will continue with random technological rants and whatnot next Friday. Methinks that my next post will probably discuss my upcoming server build and the parts involved. Although I had posted on it a while back, I’ve solidified my decisions for the next server incarnation. It will be awesome. Very, very awesome.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit

Car Upgrades, Pt. 3

In the last part on my series of upgrades I will be doing to my car, I thought I’d focus a little bit (although not entirely) on the electrical components in my car. As you may remember in the first part, I talked about the sound system I put in my car and the homebrew neon lighting I tried out. In the second part, I mentioned the neon upgrades and the paint job that I was toying around with.

Although I already did accent lighting, I’d like to look at expanding it a little more. I had previously mentioned that I was going to add more neon lighting, but I’m also going to look into lighting up the running boards. Although my car is a red/maroon and my neon lighting is blue, I think I’m going to go with red LEDs along the boards; red and blue accent lighting together should look pretty nice. Since LEDs tend to run at an optimum voltage of 2.5 volts, I can get about 5 in every series, since a car runs on 12 volts. I’d like those to turn on when the doors open. Since they will be wired in with the door light, I can force them to turn on just like if I wanted the door light to turn on. I would also like to replace the door light, glove compartment light, and dashboard lights with LEDs (blue, white, and white respectively).

For exterior lighting, I’d like to also replace those with LED lights. They’re much brighter than conventional bulbs and use less electricity, which in turn improves fuel efficiency. Although I’m not sure about the headlights, I’m sure I can replace all of the other bulbs, and potentially make the enclosures clear, since the bulbs will be colored the proper colors. I’d like to get nice headlights as well, but I don’t know if they’re available for my car. But, if I can find ones that fit, I can take them out when I get a new car, and if they don’t fit I can sell them and get part of my money back since they last forever.

The last thing I’d like to look into is redoing the upholstery. The seats are boring and bland, but the front ones are an irregular shape, which may make finding seat covers difficult. I already found a faux-leather seat cover for the back bench seat which will look nice, and I also picked out black-with-red seat covers for the front seat, pending that they’ll actually fit. If it proves to be difficult, I might end up doing alterations to them with a sewing machine.

And thus completes my plans for my car. Since it didn’t cost me anything and it’s not exactly new, I think it’s a reasonable time to try a few things out and see what works and what doesn’t. That way, when I get a nice car, I can do some customization on it and not be worried about destroying something.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit

Technical Difficulties

So, I’ve had quite a string of bad luck with technology as of late. One incident involved my personal server at home, and the other involved my website.

I spend quite a bit of time on the bus for getting around, mainly because the places I need to get to the most have pretty good service, and also because the price of gasoline is atrocious. Because I spend so much time on the bus, I want to be able to use my time to accomplish something. Although I sometimes use the time to study, I also have used the time for writing on my blog. Sometimes an event inspires writing, and I’d rather start brainstorming immediately than forget what happened.

A few days ago I happened to be writing about the great weather (sounds boring, I know – more on that later), and I wanted to upload the draft on to the blog. Unfortunately, during that process I lost all of my work. Annoyed, I started to rewrite the post, only for it to happen a second time. Those of you who are sharper than normal may have noticed the lack of a post this past Monday; that’s why.

When I got home that same day, which happened to be a scorcher of a day, my mother suggested I move my server into another room for the summer. Normally I would ignore anything my mother says about computers, but she raised a valid point about cutting down the temperature in my room. With all the gear running in my room, namely a desktop, server, network switch, TV, and home theatre system, my room is hot in the dead of winter. You can imagine how hot it gets in my west-facing room during the summer.

After finding a suitable spot in the adjacent room, I powered up my server and hooked it up to the network. When I tried to access the server after booting up, I couldn’t. A quick look at the network switch told me the network connection wasn’t working. My geek instinct kicked in, and I started trying to figure out the problem. I was worried I had damaged my server while moving it, since I plugged the network cable into my laptop and the network was working fine. I ended up making a foolish mistake with the order in which I hooked everything up. In short, my server does not use the network manager service, so if the network cable is not plugged in upon boot, it won’t connect to the network.

I guess all I can hope for is that my string of bad luck ends. So far, things seem to be going well with both the install of the new iPod Touch 3.0 firmware and Fedora 11 (updates to be posted about both soon!), so let’s hope that things continue on the good streak.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit
Return top