QUOTE: Unexpected

Linked, Quotes No Comments »

Every outcome in life should always be expected, because the course of life is unexpected

- Me

Expect the Unexpected

photo courtesy of AP - Associated Press
AP Photo
13 months ago

A child looks at a crying man as the survivors mourn for the earthquake victims in Chengdu, China’s southwest Sichuan Province Tuesday, May 20, 2008. China said it was struggling to find shelter for many of the 5 million people whose homes were destroyed in last week’s earthquake, while the confirmed death toll rose Tuesday to more than 40,000.

Apple Awarded Patent for Iphone Interface [Slashdot]

Linked, Mac, Tech No Comments »

In response to the article on Slashdot:

Patents aggravate me sometimes, especially when it comes to software. I just hope they (Apple) are doing it from preventing other companies like Creative from coming up with the patent first and suing Apple (even I thought that was dumb of Creative to patent the iPod-like interface and sue Apple, who came up with it relatively first. I have since then banned from ever buying a Creative product again) . But if they’re in the hopes of suing other companies instead of making the software open to others, then consider my investment in Apple to be no longer

QUOTE: Advice for Dragon Slayers…

Linked, Quotes No Comments »

Do Not Call Victory in Advance.
Do not call victory in advance

I really liked the message and thought I’d share.

from Mattias Inks

QUOTE: tonbi ni abura age [japanese]

Linked, Quotes No Comments »

tonbi ni abura age
if you take too long to enjoy something, it’ll be taken away as if by a bird

- Samurai Champloo Episode 10

(As you can tell, I’m addicted to Samurai Champloo)

Nujabes (Downtempo/Trip Hop/Lounge)

Beat Savvy, Linked, Music No Comments »

I got introduced to Nujabes by a few a friends, and am now HOOKED!

I found a bunch of tracks on Youtube and decided to make a Youtube playlist. Here it is:

Playlist Link

An oldie, but kinda goodie…

Linked, Mixes No Comments »

This was a Goodphil inspired mix that I did about 8 years ago on Sonic Foundry’s Acid Software. It was my first attempt at making a mix of different cuts here and there on the program, so be warned its very, very raw.

The beginning gets pretty hype, but after awhile it gets rather annoying because of the repetitiveness. I call it the “Art of the KLF BodyRock Nation”. Anyways, enjoy


Barney’s Top 10 List (How I met your mother)

Linked, Videos No Comments »

Clip from How I Met Your Mother, where Barney (NPH) does a Top 10 List (tribute to David Letterman’s Top 10 List)

[Also trying out a new feed to propagate to Facebook]

Quick Password Policy Function in PHP

PHP, Security No Comments »

Just a quick password policy function in php. Didn’t want to have to dig around to figure out how to do it again, so I’m just posting it here

/* * * * * * * * * * * * * * * * * * * * * * * * *
Password Policy requires
– at least 8 characters
– at least 1 lower case
– at least 1 upper case
– at least 1 digit
* * * * * * * * * * * * * * * * * * * * * * * * * /
function pwdPolicy($pwd){
   $policy = “/^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/”;
   if(preg_match($policy, $pwd, $matches)){
      return true;
   } else return false;
}

Help Pandora from the greedy NAB

Beat Savvy, Make A Difference, Music No Comments »

I got this in my inbox earlier from Tim (founder of Pandora):

Hi, it’s Tim from Pandora;

After a yearlong negotiation, Pandora, SoundExchange and the RIAA are finally optimistic about reaching an agreement on royalties that would save Pandora and Internet radio.  But just as we’ve gotten close, large traditional broadcast radio companies have launched a covert lobbying campaign to sabotage our progress.

Yesterday, Congressman Jay Inslee, and several co-sponsors, introduced legislation to give us the extra time we need but the National Association of Broadcasters (NAB), which represents radio broadcasters such as Clear Channel, has begun intensively pressuring lawmakers to kill the bill. We have just days to keep this from collapsing.

This is a blatant attempt by large radio companies to suffocate the webcasting industry that is just beginning to offer an alternative to their monopoly of the airwaves.

Please call your Congressperson right now and ask them to support H.R. 7084, the Webcaster Settlement Act of 2008 - and to not capitulate to pressure from the NAB.  Congress is currently working extended hours, so even calls this evening and over the weekend should get answered.

If the phone is busy, please try again until you get through. These calls really do make a difference.

Representative Lloyd Doggett: 202-225-4865

Thanks so much for you ongoing support.

Tim

Make an effort and contact your congress person and let them know you don’t believe that the NAB’s  (National Association for Broadcasters) persistence and lobbying on this matter is right.

We can’t let these corporations continue to make music less enjoyable. I, for one, am tired of listening to the same song run 10 times in 1 hour. Pandora and many of the music web products out there don’t do that. Again, I know this sounds like a pain to do, but you could make a difference and actually see a great product emerge in a positive way…and be completely legal!!

====================================

UPDATE: Another email from tim. The house of reps took the leap and are supporting the bill, now its time for the senate…

Hi, it’s Tim from Pandora;

Today, thanks to the extraordinary support of many Pandora listeners, we took a giant step forward when the House of Representatives supported Pandora and Internet radio and passed the Webcaster Settlement Act of 2008.  Now we need your help so that the Senate will pass it also - and quickly… The finish line is in sight!

After a yearlong negotiation, Pandora, SoundExchange and the RIAA are finally optimistic about reaching an agreement on royalties that would save Pandora and Internet radio.  The legislation would give us the extra time we need to finalize the deal.

Please call your Senators Monday morning starting at 9:00 (Eastern) and ask them to support the Webcaster Settlement Act of 2008.

The person who answers the phone in your Senator’s office may ask for the bill number - it’s H.R. 7084 (if they ask for a Senate bill number, you can assure them that in this unusual case, the Senate is actually voting on the House bill number).

Senator John Cornyn: (202) 224-2934

Senator Kay Bailey Hutchison: (202) 224-5922

If the phone is busy, please try again until you get through. These calls really do make a difference.

Thanks so much for you ongoing support.

Tim

jsVim - Vi control for your browser!

Javascript, Programming, Projects, jsVim 1 Comment »

If you like keyboard shortcuts, or you know how to use Vi to control navigation of a page, then you’re going to love this! (this is not to be confused by jsvi which allows vi control for a textarea in your browser)

I used to use a Firefox extension called Vimperator that basically allowed me to control and navigate through websites using the keyboard with Vim like commands. It was a good tool, actually a great tool, but I got frustrated when I didn’t have this same functionality on Safari, or any Fluid apps (making web apps into a distinct desktop application).

I had planned initially on making jsVim work with websites I developed, but then I realized not too many people would be happy with Vim control on those pages, unless I had a unique activation key event that enabled the rest of the key commands. But anyway, I digress. So it occured to me that making it cross browser specific would be ideal, and the use of Grease[monkey,kit] would allow me to do that.

So long story short, I developed jsVim in javascript form and then created an accompanying Grease[monkey,kit] script to utilize jsVim. There’s still much work to be done (incorporating keyboard events for links/hrefs/onlicks, search/find, colon[:] console commands, etc), but I think what is available is a pretty good start to get this out into the wild.

You can use svn to check out the code, or you can just install the greasemonkey script and get to work using it right away (if you have grease[monkey,kit] already installed).

Greasemonkey script

SVN
svn co http://svn.jadecell.org/jsvim/

Here are some useful commands that should get you started working around in your browser:

  • ‘j’ - scroll down on the page (like using the down arrow)
  • ‘k’ - scroll up on the page (like using the up arrow)
  • ‘Shift+j’ - scroll down a full page (like using the Page Down button)
  • ‘Shift+k’ - scroll up a full page (like using the Page Up button)
  • ‘h’ - scroll left on the page (like using the left arrow)
  • ‘l’ - scoll right on the page (like using the right arrow)
  • ‘Shift+h’ - Go Back in history (like the browser back button)
  • ‘Shift+l’ - Go Forward in history (like the browser forward button)
  • ‘Shift+g’ - goto the bottom of the page
  • ‘gg’ or ‘U’ - goto the top of the page
  • ‘Alt+Shift+?’ - disable jsVim keyboard shortcuts
  • ‘Esc’ - re-enable keyboard shortcuts, remove cursor in a form field from view, remove bottom console window

The next big TODO, is to get link navigation working and a full out help menu when you press the ‘?’ in the window.

Any other ideas and comments are always welcome.

===================

UPDATE:
This script will not work with Firefox’s quick search. Be sure to uncheck “Search for text when I start typing” in the Preferences >> Advanced >> General settings. I’m sure there is a workaround for this, but in the meantime, to get quicksearch up is to type ‘/’, i’ll have my quicksearch disabled until I can get this to work well.