Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

Wednesday, January 27, 2010

Because if you weren't supposed to abuse the api it wouldn't start with a

Of course, I mean really!

Let me say I have little sympathy with hackers from an ethical, sociological, or philosophical perspective (that's a gross exaggeration, I mean ewww, but to explicate the matter would be an even more gross waste of time)

But when it doesn't hurt, or waste people's time, or screw with peoples stuff, etc., why not tae things apart and then put them together in different ways so you can take it apart again, and so on, and so forth, and thus I decided to conduct a reflection upon the window object of javascript.

Since my sign off would be far too down at the bottom of the page let me sign off before the mark, because I can. So take it to your head, take it to your heart and remember Rand rocks. Goodnight Folks!

And God Bless.

Wednesday, August 12, 2009

How to turn a Facebook Friends List into a CSV

So here's a little something for some people who like to use things that are not nothing but rather are something, a how-to if you will, to translate a Facebook friends list into a CSV:

Facebook, it is designed to let you keep in contact with people.
Yet as most know it is not the end all of human interaction. Despite this
fact, the makers of Facebook have not made it easy to take the contact
information in Facebook and get it out.


However, where there is a will there is a way. Actually there are
many ways. Indeed there are many tools you could use for this purpose,
from the Facebook API to a Greasemonkey script. But when it comes to ad
hoc manipulation of random websites with a minimum of fuss, and perhaps
a little leeway timewise, my tool of choice is Firebug.


And thus here is a function one can put into the Firebug console and
then execute for gathering all the Facebook contact info from a My
Friends page into a CSV file (or actually a new window which can be
saved as a text file and will then become a CSV), which can be easily
imported to your email client or even phone.


NOTE: it's been a little while since I've worked on this code,
and there might be some flaws in it. No guarentee.




function fbcontactexport() {
items = document.getElementsByClassName('UIObjectListing');
datastr = "name, group1, group2, cellphone, landphone";
for(i=0; i < items.length; i++) {
datastr += "\n";
names = items[i].getElementsByClassName('UIObjectListing_Title');
if(names.length > 0) {
datastr += names[0].childNodes[0].nodeValue;
}
datastr += ",";
subtitle = items[i].getElementsByClassName('UIObjectListing_Subtitle')[0].childNodes;
if(subtitle.length>0) {
datastr += subtitle[0].nodeValue;
datastr += ",";
}
else {
datastr += ',,';
}
subtext = items[i].getElementsByClassName('UIObjectListing_Subtext')[0].childNodes;
if(subtext.length > 0) {
datastr += subtext[0].nodeValue;
datastr += ",";
}
else {
datastr += ',,';
}
cellNum = items[i].getElementsByClassName('FriendsPage_PhonebookCell');
if(cellNum.length > 0) {
datastr += cellNum[0].childNodes[1].nodeValue;
datastr += ",";
}
else {
datastr += ',,';
}
landNum = items[i].getElementsByClassName('FriendsPage_PhonebookLand');
if(landNum.length>0) {
datastr += landNum[0].childNodes[1].nodeValue;
}
else {
datastr += ',';
}
}
nwind = window.open();
nwind.document.write(datastr);
return datastr;
}


One limitation (or at least one big and notable one) though, this only gathers the contacts from a single page in your My Friends
list which, if you have several pages of Friends, means you'll have to
run this script several times. Could it be otherwise? Yes, yes it could.
There are more sophisticated tools as I mentioned (or rather more
appropriate tools as Firebug is amazingly sophisticated for its
primary purpose, that is debugging Javascript). It is likely possible
that a more powerful Firebug script could be written that'll open up
the new pages of friends lists and grab those pages, etc. But this is
a not bad function, and building it just about exceeded my interest in
the subject, so I'll leave it as is for now, or until curiosity strikes
me again like a hurricane.


So take it to your head, take it to your heart and remember Rand
rocks.


Goodnight Folks!


And God Bless.

Saturday, June 13, 2009

Prithee, have thee heard of the Prism

I'm always caught in a bit of a dilemma upon my less serious posts, because I am Rand the Great and Glorious and thus deserve the treatment as such. But on the other hand, even the great and glorious can afford more scattered thoughts upon once and a while.

So then let me make a recommendation far removed from topics more normally dwelled upon. Often I have found myself with more than one account at a social networking site or the like and have been forced to choose which one to be logged in as at a certain time. The choice would infuriate me, and burn me to my soul. Sure I could use multiple browsers, but I like Firefox, and then I need to surf over to the site again. Seconds wasted, seconds!

However, now I find myself taking advantage of Firefox's Prism project. This project at its core, isolates a single webpage in a browser instance. At its most basic use, this is only slightly more useful than a bookmark. But there are some intriguing possibilities here. Firstly, you can put the links to the prism-ed site more places than a bookmarks menu, and more relevant to the previous paragraph, you can utilize the prism-ed site independently of other prism instances and of Firefox. Thus, you can be logged into TWO! instances of say Gmail or MySpace accounts at once TWO! TWO!

And while there are some cases where one is better than two, this is not one of them.

So Prism on Prism! Prism on!

Sunday, March 15, 2009

Cause sometimes computing ain't for tooling

So far in my uneven revival of The Rand Show, I have attempted to punch out a deep, lengthy post for each sitting. While an admirable ambition, such a goal not only deceases my willingness/ability to post, but it undermines the randomness that makes the Rand Show, well, just in a category of its own. With that in mind, I step aside from my usual ruminations to ruminate different-wise upon the software that I use. Because ultimately, though my soul waxes and wanes on the matter far too seriously, software is cool, and so thus let me share what I use:

OS:
Windows generally. Not really by preference, but it is the system that has a lot of software and that generally is pretty user-friendly. I used to be a Mac-fan, but nowadays Mac's are priced out of my range, and while I do have a Linux machine (Ubunutu by variety), that particular machine is unreliable at best, yet installing Linux on this computer would leave me without a Windows machine, which overall I guess would be bad, probably. To those actually thinking of making a decision about OS's, I'd recommend Linux, despite the hypocritical ring these words may take on, it does seem to me the superior system. I suppose as for me personally, I'm too fickle to give up the flexibility having both Windows and Linux on different machines allows, and I just have the misfortunate (less you think me melodramatic, it is but a slight, slight misfortune) of having Linux on the lesser computer.

Internet browser: A little bit of everything really. My browsers have over time covered the gambit. Since I've been using the inter-web since it's explosion, I was at a time well-acquainted with the Netscape Navigator, since then I have on occasion used Internet Explorer, but stayed mostly on the alternative brands, let me tell you why:
Surfing Speed: IE, due to its embeddedness does have a starting up edge over many of the alternatives and when it comes to rendering simple pages sometimes IE can squeak out a slightly smaller time, and sometimes those two factors make IE useful, but generally when it comes to rendering resource-rich pages, IE ain't the tops.


Web Development: Defenders might claim that IE's web page rendering model is not inferior to the W3C's standards. Honestly, I've had frustrations with both so I'm not going to judge. But the thing is, even if at points IE's model might be better, it is not consistent, and it changes from edition to edition. The result is a slowing of internet innovation and annoying number of man-hours lost to cross-browser compatibility. But let me qualify that. IE8 and even IE7 do reduce those flaws to some degree, and let it be known certainly, that NO ONE SHOULD BE USING IE6 ANYMORE. It makes web developers bleed!


Security: IE8 I will also admit does step up security a good bit. However, of major browsers out there it is still the most likely to attract cookies, spyware, and other annoyances. Part of this is popularity, but Internet Explorer is BY ITS NATURE, more hack-prone, if for no other reason, than for the fact that it is integrated into the Windows system, giving it access to resources no other browser has. And let me add a completely unverified point. I do believe IE has a less elegant design that makes features and cooperation with other programs more hap-hazard. But even if we ignore these somewhat vague theoretical points, history has shown Internet Explorer to be awful at preventing security holes, and painful in managing permissions. The current IE8 system is a good example, with its mind-numbingly grandular security options, and annoyingly strict default mode. Le sigh.


Let me leave IE-bashing to others, because others will happily oblige. Let me then cite the browsers I do use:
Firefox: No longer the fastest browser on the block, and a resource devouring behemoth, it is still incredibly featureful with an unmatched add-ons repository.
Safari: Safari is amazingly fast. Even on Windows. That said, I can't say too much more of its praises, because it does strike me as a bit minimalistic. I mean in theory there are a number of interesting features, but many, like DOM Inspector, are hidden away in the wetworks.
Chrome: Like Safari very fast, not as fast though. And not nearly as stable. The Google Chrome project is still developing, and it seems like someday it might be a worthy entry. The isolation of problematic processes I actually have found useful. Still, it's raw edges come out every now and then, and it's generally a 2nd or 3rd choice for page viewing.
Opera: There were once many closed-source browsers, now there are two Opera and IE. Opera was once a little known gem, but it has since gained a particular popular niche: The mobile world. Opera Mini is now the mobile phone browser of choice, and if I had a better phone, it likely would be my phone's browser of choice. Anywho, the desktop model is also very good, with a strong rendering speed near equal to Safari. It also has a nice sampling of features like a built in mail system. Yet though it is almost as fast as Safari and almost as featureful as Firefox, the almosts don't add up to a definitive win. Still, it is nice as a back-up browser.


Word Processor: I have used many word processors in my day, and my favorite remains the ClarisWorks suite, but since that doesn't exist any more and its replacement, Apppleworks, is Apple-only (as was Clarisworks for a while I believe, but back then I was Apple-only as well), I am forced to deal with lesser systems. It's hard for me to give an edge to Microsoft Word or OpenOffice, both have +'s and -'s, WordPerfect isn't too far behind either. But with all those systems I am constantly annoyed at how long it takes to load even the simplest levels of functionality. While I want to type, I don't want to wait 10 minutes to get started! To combat that I've started working with AbiWord, a nice light-weight word processor with almost comparable functionality, but sometimes I just go back to simple WordPad. Not because I like it, mind you, but because the field is so barren of quality.
Programmer's Editor: PSPad I must recommend. Outstanding program. So many text-highlighting options, a ton of indenting and editing tools. It just gives you everything you need as a programmer. Unfortunately, it is pretty buggy at times. If you have a big document it can slow, freeze, or crash with alarming regularity. It also has ceased to output proper Unicode documents for me, so I'm forced now to find another editor. Le sigh.


Others:
Well, I'm getting a bit long here, and I have more than enough material for another post on this sometime, but let me run down some also recommends:

  • GIMP-The freeware image editor of tons of options, but painfully slow loading

  • Inkscape-A freeware image editor of truly high-end editing, but painfully obtuse user interfaces

  • GCC-If you're a programmer, I'm afraid that's just the way to be

  • Thunderbird-Very user-friendly, much less quirk-prone than Outlook, and it's the word

  • XTrans-Because XSLT is coming you see

  • Spybot-Search and Destroy-The basic security utility all computers need.

  • Songbird - A surprising capable music player/music organizer with occasional less than surprising performance issues

  • VLC-If you want to play anything without issues, you want VLC




Well, if this seemed like an excursion in pointlessness, remember that I am Rand and I am awesome. Just keep that in mind and keep the above in mind when you need some software to scratch some particular itch, or if you just like cool and shiny new thingamaggers like me.

So take it to your head, take it to your heart, and remember Rand rocks. Goodnight Folks!

And God Bless.

Wednesday, July 23, 2008

Or do it the sensible way: Top 5 tips

Since the last post was all about the potential madness of computer cleaning, I thought I might give some saner tips, indeed, here are the top 5 (as ranked by Robo-Bobo) more safe tips for cleaning your computer, chosen for the cleaner who wants a lighter touch:

1. GET A SPYWARE SCANNER!

(And don't just download the one that comes in a pop-up ad, those usually have spyware attached to them, there a couple legitimate free ones (most famously Spybot Search and Destroy), although they tend to be less effective than the more expensive ones (although they are free), but whenever you download free software GO TO THE COMPANY OR FOUNDATION'S HOMEPAGE. Many times malware will be bundled with free-ware, but well-respected foundations and companies tend to avoid that (with some exceptions like some music companies (cough, cough, Sony BMG), it's best also to search the web for info about anything you download before you put it on your computer.)

I personally use Webroot's Spyware Sweeper

2. GET A VIRUS SCANNER!

(Same warnings as with the spyware scanner, although the truth is virus scanners often have limited effectiveness once the virus is on your computer (especially since the scanner is usually the first target of the virus). However, the best virus scanners also give you warnings about when you're about to download, open, install or transfer virus-infected items (one of the reasons I like my current sweeper).)

I personally use Eset's Nod32

3. USE THE SCANNERS!

The scanners sometimes have some automatic warnings even without being used, but not scanning is just a waste of good software! And also your computer will get infected, oh yeah, that too. Doesn't matter if you think your safe or you think you have good computer practices, spyware (and to a lesser extent viruses), happen (in fact, if your spyware sweeper is turning up nothing constantly, that probably means that the sweeper is infected).

4. Clear privacy info off your browsers.

Companies, even ones that pledge to do no evil (I have mixed feelings about Google, especially now that a friend works there (shout-out to Jean Hsu!) and especially since I use a lot of google tech which alternately impresses and frustrates me, but that's another session), will attempt to track your web-habits. This is a fact of life. Moreover, sometimes companies (a more rare happening, but sometimes, especially with some of the more unscrupulous background checkers for employment) will go a little further and try to actually connect your real-world identity to what you do on the web and what you have on your computer. It sucks, but that's how the internet is. So go to Tools or Options or whatever, and clear your privacy data, including (actually, although by default this usually isn't selected, it is the most vulnerable area) cookies.

5. Clear out your "temp" and "temporary internet files" folders.

Most of this ought to have been cleaned out by clearing privacy data, but it usually isn't. Finding these folders is a bit tricky for newbies (I've been assuming Windows throughout, especially since most spyware and viruses are designed for Windows, but this particular matter is Windows-specific. I'm a newbie at Linux, and while I'm capable in Mac OS (and actually have a certain preference for it), it has been a while since I've cracked into the nitty-gritty of how to clean Macs (beyond the previous steps)).

Essentially this is what you must do:

First, you need to enable viewing hidden folders:
1. Open "My Computer" from the "Start" menu
2. Go to "Tools" (in the top menu bar)
3. Click on "Folder Options"
4. Click on "View"
5. Find the "Hidden Folders" folder in the scroll bar, click on it to open it, if it isn't opened already.
6. Click on "Show hidden files and folders"
7. Click "Apply" in the bottom right corner
8. Close the the "Folder Options" menu, now you should be able to see all your folders and files

Second, you need to go to the user profiles:
1. Open the "Local Disk (C:)" folder (I'm assuming your still in the "My Computer" window, if not, get back to it)
2. Open "Documents and Settings"

Third, for each of the profile folders, you need to do the temp file cleaning, but here's the essential pattern:
1. Open the profile folder (ie, the folder with the name of one of the profiles on your computer)
2. Open "Local Settings" (you may notice that this folder is semi-faded, that's because usually it's hidden)
3. Open "Temp"
4. Delete all the files in that folder (though do not delete the folder itself, it is a natural part of your computer, however if you mess up and do delete it, the folder should regenerate naturally)

(note sometimes you might not be able to delete some of these temp files, usually it will say file is being used. You should then try closing some applications and trying again, or trying again on a different day, but sometimes there will be files you just can't delete. Sometimes that is just a harmless fact of how your applications work, but often it signals that there are processes that you didn't start in the background which might be problematic)

5. Go back to "Local Settings"
6. Open "Temporary Internet Files"
7. Delete everything in that folder (same warnings as with the "Temp" folder
8. Repeat for each of the profiles

Now deleting these temp files can sometimes free up a huge amount of disk space, but even if it doesn't it makes your computer more secure. However, the files will naturally regenerate with time, so continue to get rid of them.

6. Don't accumulate junk it the first place

I know this was supposed to be top 5 cleaning tips, but here's a bonus tip, practice safe internet! Avoid downloads from sites you don't know or which have suspicious reputations (cough, cough Download.com). Don't accumulate excess software (and if you do, remove some via your control panel's Add/Remove Programs). Do not open emails from people you don't know (even if it says charity this, or job offer that). Do not click on links to sites you don't know or if you're in a suspicious site to start with.

(actually avoid suspicious sites in general, that means you free porn sites (if you must have porn, go to a legitimate porn company with a respectable (relatively) reputation (and no I'm not going to list any of those companies)

(the less reputable ones also have the ugly habit of taking over your browser, if this happens, go to the task manager (Ctrl-Alt-Del) and click on the process that matches your browser (say firefox.exe) and end it (actually this might not in Internet Explorer (I don't usually use it so I haven't tried), since IE is hard-wired into the Windows Operating System (in a rather monopolistic move, which if not illegal, is at least supremely a douche-move)))

(this is where I feel Apple's Safari Browser, despite its easy-of-use and speed, falls short of the Firefox Browser, since Firefox allows you to see where a link leads by just leaving the mouse over the link, whereas Safari (at least, last time I checked it out, which to be truthful was sometime ago, so updates may have changed things), does not. Internet Explorer also has this feature, but IE is so bug-ridden, so security-problematic, so violating-of-all-sensible-web-standards (although IE is getting better in this respect), that I don't even consider it as an alternative in web browser choices. However, Opera Browser is always a reliable second in my book to Firefox, although it is a bit feature-heavy with some unfamiliar-quirks for my taste, but it is a nice browser indeed.)

Anywho, the basic law of preventing junk from cluttering up and undermining the security of your computer is... be cautious and use common sense. There are a lot of tricky and hidden ways to attack a computer, but most malware goes through the front door, so shut it. Or in less-metaphorical terms, if there's some action which seems like it would make your computer vulnerable, DON'T DO IT!

And if you do do it anyways, well, don't blame a certain robotic koala for not warning you.