ø Don’t waste your time reading this blog ø

Poor Man’s Google Scrape Technique

Filed under: Uncategorized — Tags: — taewoo @ 6:52 pm March 2, 2009

How to scrape for links on Google using notepad..

This requires cygwin or some sorta shell interpreter with grep/sed capability.

1) Search for whatever you wish.  Make sure you get 100 results per page (under “advanced search”)

2) Copy paste the entire screen

  • Ctrl+A  - this selects all text
  • Ctrl+C - copies text onto buffer
  • Open Notepad (or your fav. text editor), press Ctrl + V - pastes text onto editor
  • Save (i.e. urls.txt).

3) Run this command on the file

 grep “Cached” urls.txt | sed -e ’s/ - .*//g’ -e ’s/\?.*//g’ -e ’s/^      //g’ | sort | unq

 

Voila

[Post to Twitter] Tweet This Post 

Firefox caching iframe data

Filed under: web 2.0 — Tags: — taewoo @ 1:48 pm July 10, 2008

Ok this is a repost cuz of stinkin’ DreamHost.

If you have an auto-generated iframe from a javascript, and this iframe has dynamic data, FireFox (but not IE) wll cache your data. Even if you have

<META HTTP-EQUIV=“Cache-Control” CONTENT=“no-cache”>
<
META HTTP-EQUIV=“Pragma” CONTENT=“no-cache”>

After days of pulling out my hair (or what little I have left), i found out the only way around this is by calling this in your JavaScript:

iframe.src = iframe.src;

This basically forces the browsers to reload. Not the most efficient solution but it works. Also, I haven’t tested to see if I could remove this with FireFox 3 coming out but no matter. The rest of the world is gonna take 1-2 years to download FF3 anyway.

PS: Hairloss is not due to masturbation. Thank god for that.

[Post to Twitter] Tweet This Post 

How to disable previous days in DHTML JS Calendar

Filed under: web 2.0 — Tags: — taewoo @ 1:32 pm

If you are using the DHTML JS Calendar and is trying to disable the previous days, by doing so


function dateRange(date) {
var now = new Date();
return (date.getTime() <= now.getTime() )
}

Calendar.setup({
inputField  : “calendar”,
ifFormat    : “%m/%d/%Y %H:%M %p”,
dateStatusFunc : dateRange,
showsTime   : true,
timeFormat  : “12″
});

you’ll notice that, you can’t CHOOSE any of the future dates.

The solution is from here, but i’ll repost. Edit your downloaded version of “calendar.js” and change as follows

(line 578)
Calendar.cellClick = function(el, ev) {


(line 592)
cal.date.setDateOnly(el.caldate);
date = cal.date;
if (date) {
Calendar.removeClass(cal.currentDateEl, “selected”);
Calendar.addClass(el, “selected”);
closing = (cal.currentDateEl == el);

if (!closing) {
cal.currentDateEl = el;
}
}

[Post to Twitter] Tweet This Post 

Older Posts »