Sunday, November 1, 2009

Creating PDFS from virtually anything w/ linux

So recently I was asked (by my wife) if I would be able to join different web pages together all into 1 file for printing and storage. I thought it would take a very long time but turned out to be quite easy. Here's a lil how to:

  • Print each page/image/document to file (i usually name it an autoincrementing filename aka  1,2,3,4,...)
    • this stores the page as a PostScript file (even works in Windows) 
  • Join all of the PS files together to form a huge PS file
    • you do this using the ps-utility     psmerge
      • psmerge -oOutputFileName file1 file2 file3
        • you can include as many files as you want in order
        • there is NO space between the -o option and the file name
  • turn the PS file into a PDF file
    • use the ps2pdf utility 
      • ps2pdf psfile.ps pdffile.pdf
 This seems pretty straight forward but can be quite tedious if you have MANY MANY files to do at once.

Below is a python code that will make this process easier. It renames files (so they can be sorted properly) and generates the command (quite large at times) to perform the operation

 #!/usr/bin/python
import os
path='/home/paul/printer/dadsWorksheets/multiSpaceShip/psFiles/renamed/'
files = os.listdir(path)
files.sort()
##rename = True
rename = False
if rename:
    for i in files:
        name = i
        if len(name) < 3:
            name = '00%s' % name
        if len(name) > 3:
            name = name[1:]
        print name
        command = 'cp %s/%s %s/renamed/%s' % (path,i,path,name)
        os.system(command)
#print files
merge = True
##merge = False
if merge:
        com = 'psmerge -oCombined'
        #print com
        for i in files:
            com = ' %s %s' % (com,i)
        print com
        os.chdir(path)
        os.system(com)

 its simple and quite crude but it gets the job done quite nicely!!
give it a shot and you'll be storing stuff as PDFs in no time!

Wednesday, October 28, 2009

UFC Ultimate FIghter letdown...

I am completely disgusted... can they honestly NOT find decent competitors for this show anymore?

That first round on tonights TUF  was a fucking joke. Standing up with just punches and hands down the whole time... Anyone with ANY experience (hell even Kimbo slice...) would have ended that fight in the first 30 seconds... But no.. Dana White goes 'OMG OMG OMG' at the commercial break as if it was an amazing round... It sucked beyond comprehension!

People who know me, know that I studied martial arts for 8+ yrs.  If that round is the caliber of fighters that is available in todays market.... its a sad sad world indeed.. Even my 'out of shape' ass could have destroyed anyone of those jokers in that first round...

2nd round starting now... will it be better? i doubt it...

Wednesday, October 14, 2009

Friendship and its eventual let downs...

I have been pondering about friendship.

You have different friends during different times of your life. If you're lucky, you will have excellent friends during those times. These friends feel like they will always be friends no matter what happens nor how much time passes.

But, sadly, thats not how it usually happens. The people you thought were the closest to you drift away... People you would share everything with, be there for, spend some of the funnest/sadest/closest times with will slowly disappear.

If you're truly lucky and blessed, there will be the occasional few who will be there. Those are true friends. The ones where you can just pick up where you left off with minimal/no awkwardness... Keep them close to you. They're worth their weight in gold.

You will have nostalgic moments of envy for past experiences with friends. These feelings will bring emotions of joy, humor, and sadness. The only thing you can count on... just like your past close relationships, these feelings of envy shall pass.

Tuesday, October 6, 2009

Facebook Farmville: My Strategy for fast lvling (so far)

My schedule is pretty simple. It involves a diversified method of leveling and currently little 'niceities'...

Here is a quick image of my current farm:


in the Blue section:
Lemon Trees... As close as they can fit, this is here to take up the dead space . This will be extended on the top left 2 rows as I get more and more of them.

In the Red section:
Trees, Animals, and crops... Used to fulfil the different ribbons. Once a ribbon is complete, move on to a different type and once all of the ribbons that require space are finished, I will be using that space for tractors.

in the yellow section:
i waste one field for the pleasure of faster EVERYTHING in farmville. When you just get into farmville, you will always start in the same spot (changes only when you increase your farm size). Knowing this, I block my character with haybales. This forces him to stay in 1 spot. This eliminates the need for him to walk around to perform actions and things start as soon as they are next in queue. This eliminates a TON of time wasted and will help clear your crops, plow your land and anything else ur character needs to walk to to perform.

Thats what I do for my farm and I have gone up in lvls quite quickly. I only grow crops that I can harvest 1 time a day (fits my schedule best) and i rotate my extra $$ between 1) buying more lemon trees and 2) buying then selling  haybales for pretty cheap exp

Wednesday, September 30, 2009

My Powerlifting Regeme

I'm a big guy. I always have been and have dealt w/ this fact my entire life. I attribute it mainly to genetics (big frame) but also to my HS lifting days (mad stretch marks around the shoulder to prove it...)

Lately I have been driven to start lifting once again. I have been at it for about 3-4 weeks now and already feel stronger, slimmer and overall better in health. Its great.

I wanted to share w/ everyone (like anyone actually reads this anyway) my regiment for lifting. Its simple, quick and from every1 that has tried it... very effective at growing muscle and strength.

Powerlifting. It consists of 3 exercises:

  • Squat
  • Bench
  • Deadlift

These 3 exercises work the majority of your body and will grow muscle and make you feel strong.

I work a 2 day split. 

1st Day (Monday or Tuesday):

  • Bench Press
  • Squat
  • Pull Ups

2nd Day(Thursday or Friday):

  • Deadlift
  • Bent Row
  • Dips

Its simple and quite fast.

My workout reps & sets look as follows:

4 sets w/ one warm-up and 3 work sets. Choose a weight where you will be exhausted and pushing failure on the last work set.

The breakdown for the sets is as follows:

  1. 8 reps - Warmup set at 1/2 working set weight
  2. 8 reps - First Working Set
  3. 6 reps - Second Working Set
  4. 4 reps (or more to failure) - Last Working Set 

The working sets add up to a total of 18 reps. If you get 16 of those 18 reps, move the weight up for next time. If not then use the same weight for next time. Simple and easy to follow. If you see a plateau in your lifting records (and record every workout so you can actually see your progress and not 'estimate' it) such as 2-3 weeks at the same weight w/o improvement, move the weight up next workout and you'll pass it.

The glory of this system is that you're always pushing for 18 reps but will be increasing weight at 16 reps. If you focus on the 18 reps, you will almost always be moving up in weight and more weight means more muscle.

I have used this system to increase my 1 rep maxes like crazy and others (including hard gainers) have used this system to build immense strength quickly as well.

Give it a shot.


As always, comments are always welcome!

Tuesday, September 8, 2009

Decipher: First Code

At the following link is a keyfile. Use it to decode the following encoded message. I will give $20 through paypal if someone can decipher it before Sat 9/11 0001.

oopeoqvztq893llxo5cahqpm8bz90lyq9fi9u7b163dd1v2ui8xf47st7smsipzb7g9x2lh3r81o1xpn9uqdbpizjx8u68oy82nzhkcvfw402d7e6m1zra3j25dsuyz4g9wqy3nb9jhb4zhhqmc2ozv6wzcwwus3pu8kprgnmo0ml3s2w9ihqnlnheu2uzy4vskfquuf2wi7kgks52dopt9z26n3eouf8ow31ra7m1vq9uaa959dp7kwrkgwhyoebz32aw7osjddje4an9t37wda17oc123xi02n86ic9fbk850ks8f9gcp5byikg260wrh6wuat4xc3qcl6b5tcjbqjat71nez53lm7b3to19sqhfmvb96y24b209b17y870b5dtc5zfpway6j3w35pbfzspom256nqcosu1xr5ljef60sjbg70u9f13aq7vxbs42cwqql4c3rpffmoxb018f5tvptw07m2u1akx15xl40jv1dt2kqs0v2ig2ozfdh3t3nsix61xol887mj35duilfwtznh209f0kljhvxlqalhto2ibjcnkp5w857u1rtibyxs9y3e0sgpauzlghajno4mcwov8954xp9e4vjj0fwxz7yhe6o2eqnzqzamny168l76o0rcllgszsovzqppz2xqy5aeizey1w3pusxh

Check it out and we'll talk.