Imported from http://mattie.net/blog http://import-nnju.posterous.com Most recent posts at Imported from http://mattie.net/blog posterous.com Sat, 14 Feb 2009 14:29:10 -0800 Some handy bash commands http://import-nnju.posterous.com/some-handy-bash-commands-0 http://import-nnju.posterous.com/some-handy-bash-commands-0 On Linux shells, I always feel pretty crummy about getting around quickly via cd. So, in the spirit of Daniel's up command, here's a few other quick-directory commands to add to your .bashrc:
# up somesubdir
# Find a directory below this that matches the word provided
# (locate-based)
function down() {
dir=""
if [ -z "$1" ]; then
dir=.
fi
dir=$(locate -n 1 -r $PWD.*/$1$)
cd "$dir";
}

# cdd someglobaldir
# quickly change to a directory anywhere that matches the word you typed.
# best if your locatedb is in good shape
function cdd() {
dir=""
if [ -z "$1" ]; then
dir=.
fi
dir=$(locate -n 1 -r $1$)
cd "$dir";
}
 
Other variations that I tried:

# Not breadth-first, so less fun sometimes
function down2()
{
dir=""
if [ -z "$1" ]; then
dir=.
fi
dir=$(find . -type d -iname $1 | head -n 1)
cd "$dir";

}

# Breadth-first, but really slow
function down3()
{
# create a list of all directories in the current folder
dirlist=( $(find . -maxdepth 1 -type d) )
dirlist=( ${dirlist[@]:1} ) # exclude .

# loop through the list
while [ $dirlist ]
do
# check the head of the list to see if it matches needle
val=${dirlist[0]}
found=`expr match "$val" ".*$1.*"`
if [ $found -gt 0 ]; then
# change dirs, we found the first match
cd "$val";
break # done
else
# not found!
# scan that new directory for subdirs
appendlist=( $(find $val -maxdepth 1 -type d) )
appendlist=( ${appendlist[@]:1} ) # exclude .
# add those subdirs to the tail of the dirlist
dirlist=( ${dirlist[@]:1} ${appendlist[@]} )

# rinse, repeat
fi
done

}

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Thu, 31 May 2007 03:28:43 -0700 Using Second Life to create movies http://import-nnju.posterous.com/using-second-life-to-create-movies http://import-nnju.posterous.com/using-second-life-to-create-movies

Here's a silly video I created for a contest at work:
     http://youdeliver.citrix.com/Play/tabid/79/pid/1112/Default.aspx

Feel free to vote for it, because the top submissions get an iPhone. 

Tools used:

I must have spent 15-20 hours on that video, primarily on sound effects. While working on this, I discovered that sound effects are very essential, but if they're good no one will really notice them. I.e., making something look and feel natural is a lot harder than it looks and isn't appreciated unless there are no sound effects.

If you notice, Helen's voice is distorted in a way as to make it sound as if she's coming through a digital line. My voice is distorted to reflect the environment I'm in, there are environment sounds like splashes and vehicles, etc. This all required a lot of work, but you can barely 'notice' it while watching the video. You just expect these things to be present.

Second Life is a great tool for creating the stage and environment. Inside its interface, I used existing Second Life places (e.g. the Midgar Final Fantasy Island) and dynamically created iPhone look-alikes (see if you can spot it). I also adapted an in-game laptop to display a fake webpage, and created a weird/fake server rack on the fly. I only scratched the surface, but you really can create just about any environment you imagine. This can be very helpful for fun videos.

I can't harp on Sony Vegas enough-- that tool is wonderful. I happen to have the $50 home version of the tool, but it's possible to get effect and codec plugins from the professional version and they work there, too. (The primary limitation being 3-4 video tracks, and 3-4 audio tracks, which I've always worked around. Professional versions allow unlimited tracks, I believe.) With Vegas, I was able to create overlays, manage sound effects, apply video rendering effects, pan/zoom, etc. If you enjoy video editing, I highly recommend it. I studied video editing in school for a few years (winning best editor awards, even), and I'm in awe of how far digital editing has come. I'm ten times more productive with this software than with a top-of-the-line editing deck from 8-10 years ago.

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Mon, 22 Jan 2007 20:19:07 -0800 Out of Bounds with Paint.NET http://import-nnju.posterous.com/out-of-bounds-with-paintnet http://import-nnju.posterous.com/out-of-bounds-with-paintnet

In my ongoing quest to mimic Photoshop tutorials in Paint.NET, I decided to take another run at one. This time it was for creating an "out-of-bounds" picture in Photoshop where something seems to step outside of a picture.

Here's what I was able to accomplish with Paint.NET:

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Sat, 20 Jan 2007 00:22:20 -0800 EventScripts Software "Box" http://import-nnju.posterous.com/eventscripts-software-box http://import-nnju.posterous.com/eventscripts-software-box

Over on digg recently I also saw a tutorial for creating a fake software box using Photoshop. I don't use Photoshop, but I do use Paint.NET. So I decided to try the same thing using that tool, which is one of my favorite free tools.

There are a few features different from Photoshop, so it wasn't 100% trivial to do, but I did manage to emulate it pretty well. I may write a similar tutorial for Paint.NET users to follow. Take a look:

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Sat, 20 Jan 2007 00:17:21 -0800 I'm not the biggest fan of exclamation points. http://import-nnju.posterous.com/im-not-the-biggest-fan-of-exclamation-points http://import-nnju.posterous.com/im-not-the-biggest-fan-of-exclamation-points Over on digg, I saw a very Mattie-like script for GreaseMonkey/Firefox-- it's used to eliminate extra exclamation points on webpages. Using this, now I never have to look at web sites with painful exclamations. This is a comforting thought.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Mon, 15 Jan 2007 00:33:34 -0800 Why I can't listen to Soul Coughing anymore http://import-nnju.posterous.com/why-i-cant-listen-to-soul-coughing-anymore http://import-nnju.posterous.com/why-i-cant-listen-to-soul-coughing-anymore

It seems there are a lot of things in this world that you ignore for years. Yet, once you discover them, they come full force and you aren't able to ignore it at all anymore.

This happened to me while listening to Soul Coughing one day. (Stop reading if you don't want to potentially affect your enjoyment of their music.) I discovered that nearly every single time Mike Doughty (lead singer) sings a sentence that ends in a consonant, he ends it with a very audible "uhhh" suffix. For example, this turns "Unmarked Helicopters" into "Unmarked HelicoptersUHHH".

This realization has quite tainted my enjoyment. Now it's very difficult for me not to notice it, making me unable to casually listen to their music.

Perhaps no one else runs into quirks like this and I'm just losing my mind; either way I thought I'd share.


Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Mon, 20 Mar 2006 03:51:34 -0800 In which Mattie links a discussion on the .NET CLR on XBox 360 http://import-nnju.posterous.com/in-which-mattie-links-a-discussion-on-the-net http://import-nnju.posterous.com/in-which-mattie-links-a-discussion-on-the-net So, the .NET CLR is moving to XBox 360? I'm not sure what I think about that. What do you think about it?

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Sat, 21 Jan 2006 09:50:01 -0800 In which Mattie links a binary teaching exercise http://import-nnju.posterous.com/in-which-mattie-links-a-binary-teaching-exerc http://import-nnju.posterous.com/in-which-mattie-links-a-binary-teaching-exerc

Using the Socratic method, it seems that you can teach third-graders to do binary arithmetic. Very neat.

(Thanks to digg for the link.)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Sat, 14 Jan 2006 18:01:47 -0800 A strange meme http://import-nnju.posterous.com/a-strange-meme http://import-nnju.posterous.com/a-strange-meme My friends couldn't stop talking about this today. Heh. News to me.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Wed, 04 Jan 2006 11:20:01 -0800 In which Mattie links the PureText clipboard tool http://import-nnju.posterous.com/in-which-mattie-links-the-puretext-clipboard http://import-nnju.posterous.com/in-which-mattie-links-the-puretext-clipboard

PureText is a simple little tool that could save me hours of my life. I searched for it today before I began to write such a tool for the third time. Here's a summary by the author (the guy who writes DependencyWalker):

PureText is basically equivalent to opening Notepad, doing a PASTE, followed by a SELECT-ALL, and then a COPY.  The benefit of PureText is performing all these actions with a single Hot-Key and having the result pasted into the current window automatically.

Basically, this describes what I do about 5-30 times a day. I grab something formatted and want to paste it into another document or email, but I rarely want to keep the formatting. Before this tool, I copied the text to the clipboard, then I hit this arcane sequence of keys: WindowsKey-N (my Notepad hotkey), Ctrl-V, Ctrl-A, Ctrl-C, Alt-F, x. Now that I've bound this tool to WindowsKey-Q, I've shortened 6 keystrokes (with slight delays) to 1 immediate keystroke.

It may seem silly, but it's worth it for me.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Mon, 14 Nov 2005 10:47:39 -0800 In which Mattie recommends FolderShare http://import-nnju.posterous.com/in-which-mattie-recommends-foldershare http://import-nnju.posterous.com/in-which-mattie-recommends-foldershare Microsoft acquired FolderShare and made it free. If you use multiple computers, you'll surely like this. It's a painless way to keep specific folders on your machines synchronized.

In addition, you can share the directory with invited friends if you want.

It doesn't have the deadbolt-security feeling of GoToMyPC. As such, it's even easier to use, though it might make people hesitate when they see how easy and fast it is for them to access their remote files.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Mon, 07 Nov 2005 07:40:04 -0800 In which Mattie mentions a potential new addiction to Sony Vegas http://import-nnju.posterous.com/in-which-mattie-mentions-a-potential-new-addi http://import-nnju.posterous.com/in-which-mattie-mentions-a-potential-new-addi

I must admit, I think I'm addicted to Sony Vegas.

No, Vegas has nothing to do with gambling. Vegas has everything to do with digital video editing. I had heard great things about Adobe Premiere and the state of digital video editing, but the mid-range software is far better than I expected. This weekend I tried out Sony Vegas (formerly Vegas Video by Sonic Foundry) and have fallen in love.

It shouldn't be surprising, but it still feels weird: if you spent ~$1,500 on video equipment today, you can do ten times more than you could with $25,000 ten years ago. I run into this sort of 'leap' a lot in software development, but it's rare that it hits home just how far we've come in other technology areas.

In high school, I was the lead video editor for our school's television studio. In order to create professional-looking video, it required all sorts of clever tricks and hours upon hours of your life. Now there are no such requirements. So much work is now done in software that near-professional-quality is just a few minutes away.

I can't wait to get home and play with it some more. 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Wed, 19 Oct 2005 13:15:31 -0700 In which Mattie tests out posting from Flock http://import-nnju.posterous.com/in-which-mattie-tests-out-posting-from-flock http://import-nnju.posterous.com/in-which-mattie-tests-out-posting-from-flock

I'm creating this post from the blog editor provided in the pre-release version of Flock, a new browser that promises to revolutionize everything.

I'm not sure if it will do so, but it looks pretty snazzy so far.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Wed, 05 Oct 2005 05:46:19 -0700 In which Mattie links an on-line Flash 'desktop' http://import-nnju.posterous.com/in-which-mattie-links-an-on-line-flash-deskto http://import-nnju.posterous.com/in-which-mattie-links-an-on-line-flash-deskto

If you're looking for something to make you say 'Wow' today, take a look at Goowy. The email interface is beautiful, and it's all highly interactive.

Even if AJAX turns out not to work wonderfully for online Office tools, this shows that Flash has a lot of promise.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Tue, 20 Sep 2005 16:31:48 -0700 In which Mattie links a software programming board game http://import-nnju.posterous.com/in-which-mattie-links-a-software-programming http://import-nnju.posterous.com/in-which-mattie-links-a-software-programming

I just might have to buy a copy of c-jump some day. I'm not sure how useful it would be in teaching people to program, though.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Fri, 16 Sep 2005 06:23:54 -0700 In which Mattie discusses the PDC 'overflow' trick http://import-nnju.posterous.com/in-which-mattie-discusses-the-pdc-overflow-tr http://import-nnju.posterous.com/in-which-mattie-discusses-the-pdc-overflow-tr At the PDC, whenever a session is too full, they have overflow rooms where they beam the presentation and a video of the speaker. This is a wonderful idea and it's very useful for people who would miss their favorite session otherwise. It's almost as good as being there since most of the sessions you sit far back and see screens of the speaker anyway. Even cooler, though, is that some creative folks began camping the overflow rooms. The idea being that the most interesting sessions (with some 'sleepers') will overflow and with only a few footsteps you can view the best sessions. Personally, I love it because I actually stand outside the overflow rooms and peer/listen through the doors-- bouncing from session to session. I'm much more interested in getting breadth over the cool tidbits than getting a deep pull into any one thing (probably the story of my life). When you sit in a session, you're a captive audience and you watch every second of people navigating their IDEs/demos/technical probs/etc. Just a moment ago I watched a session on Microsoft Research's thoughts for future synchronization/concurrent (e.g. RaceTrack, , etc) while I also watched an interesting panel on the future of RSS (with Microsoft, Newsgator, etc). Now I'm waiting for overflow sessions to start for the next block. There's always the possibility that no sessions will overflow this late in the conference, but that simply means I can go and get a seat in any of the other rooms of my choice. I spent a long night talking to the Windows Installer and WiX development teams. More on all of this later.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Tue, 13 Sep 2005 11:41:21 -0700 In which Mattie discusses PDC 2005 Day 1 http://import-nnju.posterous.com/in-which-mattie-discusses-pdc-2005-day-1 http://import-nnju.posterous.com/in-which-mattie-discusses-pdc-2005-day-1 Today is the first day of PDC 2005. I'm here in Los Angeles with thousands of other developers listening to Microsoft's encouragement to develop on their new platforms. I'm taking some detailed notes with the free copy of OneNote they gave us. Kinda handy, but I'm not totally sold yet. Highlights from the first half of Day 1 in no particular order:
  • Sidebar and Auxiliary displays
    • Sidebar is back in Vista (probably beta 2)
    • They're hyping the auxiliary displays for laptops/PCs. These are little color LCD and buttons on the outside of your laptop that lets you quickly check appointment data, email, etc, while the machine is off.
    • People can write things for sidebar/aux by visiting [url=http://microsoftgadgets.com/]microsoftgadgets.com[/url]
  • They offered ~2000 very cool PDA phones which I was too late to buy. (cry)
  • I really want to try Office 12 which they showed-off for the first time today.
    • Really like the new menuing plans, though screen real estate is eaten.
    • They're redoing UI because 9/10 of features requested for Microsoft Office already exist, but users can't find them.
    • Outlook emails now have a very easy way to mark them as things to handle later. I like how it works/looks, though it's a small gain. Still, I want it now.
    • Outlook can replace FeedDemon/NewsGator as it has a lot of new RSS support.
  • From the what-in-the-world department, they showed-off somehow using USB Memory sticks as virtual memory expansion in Vista. Very very cool especially combined with their virtual memory optimization additions ("superfetch"), but I have so many questions about this. It doesn't make sense and seems like an easy feature to cut from release.
  • I love LINQ/DLINQ/XLINQ/etc. Basically, they showed-off very cool .NET language constructs for doing queries in the language itself, without a need for SQL, etc. These can be off of a database or you can actually query any collection of objects. I can't wait to play with it. At the moment, I rate this as the most interesting announcement.
  • We saw some really cool Avalon apps demo'd. One you can try yourself is Max, a photo sharing application. It was designed and managed by one of their Usability leads as a test of Avalon and XAML. I must say the application looks nice, but I can't try it because my laptop runs on Vista and it won't install. (They demo'd it on Vista, though.)
That covers most of the things I've seen thus far. I've been to a couple of sessions, but neither of them seem very impressive compared to the keynotes and the overall cool atmosphere. More soon!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Fri, 26 Aug 2005 14:57:59 -0700 In which Mattie discusses a financial game http://import-nnju.posterous.com/in-which-mattie-discusses-a-financial-game http://import-nnju.posterous.com/in-which-mattie-discusses-a-financial-game I spent nine of the last twenty-four hours playing Cashflow 101. If you're unfamiliar with it, this is the educational game based on Robert Kiyosaki's Rich Dad, Poor Dad series of financial books. The game definitely helps put certain things in perspective, but makes some of the investment options too easy. It's not difficult to get the 'gist' of the game, yet I can see how some people might try to take some of the game interactions as literal ways to behave in the real financial world. That seems a little dangerous to me. At any rate, I began as the janitor last night. This profession has an incredible lack of expenses and it made winning fairly easy. The biggest trouble I had was landing on investment opportunities once I was out of the Rat Race. Indeed, it feels like the game is really 'won' by getting out of the Rat Race-- the ease of life afterwards is almost laughable. I'm sure this isn't accidental, since they want to convey that as the most important step. For today's game, we decided to put our personal financial information onto the sheets to see how well things worked. My friend Scott won quickly, mostly because he has very low living expenses and it only took a handful of wise investments to get him to financial freedom. I was able to get out of the Rat Race soon after because my income was so much higher than my expenses and debt. As such, I was able to invest in large deals from the get-go and leapt into the Fast Track with far more money than we had seen previously (nearly half a million). All in all, it's a neat game. It definitely has me thinking very much about my own finances and how I can make the most of my investable income. We'll see if I can carry that momentum forward.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Mon, 22 Aug 2005 08:42:53 -0700 In which Mattie links Microsoft's WMI Code Creator http://import-nnju.posterous.com/in-which-mattie-links-microsofts-wmi-code-cre http://import-nnju.posterous.com/in-which-mattie-links-microsofts-wmi-code-cre Ever since I first started playing with WMI, I've been meaning to delve into it more. It seems like a very handy interface for manipulating and querying Windows machines. I just ran across the WMI Code Creator tool from Microsoft. This fellow will generate example code in C#/VB.NET/VBScript for all sorts of WMI tasks. It really demonstrates how easy it is to do powerful things with WMI. For instance, it takes only a click or two to create a VBScript that gets notified whenever a process is invoked. Here's code of a VBScript it generated for me:
strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set objEvents = objWMIService.ExecNotificationQuery _ ("SELECT * FROM Win32_ProcessStartTrace WHERE ProcessName = 'notepad.exe'")   Wscript.Echo "Waiting for events ..." Do While(True)    Set objReceivedEvent = objEvents.NextEvent      'report an event    Wscript.Echo "Win32_ProcessStartTrace event has occurred."   Loop
This snippet will display "Win32_ProcessStartTrace event has occurred." whenever notepad.exe is invoked. This is only a small example of the easy demos you can put together with their code creator tool.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie
Tue, 16 Aug 2005 06:20:59 -0700 In which Mattie links social-linking software website http://import-nnju.posterous.com/in-which-mattie-links-social-linking-software http://import-nnju.posterous.com/in-which-mattie-links-social-linking-software Earlier today I was thinking of writing a utility that monitors what applications you use regularly and lists them for others to see. Part of that would involve providing short descriptions and frequency of use into a socially-linked database. Well, part of that is already here. Take a look at MyProgs.Net. It acts as a del.icio.us for cool and clever software utilities.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1255/MattieButtonForums1_x80.png http://posterous.com/people/4VMSRtAw Mattie mattie Mattie