Learnings
I have a corporate job now—Java Development. It is all good. (^_^)
Having this corporate job means developing on Windows machine(s), which means for me brushing up on DOS commands.
attrib: change file permissions
path: print your path variable
services.msc: open the services console
netstat: lists ports in use
I don’t think there is a need for this command in NT, XP or Vista, but I used to use it all of the time.
doskey: allows you use commands previously entered
Additionally, I now need to start using dos2unix & unix2dos.
Other things that I have learned recently:- Shift + Alt + B in InkScape—> traces bitmap (i.e. gets path/shape of some existing bitmap object)
- I’m turning my dev box into a web server and am working on putting a stack together. Although I would love to try something cool and new like Nginx, I think I would be better off sticking with what I know (i.e. Apache). More about my first webserver later.
- I’ve started a document about the Freelance Web Development Process with questions for the client that I found on the web, as well as links to design resources.
- To find firefox shortcuts… enter the following line in the browser address bar: chrome://browser/locale/help/shortcuts.xhtml
- Convert m4a to mp3 with these two lines…
faad foobar.m4a
#converts m4a to wav
lame foobar.wav foobar.mp3
#converts wav to mp3
More, more, more…
- HTML space =
- Firebug
- Ctrl + Shift + C open web developer css
- Ctrl + Shift + L open command line
- Ctrl + Shift + K focus on search box
- Cygwin & the Find command: In order to use the find command in cygwin, you must make sure that c:cygwin\bin; is before SystemRoot\system32
- To deal with the firefox can’t center tables issue… add extra empty columns & have colspan across those columns
- Jsp files are converted into servlets that are then compiled into .class files; I am guessing that other frameworks work in a similar fashion.
- To my future selves, please remember that if you are getting a 500 error on a typo blog, make sure to check the file permissions for the log files at least thrice; they must be set to 755.
- Screengrab is a firefox extension that does screen captures. Cool!!!
- RAD7 requires that a target server be set for all projects.
- The easiest way to search for a jar file by package name is…
- if the jar is a websphere or homegrown jar, navigate in cygwin to a sufficiently small directory where you think the jar might be and execute the following command: find . -name \. | xargs grep this.is.your.package
- if the jar is open source, enable javacious & google the package name.
Digg is my guilty pleasure...
Dear Digg,
I just don’t know how to quit you. Your front page with its ultimate tutorial lists, DIY hacks, news of new software releases, links to photos of scantily-clad women & oh God, don’t get me started on diggnation. Digg, you make me feel… inadequate. There’s always something new to tweak, new software to try, links to bookmark, news stories to, err…’research’. I can’t keep up.
And who’s fault is it that I feel inadequate? Well, I certainly can’t be the one to blame; you are everywhere! Even after removing all digg artifacts from my browser, I cannot escape the ‘digg this’ buttons & the ‘top-on-digg’ widgets slopped on various blogs (I think there was one on this blog at one time). You are in my internetz, destroying my blankspaces & thus, my self-esteem (not that that is terribly hard).
I want my simple, pre-digg life back; a life where I did important things, like save kittens & write “bad” poetry.
Fortunately, my interest in mouseHole has given me reason to spend less time at digg and more time at code.whytheluckystiff.net/mouseHole/ (Google says I’ve made 6 visits since the middle of this month! & that excludes all of the internet stalking I’ve been doing at the library). Now, I know what your’e thinking… “Just write a nice little mouseHole script to removes all of the digg paraphernalia from around the web.” And writing such a script would be a smart thing for me to do; my time away from digg would result in more time away from digg. But alas, I can’t seem to quit you. In fact, the mouseHole script that I ended up writing [1] uses your new API to display the number of diggs for the page I am currently viewing, along with (what else) a link to that page on digg.

And you know, the thing is that I suck at writing Ruby. Hell, I don’t even know if I’m a programmer yet. I have lots to learn and do with Ruby; I don’t have time for you & your front page and especially not for your comments or video podcasts. Maybe you could meet me half way and make yourself a paid-members only site? No? Then, I am hopelessly yours. Just promise me that you won’t take all of my time and that if you ever leave me for good, that you will return that little piece of my heart that I have given to you.
Lovingly, but irritatedly,
JessiRae
[1] Using this Ruby Digg Wrapper, I added to the browserbar.rb mouseHole script that I created earlier. The browserbar script places a list of links at the top of every page; the list forms a bar, similar to the plugins and quick links firefox makes available. Yeah, sure you are making all of your web surfing known to digg, but that just makes the guilt stronger. To use the digg “plugin”, place the digg.rb wrapper in your {mouseHole_root}/lib/mouseHole directory.
Browser Bar for mouseHole
.mouseHole folder to add a browser bar at the top of every page your view with mouseHole; like this…
def rewrite(page)
document.search('//a[@href]') do |link|
href = URI(link.attributes['href']) rescue nil
next unless href && href.host && href.host != page.location.host
link.after '<span style="font-size:8px">[' + href.host + ']</span>'
end
#add the following line
document.search("body").prepend("<a href=\"http://del.icio.us/jowensbysandifer\">"
+"<img src=\"http://127.0.0.1:3704/doorway/static/images/delicious.gif\" />"
+"</a>")
#just include your links to your favorite sites and you can check them...
# no matter where you are
end
Oh and don’t forget to place any icons in the static/images folder in your mouseHole application.
-Teehe! And if I knew how to get the url to the script, I could submit sites to del.icio.us (or whatever site I wanted) via javascript… but that might be dangerous!-
UPDATE:
Here’s how to submit a site to del.icio.us via the browser bar by getting the page url.
Step 1: save the request in proxyhandler.rb as $request. A global… bad I know :-(
I’m still figuring out how mouseHole works. Maybe the best thing to do would be to write the value out to the database?
Step 2: add submit html to a user script or create a new one (I call mine browserbar.rb), like this…
document.search("body").prepend("<a href=\"http://del.icio.us/jowensbysandifer?url="
+ $request.to_s + "&submit=save&jump=no\">"
+" <img src=\"http://127.0.0.1:3704/doorway/static/images/delicious.gif\" /></a>")
Step 3: Restart mouseHole.
Review of Ubuntu Hacks

Why read Ubuntu Hacks?
- If Ubuntu is the entry-level Linux distro, then Ubuntu Hacks is the book that helps the entry-level user take advantage of the great software and tools Linux has to offer.
- I would have saved myself a lot of effort if I owned this book on the day that I install Ubuntu on my machine.
- In many ways, Ubuntu Hacks is an introduction to the software available to all Linux users. So, if you are looking for some “real Ubuntu hacks”, you may be disappointed, but that is ok; that just means that the title of the book is a bit of a misnomer, but it doesn’t necessarily mean that the books isn’t valuable.
- Some subjects (like kernel building) aren’t really examined with much detail and refer users to seek help elsewhere.
- The command-line based instructions are great for those new to using the terminal. There are quite a few hacks that provide visual instructions only, but Ubuntu Hacks had far less GUI-based instructions than the other Ubuntu books I perused at the bookstore.
- If you aren’t a techie, but you want to explore Linux and its myriad of software options, Ubuntu Hacks is for you.
- A lot of the hacks in Ubuntu Hacks you can figure out on your own or find on the internet.
- Things that I would like to know about Linux/Ubuntu that weren’t addressed in Ubuntu Hacks:
- File system organization… whys and best practices (i.e. Hack #101 – Get a good visual picture of the linux file system in your head)
- A brief history of Linux, Debian and Ubuntu (i.e. Hack #102 – How to tell friends & family about Ubuntu in a non-freakish way)
I think computer bugs have gotten smaller...
While opening my computer up to put more memory in, I found a small moth.

Even though the term bug may not have originated with the computer bug that Grace Hopper supposedly found, I still giggled as I told myself the story of the first computer bug.
My moth appeared to be significantly smaller than the first ever computer bug…
Some things I learned last week...
- You can’t really crop in Inkscape. :-( But you can change the size of a svg drawing to get some perspective on how large or small the drawing will be after it is exported.
- Ctrl + Alt + A opens align window in Inkscape.
- To create Stylish Text with GIMP create a new layer, select a portion of the text to make shiny from original layer, copy and paste selection into new layer and change the color of the pasted portion.
- This is how good iterative web design goes.
- Y Combinator is now accepting applications for summer 2007 funding. Aahhh, if only I were confident and had a partner.
- There are a number of sites that support OpenID. What prevents someone from claiming your site as their own (other than it being against OpenID’s policy)?
- On the Rails deployment learning front, I discovered that ‘require_dependency…’ lines go in environment.rb and not in the controllers themselves (at least for how my hosting company has things set up).
Grab all of the href links from a Page
Use Rubyful Soup to get all of the hyperlinks on a page…
soup = BeautifulSoup.new(page_content)
result = soup.find_all('a')
result.each { |tag|
urls[i] = tag['href']
if urls[i].to_s.slice(0,1) != 'h' then
#add first part of url to href link if link is internal
urls[i] = home + urls[i]
end
i = i + 1
}
NTFS and FAT compatible... finally
My problem
- Had an external hard drive that I used with my MS Windows machine.
- Got a new linux machine.
- External hard drive did not allow linux machine to write to it – because hard drive is NTFS.
How could I write to external hard drive from linux machine without re-formatting the external hard drive?
My solution- Follow this tutorial on How To Use NTFS Drives/Partitions Under Ubuntu Edgy Eft
The only instruction I would add to this tutorial is that you must have properly ejected the external hard drive from your Windows machine in order for Edgy to mount the drive.
UPDATE: I just found these instructions for mounting your Windows partition and making it read/writable.
mac ipod vs. windows ipod on linux
I have discovered that mac ipods (those that have been restored to factory settings on a mac) are read by Ubuntu as read-only, which means you can’t change the music on a mac ipod from a Ubuntu machine [1]. Alternatively, windows ipods (those restored on a windows machine) are read/writable, which means you can upload new music to that ipod.

I figured this out after reading the ipod linux (a version of linux that runs on your ipod) installlation instructions. ipod linux requires that the ipod you want to install ipod linux on is a windows ipod. Since we don’t have a working windows machine at my house, I used a windows machine my husband brought home from work and restored the ipod to its factory settings on it. Thinking that the reason that ipod linux requires that windows ipods be used, I plugged my ipod up to my linux machine and tada, it wasn’t read-only!
1: I didn’t think about this until later, but I am guessing that I could have changed the device’s permissions using sudo. I thought I had tried that, but I guess I didn’t do it correctly.

