Thursday, December 18, 2008

Pretty Plots in MATLAB

Using MATLAB to crank through some calculations, but having trouble making the plots pretty? Here's an example that should make a nice looking plot that's ready to be inserted into a report.

figure
set(gca,'fontsize',14)
set(gcf, 'PaperSize', [8. 6.],'PaperPositionMode', 'auto');
plot(X,Y,'k^','markersize',10,'markerfacecolor','auto')
legend('mylegend','location','northeast');
xlabel('myxlabel','Interpreter','latex','fontsize',16);
ylabel('myylabel','Interpreter','latex','fontsize',16)
AXIS([xmin xmax ymin ymax])
print('-r600','-dpdf',['filename','.pdf'])

Alright, a quick rundown.

1. The 'figure' command is letting MATLAB know that we're making a picture with all the following attributes.
2. The 'set gca' command is setting the axes, which have the default handle 'gca', to have a font size of 14 here. This will control the size of the numbering on the axes, as well as the size of the font in the legend.
3. The 'set gcf' command is setting the paper size to 8" by 6", a size I find works well with the default figure output of MATLAB. This will prevent you from having to crop the plot later in a third-party photo editor.
4. The 'plot' command lists the X and Y arrays youd like to plot, 'k^' plots black upward facing triangles in a 'marker size' of 10pt, and automatically filled.
The 'legend' command puts in your legend, one entry per pair of vectors being plotted, in the northwest position.
5. The 'xlabel' and 'ylabel' commands are pretty straightforward, but the interpretter command displays the labels in the default LaTeX font instead of the MATLAB font. You can use the '$$' pairing to put in maths.
6. The 'axis' command sets the range for x and y, just comment this out if you like what MATLAB does.
7. The 'print' command will save your figure as .pdf with the filename you specify in the current directory (where your .m file is). Here, you can always specficy a path if you'd like to save figures in a different folder.

Still to come, using str2num and num2str to automatically number plots that are part of a for loop, or to name output graphs based on input data.

Wednesday, November 19, 2008

MATLAB: Don't ', transpose(it)

Doing a little homework for ME 7040, I discovered that there is more to transposing a matrix than just rows becoming columns and vice versa. I was doing a simple stress, strain, displacement analysis of a beam under static load. The code snippet in question is when the elemental stiffness matrix needed to be calculated by:
k = int(int(B'*D*B,r,-0.5,0.5),s,-0.5,0.5)
B is a 3xn matrix of shape functions and D a 3x3 relationship of Modulus of Elasticity and Poisson's ratio. There is obviously more to this code, including the calculations of stress and strain and the writing of an output file.

Running the code using the prime ('), the code took 143.106 seconds to run. I was initally confused by how long it took because the matrices were not that large. I then heard about the function transpose() and decided to use that. In code form:
k = int(int(transpose(B)*D*B,r,-0.5,0.5),s,-0.5,0.5)
This took only 19.735 seconds to run. So digging a little further, the operator ', also checks for complex conjugates of the matrix as well.

In conclusion, if you know that you are not dealing with complex numbers, you may want to use the transpose function and not its operator.

Tip: To time the running time of your code, put tic on the top line and toc on the last line.

Tuesday, November 18, 2008

SCP + SSH: Copying files from Windows to Linux

At the university I attend, it is mostly all about Windows and there is no support for linux so many things have to be done by the user to get anything done. However, most linux users are used to trying this on your own. Here I will show you how to successfully transfer files from your linux box at home to a windows computer at work/school. Linux commands refer to Ubuntu. Please see your distro's guide on installing packages.

Software Required:
Windows: Cygwin
Linux: openssh

Configuring linux box:
To install openssh, in terminal type
sudo apt-get install openssh-server
If the linux box is behind a router, please open the port corresponding to ssh. Default is 22. For more information please visit portforward.com.

To test the installation of ssh type:
ssh localhost
If everything works, then that should be up for setting up the linux box.

Configuring Windows:
After downloading setup.exe from the link above, double click to run. The important part of the installation is "Selecting Packages" diaglog box.
Expand the Net tree by pressing the +. Scroll down and look for openssh and click on "Skip" to change it to "Install". You will notice a check box under column B. Click Next when finished and complete the installation.

Operating the Windows Box:
After installation, open cygwin and a terminal will appear. The syntax for scp is:
scp [options] [[user@]host1:]filename1 ... [[user@]host2:]filename2

To copy 'report.pdf' from your Fall 2008 folder on your home directory, you would type:
scp report.pdf user@serverip:"/home/user/Fall 2008/" .
This will save report.pfg into your home directory. Notice the "."

More Information:

Good Luck.

Saturday, October 11, 2008

Conky: Display Last Pidgin Message

Recently, I removed the gnome-panels, added awn, and had a conky bar at the top. However, I missed having a system notification of when I would receive a message via Pidgin. So I browsed the pidgin wiki and create somewhat of a hack to display the last IM that received from Pidgin. This method is probably not the best way however I had some diffuculty.

The DBus method that listens for the received messages was chocking conky and not allowing the conky script to load correctly. So I had to create two files. getim.py would run at startup, listen for a new message and then write that message to a data file. lastim.py would be executed within conky and check the data file for the new message. I know its not real efficient and redundant but it just works. If you have any brilliant ideas please let me know.

Here is the getim.py file:
#!/usr/bin/python

# ----- GETIM.PY // LISTEN FOR AN RECEIVED MESSAGE ------------#
################################################################
# MOST OF THIS SCRIPT WAS TAKEN FROM THE PIDGIN DEVELOPER WIKI#
# PLEASE VISIT http://developer.pidgin.im/ FOR MORE INFORMATION#
################################################################

def conky_im(account, sender, message, conversation, flags):
reg = '<(.|\n)+?>' # REGEX FOR HTML TAGS
message = re.sub(reg,'',message) # REMOVE HTML TAGS
sender = sender.split("@")[0] # GET GCHAT NAME
message = message[0:24] # LIMIT TO 25 CHARS
file = ' ' # LOCATION OF DATA FILE
fim = open(file,"w")
IM = sender + " said: " + message
fim.write(IM)
fim.close()

import dbus, gobject, re
from dbus.mainloop.glib import DBusGMainLoop
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()

bus.add_signal_receiver(conky_im,
dbus_interface="im.pidgin.purple.PurpleInterface",
signal_name="ReceivedImMsg")

loop = gobject.MainLoop()
loop.run()



Copy and paste the following and save as lastim.py:
#!/usr/bin/python

# SHOW LAST IM
f=" " # REPLACE WITH YOUR DATA FILE. ie.CONKYIM.DAT
fim = open(f,'r')
im = fim.read()
print im
fim.close


Finally, add this to your .conkyrc script
${execi 1 python ~/scripts/lastim.py}

Any questions/comments let me know. Here is a screen shot of what my conky looks like:

Thursday, September 11, 2008

Top Ten Radiohead Songs

My first experience with Radiohead, besides hearing Creep on the radio, was my brother playing The Bends album for me. At first I wasn't a real fan, probably because the first song I heard I didnt like so didnt give them the time of day. I would randomly listen to their songs here and there but it wasn't until this past year that I came to appreciate them more. I find myself listening to them the most and never get tired of them.

I decided to compile a list of top ten Radiohead songs with a link to a video and a listing of their lyrics. I bolded lyrics that particulary strike a chord with me. Enjoy!

  1. There There

  2. in pitch dark i go walking in your landscape.
    broken branches trip me as i speak.
    just because you feel it doesnt mean it's there.
    just because you feel it doesnt mean it's there.

    there's always a siren
    singing you to shipwreck.
    (don't reach out, don't reach out)
    steer away from these rocks
    we'd be a walking disaster.
    (don't reach out, don't reach out)

    just because you feel it doesn't mean it's there.
    (there's someone on your shoulder)
    just because you feel it doesn't mean it's there.
    (there's someone on your shoulder)

    there there

    why so green and lonely?
    heaven sent you to me.

    we are accidents
    waiting waiting to happen.

    we are accidents
    waiting waiting to happen.




  3. Karma Police

  4. Karma police
    arrest this man,
    he talks in maths,
    he buzzes like a fridge,
    he's like a detuned radio.

    Karma police
    arrest this girl,
    her Hitler hairdo
    is making me feel ill
    and we have crashed her party.

    This is what you get,
    this is what you get,
    this is what you get,
    when you mess with us.

    Karma police
    I've given all I can,
    it's not enough,

    I've given all I can
    but we're still on the payroll.

    This is what you get,
    this is what you get,
    this is what you get,
    when you mess with us.

    For a minute there
    I lost myself, I lost myself.
    Phew, for a minute there,
    I lost myself, I lost myself.

    For a minute there
    I lost myself, I lost myself.
    Phew, for a minute there,
    I lost myself, I lost myself.




  5. House of Cards

  6. I don't want to be your friend
    I just want to be your lover

    No matter how it ends
    No matter how it starts

    Forget about your house of cards
    And I'll do mine
    Forget about your house of cards
    And I'll do mine

    Fall off the table,
    Get swept under
    Denial, denial

    The infrastructure will collapse
    Voltage spikes
    Throw your keys in the bowl
    Kiss your husband goodnight

    Forget about your house of cards
    And I'll do mine
    Forget about your house of cards
    And I'll do mine

    Fall off the table,
    And get swept under

    Denial, denial
    Denial, denial
    Your ears should be burning
    Denial, denial
    Your ears should be burning
    Denial, denial




  7. Fake Plastic Trees

  8. A green plastic watering can
    For a fake chinese rubber plant
    In the fake plastic earth

    That she bought from a rubber man
    In a town full of rubber plans
    To get rid of itself

    It wears her out, it wears her out
    It wears her out, it wears her out

    She lives with a broken man
    A cracked polystyrene man
    Who just crumbles and burns

    He used to do surgery
    On girls in the eighties
    But gravity always wins

    And it wears him out, it wears him out
    It wears him out, it wears him out

    She looks like the real thing
    She tastes like the real thing
    My fake plastic love

    But I can't help the feeling
    I could blow through the ceiling
    If I just turn and run

    And it wears me out, it wears me out
    It wears me out, it wears me out

    And if I could be who you wanted
    If I could be who you wanted
    All the time, all the time





  9. Paranoid Android

  10. Please could you stop the noise, I'm trying to get some rest
    From all the unborn chicken voices in my head
    What's that...? (I may be paranoid, but not an android)
    What's that...? (I may be paranoid, but not an android)

    When I am king, you will be first against the wall
    With your opinion which is of no consequence at all
    What's that...? (I may be paranoid, but no android)
    What's that...? (I may be paranoid, but no android)

    Ambition makes you look pretty ugly
    Kicking and squealing gucci little piggy
    You don't remember
    You don't remember
    Why don't you remember my name?
    Off with his head, man
    Off with his head, man
    Why don't you remember my name?
    I guess he does....

    Rain down, rain down
    Come on rain down on me
    From a great height
    From a great height... height...
    Rain down, rain down
    Come on rain down on me
    From a great height
    From a great height... height...
    Rain down, rain down
    Come on rain down on me

    That's it, sir
    You're leaving
    The crackle of pigskin
    The dust and the screaming
    The yuppies networking
    The panic, the vomit
    The panic, the vomit
    God loves his children, God loves his children, yeah!




  11. Everything in its Right Place

  12. Kid A, Kid A
    Kid A, Kid A
    Everything
    Everything
    Everything
    Everything in its right place
    In its right place
    In its right place
    In its right place

    Yesterday I woke up sucking a lemon
    Yesterday I woke up sucking a lemon
    Yesterday I woke up sucking a lemon
    Yesterday I woke up sucking a lemon

    Everything
    Everything
    Everything
    Everything in its right place
    In its right place
    In its right place
    Right place

    There are two colours in my head
    There are two colours in my head
    What, what is that you tried to say?
    What, what was that you tried to say?
    Tried to say
    Tried to say
    Tried to say
    Tried to say

    Everything in its right place...




  13. True Love Waits

  14. I'll drown my beliefs
    To have you be in peace
    I'll dress like your niece
    To wash your swollen feet

    Just don't leave
    Don't leave

    I'm not living
    I'm just killing time
    Your tiny hands
    Your crazy kitten smile

    Just don't leave
    Don't leave

    And true love waits
    In haunted attics
    And true love lives
    On lollipops and crisps

    Just don't leave
    Don't leave

    Just don't leave
    Don't leave




  15. High and Dry

  16. Two jumps in a week,
    I bet you think that's pretty clever don't you boy?
    Flying on your motorcycle,
    watching all the ground beneath you drop
    You'd kill yourself for recognition,
    kill yourself to never, ever stop
    You broke another mirror,
    you're turning into something you are not

    Don't leave me high, don't leave me dry
    Don't leave me high, don't leave me dry

    Drying up in conversation,
    you'll be the one who cannot talk

    All your insides fall to pieces,
    you just sit there wishing you could still make love
    They're the ones who'll hate you
    when you think you've got the world all sussed out
    They're the ones who'll spit on you,
    you'll be the one screaming out

    Don't leave me high, don't leave me dry
    Don't leave me high, don't leave me dry

    Oh, it's the best thing that you ever had,
    the best thing that you ever, ever had.
    It's the best thing that you ever had,
    the best thing you have had has gone away.

    Don't leave me high, don't leave me dry
    Don't leave me high, don't leave me dry
    Don't leave me high,
    Don't leave me high, don't leave me dry




  17. Idioteque

  18. Who's in a bunker?
    Who's in a bunker?
    Women and children first
    And the children first
    And the children
    I'll laugh until my head comes off
    I'll swallow till I burst
    Until I burst
    Until I

    Who's in a bunker?
    Who's in a bunker?
    I have seen too much
    I haven't seen enough
    You haven't seen it
    I'll laugh until my head comes off
    Women and children first
    And children first
    And children

    Here I'm alllowed
    Everything all of the time
    Here I'm allowed
    Everything all of the time

    Ice age coming
    Ice age coming
    Let me hear both sides
    Let me hear both sides
    Let me hear both
    Ice age coming
    Ice age coming
    Throw it on the fire
    Throw it on the fire
    Throw it on the

    We're not scaremongering
    This is really happening
    Happening
    We're not scaremongering
    This is really happening
    Happening
    Mobiles skwrking
    Mobiles chirping
    Take the money run
    Take the money run
    Take the money

    Here I'm allowed
    Everything all of the time
    Here I'm allowed
    Everything all of the time

    Here I'm allowed
    Everything all of the time
    Here I'm allowed
    Everything all of the time

    The first of the children




  19. Bodysnatchers

  20. I do not
    Understand
    What it is
    I've done wrong
    Full of holes
    Check for pulse
    Blink your eyes
    One for yes
    Two for no

    I have no idea what I am talking about
    I am trapped in this body and can't get out
    Ooooohhhh

    You killed the sound
    removed backbone
    A pale imitation
    With the edges
    Sawn off

    I have no idea what you are talking about
    Your mouth moves only with someone's hand up your ass
    Ooooohhhh

    Has the light gone out for you?
    Because the light's gone for me
    It is the 21st century
    It is the 21st century
    It can follow you like a dog
    It brought me to my knees
    They got a skin and they put me in
    They got a skin and they put me in
    All the lines wrapped around my face
    All the lines wrapped around my face
    And for anyone else to see
    And for anyone else to see

    I'm a lie

    I've seen it coming
    I've seen it coming
    I've seen it coming
    I've seen it coming

    We're not scaremongering
    This is really happening
    Happening
    We're not scaremongering
    This is really happening
    Happening
    Mobiles skwrking
    Mobiles chirping
    Take the money run
    Take the money run
    Take the money

    Here I'm allowed
    Everything all of the time
    Here I'm allowed
    Everything all of the time

    Here I'm allowed
    Everything all of the time
    Here I'm allowed
    Everything all of the time

    The first of the children






Perhaps you can enjoy Radiohead as much as I do.

Monday, August 11, 2008

Dear NBC, I run Linux

After seeing the amazing comeback by Jason Lezak in the 400 free relay last night, I was eager to watch it this morning and relive the experience. However, I was disappointed when I clicked on "play video" and was unwelcomed with:


I run linux and am very very happy with it, but there are times where I feel almost neglected because of the operating that I use. Who knows, maybe there could be some discrimination suit against them.

But seriously, can someone enlighten me as to how hard it would be for them to make it available on linux systems?

Thursday, August 7, 2008

Find Files in BASH

This is really just a reminder to me so I dont have to keep looking it up. Who knows, maybe you will find it useful.

To search folder and subfolders for python scripts.

find . -name "*.py"
Sweet now I wont forget.

Tuesday, July 15, 2008

Twitter Search: Because you want to know

Now you can find out specifically what everyone in the world is doing. Twitter has released its new search page. So of course, mad people are reading fourlovesfour.

Just another way to know what everyones doing.

Monday, July 7, 2008

Titaaataifa

Weee, another round of things I think are awesome, and therefore, are in fact, awesome.

You know what I love? How about "Pay-what-you-want-for-my-music-because-you-the-customer-are-truly-the-ultimate-critic" album pricing. I love that ish, seriously. And on top of that, it very well could be the the single thing that could save (or perhaps bury) the record industry.

I recently took the time to get into Girl Talk, the stage name of Greg Gillis, a mash-up DJ who seamlessly constructs a grand opera of today's R&B hits mixed with yesterday's rock ballads and everything in between. His albums make the perfect party play list, with the lyrics and beats recognizable enough to get every up out of their seats while at the same time sequences move quick enough that no one's attention span is betrayed (and that even goes for your hyperactive little brother after several boxes of hawiian punch).

Anyway, back to the point. What was unique to the Girl Talk pay what you want format for his newest album Feed the Animals was the incentives he offered for you to pay more. Triggered by a reaction similar to those prizes I wanted if I only sold a few more dollars of holiday junk for my middle school's fundraiser, I actually coughed up $13. If you were to offer up to five bucks and you'd get the mp3's. Five to ten dollars gets uncompressed FLAC files and the chance to additionally download one continuous file to avoid awkward gaps when putting the album on a disc. Anything over 10 and you get added to the list to have a hard copy mailed to you when the physical release drops. And this is all months before the CD will hit shelves.

What a smart idea. I know Radiohead has offered the pay-what-you-want format. And Stars offered up a digital edition of their newest album before a physical release. It all makes sense. The people that will pay will still pay with these other options. All it does is allow them the opportunity to hear the music as soon as it's available to all the big magazine critics without going through illegal channels while being the most honest critics of the musicians they already love and support.

Wednesday, July 2, 2008

The End of a Year: What I Learned

As some of you know, I have just returned home from a year of Volunteering in Chicago. As I reflected on this past year at the end of year retreat, I wrote this little essay:
When looking back at what I wrote at orientation for “Who am I” I noticed a few things. Many of the items listed were things and people who I loved, schools I attended, and even TV shows I enjoyed to watch. Yes all these things shaped me, but they weren't who I was. Like many of the things listed, their importance are bounded by time. Time seems to be the hardest part to accept, especially for someone who's undergraduate career was so technical and could predict failure over time in a design based on certain initial conditions. When I look around at the physical world, I believe everything is defined by an equation. Some are algebraic, while others are non-linear time independent polynomials which with some work can be solved and the result can be known beforehand. There is comfort for me in knowing this and it almost gives me a sense of power to have this ability.

My mind analyzes everything and systematically gives me results of perfection or how things should be. I grew up in a pretty safe environment and things always went my way. My brothers paved a wave for me growing up and I had a self confidence that sometimes bordered on cockiness and controlling.

I entered this year pretty excited about the work I was to do at St. Rita and I enjoyed every moment with those Rita men. Coaching flag football and swimming allowed me to see and listen to them outside of school. Being the sacristan of the chapel allowed me to show the students that mass is not always boring and what the parts of the mass actually mean. Retreats were my favorite part of my job, especially the senior kairos retreat, because of the transformation that I saw in them over four days.

Enough about what I did and my work. Being in ministry I know that I wont see the result of the work that I did which leads me to what I learned about myself, or more importantly how I changed. I mentioned earlier how I like to know or solve everything. I loved to hold the steering wheel of my journey with both hands. In my commitment statement during orientation I said I wanted to better understand myself through my community and to grow in faith, a faith which was already strong.

My community and this volunteer year has taught me something that is 22 years too late: Patience. Its the same thing that I wrote on my stone at mid-year. I know that everyone has trouble in their life but listening to my house mates at dinner and at community meetings was what I needed. Also going through some personal rejections myself helped. How about the patience that Amanda showed when Ms. Lee forgot to put the Christmas gift list in for her clients. The patience of Brett in dealing with students who misbehaved and the development of his prayer life. Claire's patience with applying to graduate schools, the service club and the cancellation of the much anticipated car wash. Jeannie's patience in dealing with the frustrations of turning a room with boxes full of books and dusty shelves into a welcoming library. Finally, the patience of Susan in dealing with those bratty eighth graders and the train so she could finally come home.

Patience fort me was something that I needed but I would not have been able to receive it with out a strong faith. With out my faith and patience, I would not have been able to deal with the losses and rejections that I had in my future goals that I thought were perfect. Fr. Tom, our site supervisor in one of his homilies said, "if you want to make God laugh, tell him your plans.” It was almost as if it was just me and him and he was saying to directly to me. I began to think about my own life and realized how things won't always go the way you want it to, even though all the initial conditions are perfect. My mind, no matter how technical or practical it is, cannot possibly grasp the understanding of the future and its relation to time. Time seems to have the final word and the best way to deal with it is with patience.

At St. Rita's commencement I heard the following quote which will help me come down the mountain of this volunteer year: “When you have come to the edge of all light that you know and are about to drop off into the darkness; Faith is knowing one of two things will happen. There will be something solid to stand on or you will be taught to fly.”

It was fun year, now welcome to the good life I guess.

Sunday, June 22, 2008

Music is so Awesome

Another three month recap...

1. Tokyo Police Club
2. Say Anything
3. Royksopp
4. Owen
5. Vampire Weekend
6. Cartel
7. Someone Still Loves You Boris Yeltsin
8. Death Cab for Cutie
9. Appleseed Cast
10. Mates of State

TPC is ridiculously good, so no surprise there. They are all good. Who am I kidding?

Wednesday, June 4, 2008

Death Cab for Cutie: Live at Millennium Park

Last night, Death Cab for Cutie played at the Jay Pritzker Pavilion at Millennium Park in Chicago. Although I wasn't allowed in because of my camera I was still able to listen to the entire show clearly, while I took pictures around the park. Here is the setlist from last nights show. I am pretty sure this is accurate and in order:

1. Bixby Canyon Bridge
2. The New Year
3. Photobooth
4. Crooked Teeth
5. Long Division
6. Grapevine Fires
7. A Movie Script Ending
8. Company Calls
9. Company Calls Epilogue
10. Soul Meets Body
11. I Will Follow You into the Dark
12. I Will Posses Your Heart
13. Cath...
14. No Sunlight
15. Sound of Settling
16. Marching Bands of Manhattan

Encore
17. You're Bruise
18. Title and Registration
19. 405
20. Your Heart is an Open Room
21. Transatlanticism
Overall I think it was an excellent concert despite the fact that I wasn't in the pavilion.I heard the concert with ease and took mad pictures. Let me know if any of these are wrong.

Friday, May 30, 2008

Titaaataifa

And were back. So much for a weekly column. Maybe the second time around. Anyway, let's get on to things I think are awesome, and therefore, are in fact, awesome.

A solar powered world would be amazing. Maybe in 20 years? Yes we can! CNN had a nifty little article about big solar collectors that would float in a geosynchronous orbit and beam energy back to the earth via electromagnetic waves. A Pentagon report reported that, "A single kilometer-wide band of geosynchronous Earth orbit experiences enough solar flux in one year to nearly equal the amount of energy contained within all known recoverable conventional oil reserves on Earth today."

Well then, why don't we do it? Apparently the billion-dollar-plus price tag is seen as too expensive, in addition to the fact that NASA has yet to produce an easier way to getting up into space. I wonder if the 500 billion we've dumped into the Iraq conflict could have footed the bill.

Fox News to show clip of E.T.

I always had a thing against Fox News, although I rarely could put my finger on it. Maybe it was their incessant spewing of right wing garbage while claiming themselves to be a more "legitimate" news agency. Well, they've proved their worthiness once again with this little number.

Friday, May 23, 2008

Augustinian Volunteers: A Desire to Serve

The following is a talk I gave at one of the St. Rita Novena masses about the Augustinian Volunteer program. Enjoy reading and please let encourage anyone you know to a year of service:

The Augustinian Volunteers have sites in Bronx, New York, Chicago, Illinois, Lawrence, MA, which is outside of Boston, and San Diego, CA. Two international sites in Peru and South Africa. Our headquarters is in Philadelphia, PA in the Augustinian Province of St. Thomas of Villanova.

As Augustinian Volunteers we are no different than any other volunteer program with the service we perform. We serve others in various sites including schools as teachers, teacher's aids, campus ministers, coaches, mentors, after school programs, in youth ministry, social services (such as serving in soup kitchens, homeless shelters, delivering food, teaching English as a Second Language, working in immigration centers) and various other locations.

If you were to ask us for the reasons why we decided to volunteer, we would say reasons like giving back, or to serve others, or to learn more about ourselves, or that we had this desire to serve for a year. All reasons which reveal the truth about being Christian. As Pope Benedict says, "Being Christian is not the result of an ethical choice or a lofty idea, but the encounter with an event, a person, which gives life a new horizon and a decisive direction." It is in the interactions we have this year that we become able to better understand and to know ourselves. Whether its helping a 13 year old mother pay for school, teaching a student how to solve a problem, being with a student who just lost a parent, or teaching the fundamentals of a sport, we come to recognize who we are as Christians.

What makes the Augustinian Volunteer program so unique is its spirit in the Augustinian tradition. A tradition built upon the practice of living in community. Together, the six of us live in a house in the south side of Chicago. There we share in each other's faith, hope, affections, ideals, feelings, thoughts, activities, responsibilities, failures, and praises. Together we live with the foundation of one mind and one heart intent upon God in all that we do. Furthermore, our community is supported by the Augustinian Community here at the St. Rita monastery. Together with the Augustinian community, the volunteer community, and the respective work sites, it is hoped that as the volunteer helps the lives of others that their lives may be enriched as well.

We all can truly agree that although there has been many challenges and obstacles that have come into our lives this year, it has been the experiences with each other and sharing in the lives of each other that has allowed us to conquer individual and communal challenges.

The Augustinian Volunteers accept men and women between the ages of 21 and 29 years of age with a college degree or equivalent work experience. Volunteers should be committed to a Christian lifestyle, have the ability to live with others in a community-like settings and possess a desire to serve others. A desire which reflects St. Augustine's own restlessness to know God.

If you or someone you know has a desire to serve others in a powerful and rewarding way, please encourage them to learn more about the possibility of volunteering for a year with the Augustinian Volunteers. Some people say that volunteering is taking a year off from your life and the real world. Well there is nothing more real about the experiences we have had this year and to come to know who we really are. So please encourage young people you know to look into the Augustinian Volunteers. In tonight's bulletin there is a website address for more information and how to apply. Myself and the other volunteers will be available after mass tonight if you would like to talk to any of us about our experiences. Thank you, and may God continue to bless the Augustinians, both religious and lay people in the work they do.


To learn more about the Augustinian Volunteers please visit http://www.osavol.org

Wednesday, May 14, 2008

Haterade

While I am a fan of Ubuntu, this blog has been a little technical as of late. To break this Linux how-to streak, and being that I am a hater, here's a list of things that have been pissing me off lately:

1. Girls with Big Sunglasses

Big Sunglasses are like a false advertisement, they usually hide some weird face shit like stinkeye. They can make a chick look super hot, but take them off and some blackmagic makes them gross...shitsweak.

2. Little White Chicks in Big SUVs

Little White Chicks (LWCs) are generally not all there. They might be paying attention for the 0.2 seconds they're not drinking their Mocha Iced Frappacino from Starbucks or texting their BFF Jill, but for the most part they are unaware of their surroundings. So I ask, why in the hell would anyone sell the most dangerous type of vehicle to the most unaware type of person. Although I guess throwing a dull knife into a room full of emo kids is a worse idea, depending on how you look at it.

3. Keeping Up With the Kardashians

I'll save you some time. Kim Kardashian has a big ass and talks too much. The End.

4. This: Gross!

5. NOT This: AWESOME!


Well enjoy. Migga out.

Monday, May 12, 2008

Batch Convert FLV to MP3

Many times on youtube I find concert videos or acoustic shows that I want to keep for later. Using the Firefox plugin VideoDownloader, I can download these videos as flv files but these flv's are not as portable as mp3. So I searched for a way to convert flv to mp3 and found help on the Ubuntu forums.

After looking at the script and looking at my flv files, I noticed that it would be very inefficient to do each file individually. Therefore, I modified the script to convert a whole folder of flv's. I will show the whole script itself and how to run it, but first lets install some programs that we need in order to convert the flv's.

sudo apt-get install ecasound mpg123 lame ffmpeg

The script itself is the following:
#!/bin/bash
# FLV to MP3
#flv2mp3.sh

FLV_FILE=/home/ditto/Videos/
cd $FLV_FILE

for vid in *.flv
do
ffmpeg -i $vid -f mp3 -vn -acodec copy /tmp/temp.mp3
ecasound -i /tmp/temp.mp3 -etf:8 -o ${vid/.flv}.mp3
rm -f /tmp/temp.mp3
done

exit 0

I save my scripts in a ~/scripts and don't forget to make the script executable.
chmod u+x flv2mp3.sh

Run as follows:
user@home:/scripts~$ ./flv2mp3


Let's take a closer look at the code.
FLV_FILE=/home/ditto/Videos/
cd $FLV_FILE


FLV_FILE is the location of the flv video files that we want to be converted. In the next line, the directory is changed to the location of the videos.

Next, we will look through the files in that directory, only using the .flv files. Notice:
for vid in *.flv
Next we will convert the video to mono audio and create a temporary mp3 called temp.mp3
ffmpeg -i $vid -f mp3 -vn -acodec copy /tmp/temp.mp3
Since the audio by default is mono, we will then convert it to stereo, output it into the current directory, and save it as an mp3, while keeping the basename. The file is renamed by ${vid/.flv}.mp3
ecasound -i /tmp/temp.mp3 -etf:8 -o ${vid/.flv}.mp3
rm -f /tmp/temp.mp3
That is pretty much it. Any comments or ways to make it better, please let me know.

Friday, May 9, 2008

Setting up Broadcom B43 Wireless with Ubuntu 8.04

After installing 8.04, I never had a chance to test wireless until now. I was always plugged the ethernet in under my desk. I notice one time at home that Fn-F2 was not enabling my wireless radio. I checked hardware drivers in System->Administration->Hardware Drivers. My Broadcom B43 wireless driver was in use but no enabled. When I clicked enable, it would install drivers and prompt for a restart. After a restart, it was again unchecked as enabled.

I looked on the ubuntu forums and google to see if anyone else was having problems. I found this tutorial but the last step was causing me trouble so I decided to modify it for you.

First, you can find out what Wireless Card you have by typing
lspci
Mine is:
Broadcom Corporation BCM4309 802.11a/b/g (rev 03)
I like to keep everything I download to install in a properly named "Installs" folder

So lets begin. This will allow us to build the driver

sudo apt-get install build-essential
Now make the Installs directory and download b43-fwcutter which will allow us to extract firmware for Broadcom driver
sudo mkdir ~/Installs
cd Installs
wget http://bu3sch.de/b43/fwcutter/b43-fwcutter-011.tar.bz2

Now we are going to extract and compile
tar xjf b43-fwcutter-011.tar.bz2
cd b43-fwcutter-011
make
export FIRMWARE_INSTALL_DIR="/lib/firmware"

Now we are ready for the firmware and to properly install it.
wget http://downloads.openwrt.org/sources/broadcom-wl-4.80.53.0.tar.bz2
tar xjf broadcom-wl-4.80.53.0.tar.bz2
sudo b43-fwcutter -w /lib/firmware broadcom-wl-4.80.53.0/kmod/wl_apsta.o
The output should look something like this:
This file is recognised as:
ID : FW11
filename : wl_apsta.o
version : 351.126
MD5 : 9207bc565c2fc9fa1591f6c7911d3fc0
Extracting b43/ucode4.fw
Extracting b43/ucode5.fw
Extracting b43/ucode11.fw
Extracting b43/ucode13.fw
Extracting b43/pcm4.fw
Extracting b43/pcm5.fw
Extracting b43/b0g0initvals4.fw
Extracting b43/b0g0bsinitvals4.fw
Extracting b43/a0g0initvals4.fw
Extracting b43/a0g0bsinitvals4.fw
Extracting b43/b0g0initvals5.fw
Extracting b43/b0g0bsinitvals5.fw
Extracting b43/a0g0initvals5.fw
Extracting b43/a0g1initvals5.fw
Extracting b43/a0g0bsinitvals5.fw
Extracting b43/a0g1bsinitvals5.fw
Extracting b43/lp0initvals13.fw
Extracting b43/lp0bsinitvals13.fw
Extracting b43/b0g0initvals13.fw
Extracting b43/b0g0bsinitvals13.fw
Extracting b43/a0g1initvals13.fw
Extracting b43/a0g1bsinitvals13.fw
After that, restart the computer and your radio should be working. Make sure, that in the BIOS, the wireless device is set to on/fn-f2. You can load BIOS by tapping F2 while the computer is turning on.

Tuesday, April 29, 2008

Hardy Heron Hottness

On April 24, Ubuntu 8.04 codename Hardy Heron was released. The 8 refers to the 2008 and 04 because its the fourth month of the calendar year.The installation was flawless and the only techie thing I did was make a /home partition so that I could save my home directory for future updates. I also wrote over my Windows partition, so there is no way I can use windows apps except through wine.

The installation continued with a couple of questions about username and password, timezone, and a few others. After I rebooted, I was immediately prompted with the option to enable restricted drivers for my ati video card and broadcom wireless. Then wireless and desktop effects worked like a charm. Of course you need to install advance settings.
sudo apt-get install compizconfig-settings-manager.
New with Hardy is a simple configuration gui which can be installed with:
sudo apt-get install simple-ccsm
Installed with Hardy is Firefox 3 beta 5 and also the default bittorrent client Transmission. Also, playing music has been a breeze except for of course protected m4p files. Restricted codecs can be installed by Aplications->Add/Remove then look under all available apps and type in 'restricted'.

So far, I have been using many of the default applications for my needs. Pidgin instead of Kopete, Transmisison instead of qbittorrent, Rhythmbox instead of Exaile. I haven't decide which email client to use, Thunderbird or the default Evolution. For now, I just keep gmail.com open on a tab in Firefox.

F-Spot is a program I wish I used before to organize my photos. It has a great import tool that will tag your pictures. Also, you can export directly to sites like Flickr and Facebook.

Linux is so much easier for me to use and its exciting to support open-source. Linux is no longer an alternative to Windows. It is my OS!

Download the torrent here

Update: I forgot to mention the awesome feature of Wubi which installs Ubuntu as a program on Windows. Perfect for anyone who is unsure about trying Ubuntu and does not want to mess with partitions or losing data. Pass it on!

Friday, April 18, 2008

TeX the World

I found a pretty awesome plugin for Firefox that will display TeX and LaTeX expressions right in your browser, great when scanning through physicsforums.com or other super trendy sites. Be sure to Tex the World.

[;u_t=k\nabla^2 u;]

Get the plugin for the proper display.

Monday, April 14, 2008

Download Archive of Tweets

Today I came across a script written in Python to download all of your Twitter updates. This has a lot of possibilities for me since it will be in xml format, which will allow for many transformations. Perhaps create a nice time-line, as the author references, or create tags for myself to see how often I do something. I am very excited to see where this will lead.

I expect to customize the script for my liking and compatibility. Stay tuned for updates.

Sunday, April 13, 2008

Titaaataifa

A new weekly column here at four loves four, "Things I think are awesome, and therefore, are in fact, awesome", starts now!

I can't imagine I'm alone thinking the music service Pandora is one of the coolest things found on today's interweb. It hands down is the best streaming radio available, specifically because it uses the power of the music genome project. However, being that I'm a music-elitist and geek all in one, I've been tracking my music habits with the scrobbling service provided by last.fm for over three years now. As you can imagine, I was devastated when I had to make a decision whether or not superior streaming radio was an excuse to no longer have my listening preferences tracked. Then I found Pandora-fm, a hack/mod/whatever that scrobbles songs you listen to on Pandora to your last.fm account.

Awesome!

Friday, April 11, 2008

Three Years of Last.fm

So today marks the three year mark as a member of Last.fm, formerly audioscrobbler.com. I know there was a long period of time when I didn't have the plug-in hooked up, so my tracks played number is definitely a little lower than normal. Anyway, here are the top ten artists for the past three years, averaging about 11 tracks per day.

1. Coldplay*
2. Death Cab for Cutie
3. Pearl Jam
4. Led Zeppelin
5. Radiohead
6. Incubus
7. Red Hot Chili Peppers
8. Foo Fighters
9. Counting Crows
10. Collective Soul

* - Coldplay was left playing over the weekend in my office.

Tuesday, April 8, 2008

Great American Inventions

For my first posting, I would like to discuss what, in my opinion (and I'm not exaggerating), is the greatest invention of all time. I mean, totally dominates sliced bread or the wheel. I'm talking of course about the Wawa Pancake Sizzli. This breakfast sandwich is the very definition of innovation. (I took a class on innovation; I know what I'm talking about.) At its core, the Pancake Sizzli is not all the different from a regular breakfast sandwich. A scrambled egg patty on top of sausage, all topped with American cheese. (Yes, I realize it is white American which is a concern, but I'm willing to let it slide.)

Here is where the main issue comes into play, the ingredient to shield this core of breakfast awesomeness. This is where Wawa really let the creative juices flow. (that's what she said.) Instead of the boring/typical/lame English muffin, Wawa slaps two PANCAKES around this beefy core of tastiness. (that's what she said.)

Fig 1 : A Slice of Heaven


Two pancakes. It doesn't sound like a big deal, but let me break it down for you:

1. English muffins are bland, pancakes are ridiculously tasty.

2. English muffins have those stupid cornmeal things all over them leaving a giant mess on your car/pants/boxers, pancakes are clean.

3. English muffins are English. Pancakes are American.

4. English muffins have lame nicknames like: Hot muffin or breakfast muffin. Pancakes have cool nicknames like: Hotcakes, griddlecakes, or flapjacks.

5. A breakfast sandwich with an English muffin does not leave you anything to remember it by (aside from increased risk of heart attack). The Wawa Pancake Sizzli is so generous that it leaves your hands SMELLING LIKE PANCAKES!

I know what you're thinking and/or saying out loud, "I probably don't want my hands to smell like pancakes." You're lying and you're an idiot. Pancakes might be one of the best smells in life, and your hands will smell like pancakes all day, making life that much more enjoyable. So go out and experience this creation of the gods because it’s Flippin' Sweet.

Friday, April 4, 2008

Update Kopete with Twitter Status

I love how twitter can update my facebook status but it would be even better for it to update my away message for gchat and aim while on kopete. The most important finding for me was the dcop command for kde programs. The usage of the command is as follows:

dcop kopete KopeteIface setAway "away message" false


Once I figured that out, I surfed around the Twitter API for my favorite scripting language wrapper, python. So after install python-twitter, I created a script that will check my Twitter status every minute and update by away message for kopete.

#!/usr/local/bin/python
import twitter, os, time


while True:
api = twitter.Api()
user = ""
statuses = api.GetUserTimeline(user)
stat = [s.text for s in statuses]
stat = str(stat[0])
os.system("dcop kopete KopeteIface ...
... setAway \"" + stat + "\" false")
time.sleep(60)


So just have this script load at start up and your away message will change even when you aren't there. I know this isn't the best way to code it, but it works :P

Comments Please

Speaking of blogs, check out today's XKCD here.

Thursday, April 3, 2008

1st Quarter Audio Recap

Top ten artists, 1/1/2008-3/31/2008:

1. Sufjan Stevens
2. Blink 182
3. Pompeii
4. Jack's Mannequin
5. Vampire Weekend
6. Say Anything
7. Chris Walla
8. Owen
9. Weezer
10. The Starting Line

I was at first surprised to see Blink that far up there, but I do roll through that playlist frequently enough. Nice work Pompeii, only 10 or 11 tracks released and you still get on the podium.

Oh, and in the spirit of March...

Last four out:

11. The Cure
12. Frou Frou
13. Stars
14. Nada Surf

Bubble watch!

Wednesday, April 2, 2008

Conky - The Ultimate System Monitor


Conky is my new favorite thing about linux. I used to be all about the flash compiz desktop effects but that wore off. I still turn it on to impress people about linux, hopefully converting a few. Conky, allows me to know a plethora of information just on my desktop, without the bells and whistles. An added bonus is that you can display outputs from scripts. The screen shot above shows weather and also if I have new gmail. I am currently working on a script that will tell me about my friends' twitter updates
sudo apt-get install conky

Utilities

With all the social networking, instant messaging protocols, internet applications, email accounts, et cetera, anything that helps me consolidate is always advantageous. Listed here are a few sites I've found really useful over the last few months.

meebo.com
- It's been around for a while, but its simplicity always brings me back. Great for multi-protocol (aim, gtalk, yahoo, all at once) instant messaging while not at your own computer.

pidgin.im or adiumx.com - Great open source multi-protocol instant messaging clients for pc/linux and mac. Totally customizable, change the colors, the sounds, whatever. Add-free awesomeness.

twitter.com - Just got into this yesterday. Manage your status from IM or phone via sms and your status update can be relayed to all your IM accounts, facebook, myspace, blogs, and such.

senduit.com - Upload a file up to 100 mb and you'll get a private link to share with whomever you wish. You say how long the file is hosted, from 30 minutes to 24 hours.

socialthing.com - Still in beta, haven't been able to test yet, but looks amazing. Consolidate all the feeds from any social communities you may belong to.

Monday, March 3, 2008

A Regularly Played Out Hypothetical Situation

I'm sitting in my living room. I look outside. Wow, there's a broken down limousine outside in the street, and a man in a suit approaching my lovely home. I answer the door.

"Yes, can I help you?"

"I'm with Senator Obama, we are having some vehicle issues, may we come in while we wait for the backup vehicle to get here?"

"Sure, make yourself comfortable."

Would this really happen? No. Of course not. Why would anyone want to relax on my 1980's leather section (for which I have a deep love) when they could chill out in their limousine? There is no reason. But I'll continue the daydream anyway.

I'd probably offer him a beer, but I'm not sure if he'd take it. Maybe if it was late, and he was on the road for a while, and some secret service guy took a test sip to make sure it wasn't poisoned, or skunked maybe.

Either way it would be such a trip. Actually talking to someone and only asking the questions you care to know the answer about. Not watching Lou Dobbs be a dickhead on CNN. Just, being chums with Barrack Obama. Or McCain. Or whoever.

Next time I see a limousine at the end of the road I'm spreading tacks in front of my driveway. Like a fancy celebrity mouse trap. Only no glue pad or poison. Just tacks.

Friday, February 29, 2008

Lenten Reflection - OSA Volunteer Style

The following is a reflection I did for the readings of today.

Hos 14: 2-20 / Ps 81: 6c-11b, 14-17 / Mk 12: 28-34

Throughout this year we are asked to be the ones who need to comfort others, to have all the answers, and to always do what is right. Yet, where do we turn in times of need? Where are the answers to our questions? Why can't the people we serve have better lives? In today's readings, we find the message needed for us to comfort our worries and fears. The answer to all of our questions is found in God, a God who loves.

At orientation we heard the phrase “One mind and one heart intent upon God”. Have we been living our volunteer year with one mind and one heart towards God? Where in our lives have we recognized God's love for us? God wants us to come to him, just as the Psalms remind us: “In distress you called, and I rescued you; Unseen, I answered you in thunder...If only my people would hear me, and Israel walk in my ways”. We are the obstacle to this love. It is up to us, to hear the Lord and to love Him in return. Let us not forget the greatest commandment as told by Mark in today's Gospel: “Therefore you shall love the Lord your God with all your heart, with all your soul, with all your mind, and with all your strength; You shall love your neighbor as yourself.”

As we continue to celebrate the life of Jesus and prepare for his death and resurrection, let the answers come from within. A love of God that is rooted within will lead to self discovery, help to strengthen our communities, and settle all of our worries.

~ ob

Friday, February 22, 2008

Chicago from the Pier


A view of downtown Chicago just south of Navy Pier. I am pretty happy with the results. The light on the right was really blown out so I did a poor job darkening it a bit. I did selective desaturation on the snow in the foreground because it was neon green.
Shutter speed was 2 seconds and F/5.0 with a nikkon 28-80mm f3.5-4.8 lens.

~pjob

Tuesday, February 19, 2008

What is four loves four?

The simplest way to define that which seems temporarily indefinable is to break it down into it's more definable component parts. Let's try this.

We have these lovely bookends, four and four. What is four? Why are they there? What do they mean? Who put them there? How did they get put there? Where is there? Let's turn to Wikipedia. "4 (four) is a number, numeral, and glyph. It is the natural number following 3 and preceding 5. Four is the only number in the English language for which the number of letters in its name is equal to the number itself. This is also true in several other languages." Wow four. You've certainly got a lot going for you. I'm glad we picked you to be in the title of our lovely little project here. Thanks buddy.

So now to the crux of the matter, our centerpiece, love. Ask different people what love is and you're sure to get different definitions. Ask a tennis player and he or she might say zero. Why you ask? Well this I can explain without Wikipedia. Tennis was invented millions of years ago by the tyrannosaurus rex, and when making the rules the t-rex wanted love to by synonymous with no score, because he loved when his brontosaurus opponents had no score. It's fact. Check Wikipedia. In... five minutes (or when I'm done with this post). Anyway. Love is caritas. And our good Pope Benedict XVI was right when he said deus caritas est.

But most important. Four love four (404) is an html not found error. Like 404, you will not find material worthy of glossy-paged magazines, hard-cover books, or gold-frames here. What you will find is a wonderfully mediocre attempt at creativity by individuals who so desire to be creative, perfectly suitable not for the above, but for the gigantic trash-can that is the interweb. So keep posted, stay tuned, and click refresh in your browser from as many unique IP addresses as you can (it boosts our ego).

Until later,
Doodah