web
Archived Posts from this Category
Archived Posts from this Category
For a couple weeks now I’ve been wanting to create a Pandora station specifically for Bartók’s String Quartet No. 4 in C Major. I want to find more classical music that sounds like this. Now that Pandora supports classical music, I would try typing in “Bartok” into the search function, but I would get Bartok’s symphonies. I tried typing in “String Quartet bartok” but got no results because that is neither just a name of a song nor just an artist. “String Quartet No” got me intresting results, but the autosuggest listings did not give me Bartok.
Finally I figured it out: While listening to the Bartók station, I clicked on “about this artist” to go to Bartók’s page. From there I could navigate to the specific album and track I wanted, and then do “Create a Station” based on that track. Now I’m finding all sorts of cool string quartets.
Try it, it’s awesome.
0 comments Tuesday 18 Nov 2008 | jordan314 | Computers, audio, solved, web
Based on this URL hack to sort google results by date, I made a bookmarklet:
javascript:location.href =location.href + '&as_qdr=d';
Now if you google search and then click this button, it will sort your results by the newest date. Works in FF and Safari.

1 comment Tuesday 18 Nov 2008 | jordan314 | Computers, Firefox, Programming, solved, web
If you’re as obsessed as I am about tracking some packages, you’ll get sick of typing in your tracking number and submitting the form over and over. But if you go to:
http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do
it doesn’t work because the form used a POST method.
Well, on the previous page, the form input field was called strOrigTrackNum. Some sites let you post a form via the GET method, so let’s see if this works:
http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?strOrigTrackNum=[your tracking number]
Yup! Worked fine. Now you have a URL that you can bookmark to quickly track your shipment.
0 comments Thursday 30 Oct 2008 | jordan314 | Computers, Firefox, Programming, web
As neat as the accelerometers on the iPhone are for switching between portrait and landscape modes, it gets to be annoying as hell trying to read when you’re lying down. You naturally hold the phone sideways when you’re lying down, and then the screen rotates, turning the text 90° away from you in landscape mode. You rotate it back and it rotates the screen 90° away again. The makers of the eReader application have already noticed this was a big issue and corrected it with a lock orientation setting. Safari, however, still does not have this.
I just figured out a workaround: lie down and turn the phone horizontally so that it goes into landscape mode. Then, continue rotating the phone upside down. Unlike the photo application which will display photos upside down, Safari will only rotate 270° and will remain in landscape mode, so you can comfortably read google reader in bed.
0 comments Tuesday 19 Aug 2008 | jordan314 | Computers, apple, iphone, phones, safari, solved, web
I have too many calendars. I’ve managed to consolidate most of them though:
First, I synced my work Outlook calendar (on my PC) to my gcal with the fantastic app Google Calendar Sync. I gave it my info and told it to sync both ways every hour.
Then, I subscribed to my google calendar in iCal: First, in google calendar, click on Settings, Calendar Settings, Calendars, [your calendar], Calendar Address: and click on ICAL. Copy this URL, and then in iCal, paste it into Calendar: Subscribe… and have it update every hour.
And you’re done! My iPhone will only sync when I connect it to the computer, which is fine with me, but you can either subscribe to mobileme for push calendar notifications, set up text messaging alerts with google calendar, or use the web-based iphone version of google calendar in Safari.
-edit-
Edit: The events show up as separate calendars on your iPhone.
It looks like this currently does not work with mobileMe. You can convert the items to your personal calendar in iCal by exporting them and then importing them. See macosxhints workaround here.
1 comment Monday 21 Jul 2008 | jordan314 | Computers, OS X, Organization, apple, iTunes, iphone, leopard, phones, solved, web
I’m beginning to work with comet (an ajax-like technology that uses a single connection with multiple server pushes) and found this tutorial extremely helpful:
http://www.zeitoun.net/index.php?2007/06/22/46-how-to-implement-comet-with-php
However, I had to modify the code slightly to work with PHP 4, which doesn’t support json_encode. Instead I just returned the json array manually:
// return a json array
//$response = array();
//$response['msg'] = file_get_contents($filename);
//$response['timestamp'] = $currentmodif;
//echo json_encode($response);
echo "{&92;"msg&92;":&92;"" . file_get_contents($filename) . "&92;",&92;"timestamp&92;":" . $currentmodif . "}";
flush();
I don’t know enough french to navigate or comment on Zeitoun’s site so I thought I’d at least publish this here.
-edit-
Hmm, my code markup plugin seems to be deleting backslashes. I tried replacing them with &92; but they just look like &92;. So replace all &92;s above with \.
0 comments Monday 13 Aug 2007 | jordan314 | Computers, PHP, Programming, ajax, comet, solved, web
If you’re a typical web designer, when you install web packages like phpBB or wordpress or plugins like bad behavior or spam karma, you probably go to the web page that hosts the file, download it to your computer, unzip it, FTP to your host, and upload the directory to install the package.
Well, if your host has SSH access, there’s an easier way:
Go to the webpage of the file you want to download and right click and copy the link instead of downloading it.
Get putty and connect to your host via SSH on port 22, using your FTP login and password.
cd to the directory you want to download the file to (such as cd public_html/wordpress/wp-content/plugins/).
Type in this command:
wget [URL]
Where [URL] is the link to the downloaded file. For instance:
wget http://mnm.uib.es/gallir/wp-content/wp-cache-2-1-1.zip
You can right click to paste in putty, so just type wget, hit space and then right click and hit enter.
Voila! Now you’ve downloaded the package right to your host. It’s way faster too.
Wget also works great for anonymous FTP files, just paste in the URL in the same way.
After you’re done downloading, to unzip a .zip file you just type:
unzip [nameoffile.zip]
To gunzip and untar a .tar.gz file you can type:
tar -xvzf [nameoffile.tar.gz]
Voila! Then follow the instructions to continue installing your package (such as logging into wordpress, clicking on plugins and activating your plugin).
Is the directory named something different than you want? Just use mv:
mv [nameofdirectory] [newnamefordirectory]
Does the unzipped directory have an unwanted subdirectory? cd into the directory/subdirectory and then move everything down a level:
cd [directory]/[unwantedsubdirectory]/
mv * ..
This is a no brainer for your typical linux guru, but a great trick for your average web developer!
0 comments Monday 18 Jun 2007 | jordan314 | Computers, linux, phpBB, ssh, web, wordpress
Myspace spam and wordpress spam have always been a minor annoyance, but has anyone else noticed a dramatic increase in April?
MySpace Friend Request Clarice would like to be added as one of your friends! Mon Apr 02, 2007 3k
MySpace Friend Request Ida would like to be added as one of your friends! Mon Apr 02, 2007 3k
MySpace Friend Request Shannon would like to be added as one of your friends! Mon Apr 02, 2007 3k
New MySpace Message New message from Chickeee on MySpace sent on 4/1/2007 11:35 PM Sun Apr 01, 2007 3k
New MySpace Message New message from Gurleee on MySpace sent on 4/1/2007 6:27 PM Sun Apr 01, 2007 3k
New MySpace Message New message from SeXXXie on MySpace sent on 4/1/2007 6:00 PM Sun Apr 01, 2007 3k
New MySpace Message New message from SeXXXie on MySpace sent on 4/1/2007 5:05 PM Sun Apr 01, 2007 3k
MySpace Friend Request Connor would like to be added as one of your friends! Sun Apr 01, 2007 3k
New MySpace Message New message from HunnyBunzz on MySpace sent on 4/1/2007 2:16 PM Sun Apr 01, 2007 3k
![]()
There are wordpress hacks you can do to cut down on wordpress spam, but I don’t know of any techniques on cutting down myspace spam. Anyone have any suggestions? This looks like something myspace will have to fix, not something the user can do much about.
I know you can disable email notifications, but I would like to get the occasional alert when I actually do get a message or friend request on myspace.
–edit–
I finally cracked down and installed some anti-spam software for my wordpress blogs. Spam Karma 2.3 and Bad Behavior together work great! Spam Karma was especially helpful in quickly sorting and bulk deleting my 279 spam comments in moderation.
0 comments Monday 02 Apr 2007 | jordan314 | Computers, myspace, spam, unsolved, web
Note: Google recently changed their google local page and this link doesn’t work anymore. The local page exists but seems to be based on the type of query you have now (which sucks). Working on a new solution.
Props to google for their improvements on google mobile. Now it saves your location, which makes life a heck of a lot easier to find “pizza” in your neighborhood, or “ice cream” near work.
I’ve been meaning to post my google mobile hack for a while which does the same thing, but it’s still useful for its instant directions feature. Note: this is for users who don’t have the google local program (my phone doesn’t support it), but do have internet access. You’ll also need to know how to type in characters like + on your phone.
First, write down your address, and define it in your head as [your address]. Like, [your address] = 123 main street, chicago il 60626.
Next, any place there’s a space, replace it with a +, and definte it in your head as [your+address]. Like, [your+address] = 123+main+street,+chicago+il+60626.
Finally, bookmark this address in your phone, replacing [your+address]:
http://www.google.com/m?output=xhtml&site=local&q=&near=[your+address]&daddr=&saddr=[your+address]
What this does:
It gives you a page with two forms: A driving directions form with your start address already filled out, and a “find businesses near” form with your location already filled out. It’s super handy for the driving directions, because you just type in a destination address and hit submit. And it’s even handier for finding local businesses, because you can just type in a business name or category (like cafe) and it gives you a list of businesses ordered by proximity. The call link will actually call the business (most phones support this), and if you click on a business and then click on driving directions it will automatically give you directions to the destination because you already filled out your starting address.
How’d I do this? I figured out that this was the most useful page on google and bookmarked it, and then hacked the URL to always use my address. m?output=xhtml gives it in a format for your phone. site=local gives you the nice driving directions / what/where forms. q= is your query, I leave it blank so that it’s not always filled in. near= what you’re searching in, i.e. your address. daddr= is the destination address, which I leave blank as well. saddr is your start address, which is also filled in with your address. The &s in a URL just delimiate between different variables. And the +s just encode spaces into URLs.
I have this bookmark in my “goto” menu on my phone, so all I have to do is hit goto, up, send and I’m on this page for instant directions or business searches. I’ll use google’s main mobile page for business searches now that they save locations, but this is still useful for quick access.
On monday, my car broke down in a parking lot. I was able to call AAA, find a ford dealer near me, call the ford dealer to see if they’re open, and get directions to the ford dealer for the tow truck driver very quickly using this method. (I also called and emailed my friends about my change in plans. I love my phone and google!)
0 comments Wednesday 28 Mar 2007 | jordan314 | Computers, unsolved, web
-Update
I was able to fix this using this command in terminal:
apachectl configtest
This allowed me to test my config files and diagnose what was wrong with them.
-Original Post-
I have lots of cool web content served via Apache on my mac running tiger. I run a test server environment, MAMP, and a production server using tiger’s personal web sharing and entropy (a php server for os x). They used to run fine together, each on different ports, but now MAMP’s apache is always on (can’t shut it off via mamp’s app, and apache is already started on program launch), and
when I click “start” for personal web sharing in system preferences > sharing, it spins and spins as if it’s trying to start but remains grey and never becomes highlighted.
My HD is corrupted I think, spotlight has stopped functioning and mail’s search is malfunctioning. Still, I think the machine has somehow confused the two apaches, when I run sudo apachectl start (thanks to a ‘web sharing won’t start up’ thread here)I get an ‘httpd (pid 219) already running’ error.
Anyone’s help is appreciated while I deal with applecare’s worsened support hours.
0 comments Tuesday 19 Sep 2006 | jordan314 | Computers, Programming, solved, web