tag:blogger.com,1999:blog-319806142024-03-08T12:42:57.106-06:00Right Foot Inthe diakon radish of blogs...MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-31980614.post-90886963983803478992011-09-06T03:24:00.010-05:002020-03-10T01:16:08.114-05:00FF6/FF7: Re-enable javascript: from urlbarJump a bit for instructions on how to re-enable execution of javascript: urls in Firefox 6.0.1 and 7.0.
Background
So, much to my surprise, javascript: urls stopped working after I upgraded to FF6. I assumed it was a bug, and would be fixed soon enough. After all, "ReferenceError: alert is not defined" couldn't be intentional, right? I mean, javascript:alert(foo.prop); has worked since MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com0tag:blogger.com,1999:blog-31980614.post-69828700932556455532011-06-22T22:02:00.007-05:002011-06-22T22:28:52.495-05:00[FIXED] Synergy Flash FullscreenOn my media computer I use synergy to remote control it from my desktop. There was one big drawback -- every time I switched to the primary screen, the flash video would exit fullscreen on the secondary screen. So I either had to watch the video non-fullscreen or go to the physical mouse of the secondary box and hit the fullscreen button and then not switch to the secondary until the video was MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com1tag:blogger.com,1999:blog-31980614.post-29108605887396992142011-04-06T16:18:00.006-05:002011-04-06T16:24:30.611-05:00Thunderbird won't open linksSo after a recent system update (Arch Linux, cause it's the best, obviously. Duh, Winning), Thunderbird refused to open links in email bodies.I would be like, "Please Mr. email client, open my links" and it would say "No, eff you, rawr-rawr-rawr" and then poop this on the error console:Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com1tag:blogger.com,1999:blog-31980614.post-39084926736187941782010-07-21T01:20:00.004-05:002010-07-21T01:52:07.976-05:00Getting USB speakers working in GnomeSo I just got a set of Insignia USB speakers (NS-2908). Wanted to use them as my default speakers, but still have the option of using the internal sound card. Got it working and thought someone else might find it useful. This assumes you're using a new-ish version of gnome.You'll want to set the Internal Audio profile to "Off" in the pulseaudio volume control application, under the Configuration MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com1tag:blogger.com,1999:blog-31980614.post-45393181195212438472010-02-23T20:13:00.004-06:002010-02-23T21:54:48.595-06:00Dark Glass theme with DroidMod v1.0 - White ClockThe DroidMod Team (formerly of sholes.info) relased a new ROM (--one of the best availible, I might add). The only "problem" with the ROM is that it does not include the ability to select the Smoked Glass theme when applying it. This is not so much a problem as a design decision.The Metamorph application, available on the Market, lets you apply all manner of themes to your device, uncluding the "MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com4tag:blogger.com,1999:blog-31980614.post-45078221731890116592010-02-15T00:30:00.003-06:002010-02-15T01:29:45.555-06:00Clear Android Market Search HistorySo, I wanted to clear the search history that displays in the Market app when you open the search bar. It seems that from a quick googling many people would like to do the same thing. I found a way that seems to work, but it requires root access.I figured the Market app probably stores the search history in some type of standard database, rather than in a compressed or encrypted container, so I MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com1tag:blogger.com,1999:blog-31980614.post-69231740472459724362009-11-19T18:47:00.015-06:002009-11-24T23:30:20.808-06:00Ad-blocking with PolipoPolipo is a fast local proxy that does on-disk caching (by default, at least). Privoxy is another local proxy, with a focus on privacy and ad-blocking. Due to the nature and purpose of Privoxy, it has to buffer portions of the page (to check for content it should block) before serving it to the browser. This makes it a bit slower than Polipo. You could always use Polipo in front of Privoxy (see MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com5tag:blogger.com,1999:blog-31980614.post-65109448354198868642009-05-20T21:21:00.008-05:002009-05-20T21:49:54.655-05:00Fixing Pulseaudio stutters / pauses / glitchesIt seems that for many AC'97 sound chips, the new scheduler / timer in Pulseaudio >=0.9.11 causes hiccups in sound playback. These are exacerbated when the daemon is not running with higher priority and realtime permissions. The simple fix is to use the older scheduler. To do this, edit /etc/pulse/default.pa and add the tsched=0 option to module-hal-detect (or module-alsa-source if you manually MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com4tag:blogger.com,1999:blog-31980614.post-78602142752634734902009-04-14T00:51:00.010-05:002009-04-14T17:12:30.432-05:00FlashBlock WannaBeI've been using Midori as my primary browser for a number of months (I have a daily cron job that updates and builds WebKit and Midori). It's a fast little browser using WebKit for it's rendering engine and SFX for it's JS engine, so it's standards compliant and really, really fast. And it implements some handy, commonly used features (e.g., error console, user scripts / styles, element inspectorMonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com21tag:blogger.com,1999:blog-31980614.post-1507441524239686292009-01-01T00:22:00.019-06:002009-04-14T16:53:06.742-05:00Automatic YouTube download with IE7So my mom likes to collect silly little clips from YouTube, and she uses IE7 on Windows XP (I've tried to get her to convert to Linux, but she's not very computer saavy and has learned computing with Windows—even Ubuntu is a bit too much for her to take in). She normally just copies the YouTube url, pastes it to KeepVid, followed by a right-click + save-as, pasting in the video title as the file MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com1tag:blogger.com,1999:blog-31980614.post-54876731975004439242007-02-23T13:55:00.001-06:002009-04-14T16:53:44.114-05:00String interpolation in pythonIn python, the standard way to do string interpolation is to use the % operator. There are some bells and wistles to it, like named substitutions, but overall it behaves much the same as the C printf function on which it was modeled. On the other hand, in ruby you can use inline interpolation with #{} inside a string, which combines perl's ${} and $() into one. I personally prefer the latter MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com1tag:blogger.com,1999:blog-31980614.post-60552154686767883762007-01-04T15:41:00.000-06:002007-01-04T17:06:47.619-06:00New Happy Day!Err, Happy Merrynox! Doh. That's not right either. Holiyears Newmas Kwanza-Chana-Peruvian Llama Shedding Merry Days! Oh, I give up. I can't keep all these new joined-together, uber, all-encompassing holidays strait. I celebrate Christmas and the western New Year. So Merry Christmas and Happy New Year! And if you don't celebrate them, well, I hope you enjoyed the days off of work!So I'ven been MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com2tag:blogger.com,1999:blog-31980614.post-8712337758927080362006-09-30T01:44:00.006-05:002009-04-14T16:54:07.987-05:00Scripting GeditGedit allows you to write python scripts which interface with its backend (and frontend via pygtk). This is very cool, for reasons obvious to VIM and Emacs users. You can write your own plugins to manipulate the document you are editing in many useful ways.Well I was using various external tools to run my various scripts for test purposes (the External Tools plugin is itself written in python!). MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com2tag:blogger.com,1999:blog-31980614.post-36081826294825945072006-09-23T12:02:00.000-05:002006-09-23T13:21:27.980-05:00Conventional wisdomThe conventions of a given community of programmers are usually time-tested and often they make life much easier on the programmer. For example, the convention of writing self-documenting code rather than using one or two letter variable names is a very helpful guideline.But as with many other issues, what is generally beneficial and a good practice for most people in most situations gets MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com0tag:blogger.com,1999:blog-31980614.post-30572578088888829172006-09-07T20:50:00.001-05:002009-04-14T16:54:51.454-05:00Spicey curry in your rubyI've been learning OCaml for the past few days, and for being a member of the evil functional programming paradigm (invented by people who actually liked doing calculus!), it's not too bad. It has some cool features like pattern matching, subtyping (variants) and some other fun stuff. But over all, it's just too much of a pain to use (speaking personally). If I ever had to do something that MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com1tag:blogger.com,1999:blog-31980614.post-74089940348089587902006-09-06T08:27:00.001-05:002009-04-14T17:16:39.265-05:00Code formattingI try to be consistant about code formatting. I pick a convention and stick to it. But I like the convention to make sense, as well as being easy to read (easy for me, I could care less if you can read it, heh).If you've seen any of my code in my posts, you probably noticed that I use parentheses for everything -- method invocation, conditionals / other control structures, built-in methods like MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com3tag:blogger.com,1999:blog-31980614.post-5720612984885019122006-09-05T21:22:00.001-05:002009-04-14T17:17:09.647-05:00ruby reopenIn ruby we have a nifty reopen method we can use on references to file-handles that are already opened. This is helpful when you need to open a file as read-only, then you want to write to the same file, or you just want to use the same reference to point to a new file-handle. You simply reopen and go on about your merry way. Usually this is used within a File.open block. But with python you haveMonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com2tag:blogger.com,1999:blog-31980614.post-84716265963474076342006-09-04T20:24:00.003-05:002009-04-14T17:18:50.828-05:00More on python flattenThe standard (but for some unknown reason, not built-in) python flatten method looks something like this:def flatten(l): out = [] for item in l: if isinstance(item, (list, tuple)): out.extend(flatten(item)) else: out.append(item) return outThis obviously runs into recursion errors pretty quickly for highly nested lists; what suprised me is that it can't grok even relatively MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com44tag:blogger.com,1999:blog-31980614.post-510017661872574902006-09-04T03:39:00.000-05:002006-09-04T03:52:17.012-05:00No builtin flatten in python...One view of why there is no built-in flatten in python is that "there are several open semantic questions which are not intuitively answered". But that seems like a cop-out. So what if there are some academic questions about what exactly a flatten method should do? The basic fact of the matter is that people want a method to be able to flatten a multi-dimensional list into a single dimension. MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com3tag:blogger.com,1999:blog-31980614.post-63677978628960194622006-08-31T04:27:00.000-05:002006-08-31T04:54:06.223-05:00Hyper-fatugly!Good Lord, how can anyone want to use perl6/pugs, let alone develop it! The syntax is so awful they had to start adding superlatives to describe its level of convolusion! I give you the hyper-fatarrow (yes, that's really the name, at least colloquially); actually...you may want to sit down first, it could give you a brain hemorrhage just looking at it. Here it comes: »=>«. What does it do? Well..MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com2tag:blogger.com,1999:blog-31980614.post-47547169828945736372006-08-29T18:44:00.001-05:002009-04-14T17:24:41.299-05:00Of Rocks and Reptiles...A blog article was posted by jesusphreak the other day about why he chose python over ruby. Several people have commented on this in the blogosphere and mailing-lists (e.g., here, here and here), and in his comments section. So I might as well add my two bits.I use both ruby and python, though I've only been using python for about 6 months (been using ruby for like...hmmm...3 years or so). MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com1tag:blogger.com,1999:blog-31980614.post-26364158870968654602006-08-26T11:54:00.001-05:002009-04-14T17:23:52.417-05:00Favorite editorI'm a pariah when it comes to my favorite (grafical) text-editor. I've tried gvim, xemacs, scite, and I have gripes with all of them. I like Gedit. That's right. Gedit. Now that you're done gawking at how non-geeky, non-hacker-ish, lame I am, let me explain why.GvimModed editing...need I say more? Yes? OK, what about...moded editing!XemacsFunky keysBloat...I personally don't want an editor that MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com2tag:blogger.com,1999:blog-31980614.post-1156451822008449122006-08-24T11:48:00.001-05:002009-04-14T17:26:14.466-05:00Doing it the Ruby Way™I posted a comment on Redhanded that got me thinking about the Ruby Way™ of doing string formatting. Since ruby is a true OO language, where everything is a first-order object, and all methods are object attributes, it doesn't seem to follow suite to leave it at Kernel#format which takes as its first argument the string object on which to operate. It seems like it would be much more rubyish to MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com0tag:blogger.com,1999:blog-31980614.post-1156264133261780522006-08-22T09:39:00.000-05:002006-08-22T16:14:49.546-05:00Write it in C or face 10,000 slow deaths!Ruby is slow. Matz owns up to the fact. Benchmarks show that it's true. Ruby is not too slow to be useful or anything, just slower (at some things) that many other languages, including perl and python. It is getting faster (1.9 is faster than 1.8.5 in many areas), but even so, when you need speed you often need to drop to a lower-level language like C to get it. That's true for perl and python MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com0tag:blogger.com,1999:blog-31980614.post-1155949709326299822006-08-18T20:01:00.000-05:002006-08-18T20:12:05.516-05:00Kazehakase...ruby in your browser?!!I just came across a project called Kazehakase. It is a web-browser based on Gecko (the Mozilla/Firefox HTML rendering engine). Big deal, you say. There are already Galeon and Epiphany and so forth. But I ask you, do any of those browsers have a ruby prompt sandbox (with autocompletion!) built in? No? Didn't think so. Well, kazehakase does!The docs are mainly in Japanese and the wiki and mailing MonkeeSagehttp://www.blogger.com/profile/01905033551465108847noreply@blogger.com0