<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DUYHQXw5fip7ImA9WhRbGU8.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053</id><updated>2012-02-10T18:25:30.226-08:00</updated><category term="drug" /><category term="GNU/Hurd" /><category term="bug" /><category term="free" /><category term="Ustream.Tv" /><category term="expose" /><category term="proposal" /><category term="sed" /><category term="ASP.NET" /><category term="The IT Crowd" /><category term="iBus" /><category term="Rihanna" /><category term="scheduler" /><category term="BSG" /><category term="Kubuntu" /><category term="message" /><category term="Lady Gaga" /><category term="nForce" /><category term="GIMP" /><category term="searching" /><category term="SHMConfig" /><category term="Time Machine Band" /><category term="XDM" /><category term="posting" /><category term="5617" /><category term="Bourne shell" /><category term="Google+" /><category term="New York" /><category term="shooting" /><category term="Thai" /><category term="Modernizr" /><category term="Blue Marble" /><category term="control code" /><category term="Brokwn Lullabies" /><category term="about:home" /><category term="Firefox" /><category term="darkness" /><category term="CD" /><category term="stock" /><category term="Internet Explorer" /><category term="transset" /><category term="XBOX" /><category term="Rebecca Black" /><category term="matplotlib" /><category term="sky" /><category term="x11grab" /><category term="silly" /><category term="mail" /><category term="Video4Linux" /><category term="popular post" /><category term="fruit" /><category term="radix" /><category term="introduction" /><category term="list" /><category term="environment variable" /><category term="notetaking" /><category term="tmux" /><category term="LCD" /><category term="Unbroken" /><category term="OldBlogmakeYJL" /><category term="IP address" /><category term="FX" /><category term="BSD" /><category term="ASCII art" /><category term="creativity" /><category term="protest" /><category term="announcement" /><category term="Penguin" /><category term="fglrx" /><category term="amd64" /><category term="Glade" /><category term="v4l2" /><category term="dumb" /><category term="course" /><category term="tester" /><category term="pyratemp" /><category term="Paint" /><category term="JPype" /><category term="code" /><category term="ISO 8859-1" /><category term="tomato" /><category term="VASCO" /><category term="social network" /><category term="headphone" /><category term="customization" /><category term="Backupify" /><category term="statusline" /><category term="giving" /><category term="Metal Gear Solid" /><category term="awareness" /><category term="PyQuery" /><category term="nameserver" /><category term="CFLAGS" /><category term="Flickr" /><category term="investment" /><category term="index" /><category term="pasta" /><category term="Dollhouse" /><category term="Delicious.com" /><category term="vocal" /><category term="webpage" /><category term="mkisofs" /><category term="Red Hat" /><category term="Katharine McPhee" /><category term="public key" /><category term="spaghetti" /><category term="finance" /><category term="funny" /><category term="ICQ" /><category term="VP8" /><category term="lobster" /><category term="video game" /><category term="WebKit" /><category term="goal" /><category term="rumor" /><category term="boilerplate" /><category term="noodles" /><category term="HTTP" /><category term="bad mood" /><category term="density" /><category term="Flash" /><category term="Poker Face" /><category term="favicon" /><category term="GPG" /><category term="wide character" /><category term="tv" /><category term="multilib" /><category term="Improv Everywhere" /><category term="Ukraine" /><category term="Blog List gadget" /><category term="fireworks" /><category term="attribute" /><category term="transition" /><category term="ts" /><category term="parody" /><category term="World Vision" /><category term="Digital Domain" /><category term="filter" /><category term="exec" /><category term="Vim" /><category term="WordGrinder" /><category term="fake" /><category term="negative" /><category term="transparency" /><category term="flowchart" /><category term="Road to Nowhere" /><category term="OldBlogBlogarbage" /><category term="web browser" /><category term="release" /><category term="Fus Ro Dah" /><category term="MathML" /><category term="highlight.js" /><category term="kindergarten" /><category term="security breach" /><category term="timeit" /><category term="2011" /><category term="timeline" /><category term="blood" /><category term="exitcode" /><category term="Google Sites" /><category term="Gentoo" /><category term="Santa Claus" /><category term="Ke$ha" /><category term="Google Earth" /><category term="creative writing" /><category term="2D" /><category term="script" /><category term="flu" /><category term="nose" /><category term="catdom" /><category term="string quartet" /><category term="Assignment Game" /><category term="PS1" /><category term="atheist" /><category term="key" /><category term="Stellarium" /><category term="theme song" /><category term="speech recognization" /><category term="Panorama" /><category term="GAE" /><category term="2010" /><category term="YouTube API" /><category term="card" /><category term="JRE" /><category term="kid" /><category term="website" /><category term="font" /><category term="FireBug" /><category term="VLC" /><category term="emerge" /><category term="pickle" /><category term="Donald" /><category term="lunch" /><category term="source" /><category term="singer-songwriter" /><category term="I Thank" /><category term="Markdown" /><category term="dict" /><category term="Font Squirrel" /><category term="certificate authority" /><category term="ncurses" /><category term="interactive shell" /><category term="OpenCDE" /><category term="abcdefghijklmnopqrstuvwxyz" /><category term="inotifywait" /><category term="2009" /><category term="i386" /><category term="data URI scheme" /><category term="death" /><category term="Google Font Directory" /><category term="KRAFT" /><category term="parsing" /><category term="Windows" /><category term="SQLite" /><category term="Stars" /><category term="scrobbler" /><category term="I Don't Know" /><category term="timer" /><category term="PV" /><category term="Revolverheld" /><category term="md5sum" /><category term="flaw" /><category term="bookmarklet" /><category term="falling hearts" /><category term="feh" /><category term="Josh Peterson" /><category term="thought" /><category term="capcha" /><category term="crontab" /><category term="2008" /><category term="App Tab" /><category term="eselect" /><category term="drama" /><category term="word frequency" /><category term="font-face" /><category term="grey" /><category term="Opera" /><category term="OpenOffice" /><category term="title" /><category term="ffmpeg" /><category term="oldest" /><category term="Perl" /><category term="battery" /><category term="record" /><category term="Ox" /><category term="execution" /><category term="cross-domain" /><category term="text" /><category term="file management" /><category term="disease" /><category term="Race to Witch Mountain" /><category term="error" /><category term="BRPS Featured" /><category term="xsnow" /><category term="Python" /><category term="Pop" /><category term="education" /><category term="XScreenSaver" /><category term="packaging" /><category term="milestone" /><category term="SRPM" /><category term="Znurt" /><category term="rpmbuild" /><category term="transparent" /><category term="flat" /><category term="github" /><category term="bullshit" /><category term="eyecandy" /><category term="Oracle" /><category term="police" /><category term="lifestyle" /><category term="sleep" /><category term="ISP" /><category term="ItchApe" /><category term="TagCloud" /><category term="voice" /><category term="feedparser" /><category term="Kraken" /><category term="country code" /><category term="Stargate Universe" /><category term="repository" /><category term="anchor" /><category term="KDE" /><category term="soup" /><category term="The Irish Rovers" /><category term="The Incredibles" /><category term="Minecraft" /><category term="election" /><category term="error code" /><category term="photography" /><category term="Google Gadget API" /><category term="unhealthy" /><category term="Portage" /><category term="standard input" /><category term="PAM" /><category term="loading" /><category term="pee" /><category term="Google" /><category term="keep" /><category term="scrapper" /><category term="TiMidity++" /><category term="package management" /><category term="calculator" /><category term="furry" /><category term="cancer" /><category term="DNS" /><category term="Novell" /><category term="one-liner" /><category term="YQL" /><category term="TTS" /><category term="GAEUnit" /><category term="indicator" /><category term="list comprehension" /><category term="string format" /><category term="Brainfuck" /><category term="Keep Last Two Tabs" /><category term="PYTHONSTARTUP" /><category term="drink" /><category term="Twimonial" /><category term="Canada" /><category term="laptop" /><category term="alphabet" /><category term="hsandbox" /><category term="Soba" /><category term="shell scripting" /><category term="security" /><category term="object" /><category term="genlop" /><category term="Dial-up Network" /><category term="Soviet" /><category term="Streaming API" /><category term="school" /><category term="Blogger" /><category term="random post" /><category term="billing" /><category term="wmctrl" /><category term="Leah Daniels" /><category term="Hinet" /><category term="Fortran" /><category term="xmllint" /><category term="photo" /><category term="Reamonn" /><category term="Midnight Commander" /><category term="Skyrim" /><category term="Detroit 1-8-7" /><category term="linking" /><category term="Magpie" /><category term="HTML" /><category term="Taiwanese" /><category term="CenterIM" /><category term="PyQt4" /><category term="JavaScript" /><category term="Twitch.tv" /><category term="Tux" /><category term="sitemap" /><category term="MGS1" /><category term="jackd" /><category term="navbar" /><category term="debugging" /><category term="evil walrus" /><category term="environment" /><category term="8-bit" /><category term="Get Satisfaction" /><category term="Christian" /><category term="Let Secrets Out" /><category term="meow" /><category term="SystemTap" /><category term="feedback" /><category term="xset" /><category term="32-bit" /><category term="snowing" /><category term="Export API" /><category term="top post" /><category term="layout" /><category term="Google Instant" /><category term="application.program" /><category term="depencency" /><category term="HTML5" /><category term="DosBox" /><category term="gstreamer" /><category term="Legend of the Seeker" /><category term="Olympics" /><category term="Adobe Flash" /><category term="programming" /><category term="mount" /><category term="CPU utilization" /><category term="Visual" /><category term="World AIDS Day" /><category term="thriller" /><category term="Pentadactyl" /><category term="spicy" /><category term="Guppy" /><category term="FuseFS" /><category term="Fallout" /><category term="Boom De YaDa" /><category term="Valentine's Day" /><category term="Iran" /><category term="file manager" /><category term="FPS" /><category term="clock" /><category term="line feed" /><category term="two" /><category term="input device" /><category term="snow" /><category term="progress" /><category term="NASA" /><category term="medicine" /><category term="dark" /><category term="prompt" /><category term="Haiku" /><category term="Fedora" /><category term="Ustream" /><category term="quota" /><category term="death sentence" /><category term="DigiNotar" /><category term="Web Storage" /><category term="postive thought" /><category term="final meal" /><category term="inotify" /><category term="cup" /><category term="awk" /><category term="wall" /><category term="mouse" /><category term="MPlayer" /><category term="Compiz" /><category term="Chef John" /><category term="ccTLD" /><category term="email" /><category term="OOo" /><category term="Site Explorer" /><category term="iradio" /><category term="username" /><category term="MGS" /><category term="next" /><category term="pyalsaaudio" /><category term="Calling Wendy" /><category term="navigation bar" /><category term="Google AJAX Search API" /><category term="Conky" /><category term="CSS" /><category term="peace" /><category term="Subversion" /><category term="Envy Code R" /><category term="Christmas" /><category term="nickname" /><category term="formatting" /><category term="government" /><category term="page" /><category term="SDK" /><category term="WebM" /><category term="JACK" /><category term="socket" /><category term="adventure" /><category term="The Matrix" /><category term="disc" /><category term="pain killer" /><category term="CIA" /><category term="MIDI" /><category term="touchpad" /><category term="space" /><category term="heading style" /><category term="technology" /><category term="Microsoft" /><category term="LessTif" /><category term="CDM" /><category term="spammer" /><category term="quote" /><category term="I18N" /><category term="profile page" /><category term="Synecdoche" /><category term="Browsers" /><category term="PC-BSD" /><category term="spiral pasta" /><category term="Tetris" /><category term="opensource" /><category term="compilation" /><category term="SDL" /><category term="umount" /><category term="IRC" /><category term="related post" /><category term="SSL" /><category term="minor" /><category term="image" /><category term="qlop" /><category term="traversing" /><category term="Japanese" /><category term="update" /><category term="Can You Save Me" /><category term="Boom De Ya Da" /><category term="howto" /><category term="toes" /><category term="ASCII" /><category term="world" /><category term="music" /><category term="embedding" /><category term="death penalty" /><category term="Arch Linux" /><category term="imagination" /><category term="Pascal's triangle" /><category term="button" /><category term="tar" /><category term="urxvtc" /><category term="Yahoo Finance" /><category term="tty-clock" /><category term="category" /><category term="pyaudio" /><category term="phishing" /><category term="Google Chrome" /><category term="promo video" /><category term="Page Speed" /><category term="trick" /><category term="bookmark" /><category term="ATI" /><category term="gh-pages" /><category term="reCAPCHA" /><category term="mathematics" /><category term="cross-post" /><category term="coffee" /><category term="tea" /><category term="monologue" /><category term="writing" /><category term="Silverlight" /><category term="DOS" /><category term="appreciation" /><category term="predicament" /><category term="Heirloom" /><category term="for loop" /><category term="documentation" /><category term="Rechargeable Alkaline battery" /><category term="RPG" /><category term="C" /><category term="commercial" /><category term="avatar" /><category term="Food Wishes" /><category term="Blogger Related Posts Service" /><category term="Bastard Tetris" /><category term="gray" /><category term="shower" /><category term="Leverage" /><category term="eix" /><category term="puzzle" /><category term="unitest" /><category term="pipe" /><category term="phone" /><category term="upgrading" /><category term="Webmaster Tools" /><category term="Discovery" /><category term="On The Rocks" /><category term="fantasy" /><category term="app" /><category term="OpenTTD" /><category term="review" /><category term="synclient" /><category term="binary-based" /><category term="shared library" /><category term="Arena" /><category term="dungeon" /><category term="screen resolution" /><category term="seven" /><category term="tracking" /><category term="scrot" /><category term="revamp" /><category term="Sea Sew" /><category term="CMatrix" /><category term="Amarok" /><category term="The Worst Day Since Yesterday" /><category term="libvpx" /><category term="scary" /><category term="The Big C" /><category term="rule" /><category term="alcohol" /><category term="ImageMagick" /><category term="Sheldon Ross" /><category term="tweet" /><category term="slide" /><category term="AVLD" /><category term="utimer" /><category term="Elder Scrolls" /><category term="widget" /><category term="exploit" /><category term="paper clip" /><category term="pet" /><category term="filename" /><category term="Analytics" /><category term="time capsule" /><category term="pylint" /><category term="WebP" /><category term="PyGTK" /><category term="RAM" /><category term="GNOME" /><category term="console" /><category term="listing" /><category term="sex" /><category term="checker" /><category term="delete" /><category term="CDE" /><category term="CIM" /><category term="Urwid" /><category term="crime" /><category term="browser" /><category term="blanket" /><category term="CrossOver" /><category term="wave" /><category term="operating system" /><category term="crash" /><category term="musical" /><category term="rainy" /><category term="dock" /><category term="random" /><category term="experience" /><category term="The Elder Scrolls" /><category term="YouTube" /><category term="rocket" /><category term="API" /><category term="Blavatar" /><category term="proof" /><category term="rotation" /><category term="season" /><category term="ALSA" /><category term="RegExp" /><category term="Mononono" /><category term="Fusion" /><category term="radar chart" /><category term="upload" /><category term="runtime" /><category term="history" /><category term="search" /><category term="referrer" /><category term="ClientLogin" /><category term="OpenDNS" /><category term="boolean" /><category term="performance test" /><category term="Viva Peace" /><category term="dtpanel" /><category term="development" /><category term="robot" /><category term="hosting" /><category term="updates" /><category term="RPM" /><category term="thousands separator" /><category term="cute" /><category term="webserver" /><category term="rickrolling" /><category term="Mecurial" /><category term="player" /><category term="spam" /><category term="video" /><category term="LanguageTool" /><category term="tab" /><category term="Russian Roulette" /><category term="template.sh" /><category term="Vimperator" /><category term="Gnash" /><category term="jknav" /><category term="theme" /><category term="The One-Minute Writer" /><category term="cougar" /><category term="TUI" /><category term="luck" /><category term="janitor" /><category term="Apple Tree and Tangerines" /><category term="OpenSolaris" /><category term="Battlestar Galatica" /><category term="OpenPGP" /><category term="Django" /><category term="insurance" /><category term="window control" /><category term="old man" /><category term="udev" /><category term="window manager" /><category term="OldBlogTuxWearsFedora" /><category term="Star Trek" /><category term="label" /><category term="Cheese" /><category term="locale" /><category term="Thanksgiving" /><category term="music video" /><category term="event" /><category term="tag" /><category term="gadget" /><category term="capability" /><category term="command" /><category term="Supergirl" /><category term="Disqus" /><category term="stopwatch" /><category term="vte" /><category term="licensing" /><category term="Law and Order: UK" /><category term="Python 2.5" /><category term="call stack" /><category term="menu" /><category term="comments" /><category term="funeral" /><category term="sticky" /><category term="OldBlogGetCtrlBack" /><category term="speed" /><category term="Pink" /><category term="Google Webmaster Tools" /><category term="Tinycon" /><category term="fadeout" /><category term="highlight" /><category term="blocklist" /><category term="migration" /><category term="mouse event" /><category term="file system" /><category term="concentration" /><category term="Synpatics" /><category term="ticker" /><category term="I Love Lunch" /><category term="odt2txt" /><category term="Linux" /><category term="swap" /><category term="woods" /><category term="gender" /><category term="Ubuntu" /><category term="timeout" /><category term="Allrecipes" /><category term="dropping ball" /><category term="Enoch Linux" /><category term="HTTPS" /><category term="libv4l" /><category term="Gaussian" /><category term="light" /><category term="Clive Owen" /><category term="comic" /><category term="word" /><category term="xterm" /><category term="content thief" /><category term="fading" /><category term="stupidity" /><category term="Bon Jovi" /><category term="DOM" /><category term="RSS" /><category term="favorite" /><category term="treemap" /><category term="screenFetch" /><category term="PC" /><category term="macro" /><category term="Googlebot" /><category term="Last.fm" /><category term="normal random variable" /><category term="future" /><category term="Incognito" /><category term="walking" /><category term="International Day of Peace" /><category term="screen name" /><category term="64-bit" /><category term="mushroom" /><category term="pingpong mechanism" /><category term="soybean" /><category term="efficient" /><category term="Gmail" /><category term="copying" /><category term="pill" /><category term="The Line" /><category term="Eurovision" /><category term="geek" /><category term="gratitude" /><category term="sendmail" /><category term="retweet" /><category term="root privilege" /><category term="bottombar" /><category term="KMS" /><category term="coding" /><category term="dependency" /><category term="selector" /><category term="fun" /><category term="youtube-dl" /><category term="screenshot" /><category term="Special Effects" /><category term="24" /><category term="jquery-lifestream" /><category term="screencast" /><category term="sandbox" /><category term="pricing" /><category term="rules" /><category term="Twitterank" /><category term="cross-site" /><category term="cache" /><category term="nipple" /><category term="no-multilib" /><category term="return value" /><category term="PyXSS" /><category term="graph" /><category term="German show" /><category term="libav" /><category term="random thought" /><category term="GTK" /><category term="lucky" /><category term="cheating" /><category term="wchar_t" /><category term="physics engine" /><category term="nomodeset" /><category term="Flogging Molly" /><category term="qt4" /><category term="graphing" /><category term="setting" /><category term="Blogger.com" /><category term="Turkish" /><category term="eyes" /><category term="CLI" /><category term="feline" /><category term="vidir" /><category term="spoon" /><category term="birthday" /><category term="tutorial" /><category term="streaming" /><category term="Jack Nicholson" /><category term="falling snow" /><category term="pipeline" /><category term="standout" /><category term="book" /><category term="caption" /><category term="viewer" /><category term="color blindness" /><category term="falling" /><category term="Sun" /><category term="criticism" /><category term="peach" /><category term="Google Talk" /><category term="food" /><category term="X Server" /><category term="OpenOffice.org" /><category term="joke" /><category term="less" /><category term="profile" /><category term="Pin Tab" /><category term="X Window" /><category term="Google Groups" /><category term="Jamendo" /><category term="April Fools' Day" /><category term="power management" /><category term="time duration" /><category term="Ted Williams" /><category term="combine" /><category term="Quartet San Francisco" /><category term="cold food" /><category term="upgrade" /><category term="make" /><category term="The Bucket List" /><category term="Speech Dispatcher" /><category term="extension" /><category term="mystery" /><category term="morning" /><category term="probability" /><category term="LabelCloud" /><category term="kitten" /><category term="Blogger API" /><category term="Fedora 12" /><category term="Desktop Effects" /><category term="tiling window manager" /><category term="effect" /><category term="Winter" /><category term="property" /><category term="FOSS" /><category term="Blogger Stats" /><category term="Bzip2" /><category term="Crafty Girls" /><category term="heart" /><category term="Chinese New Year" /><category term="Widelands" /><category term="Nicolas Cage" /><category term="Windows Phone 7" /><category term="rain" /><category term="Unicode" /><category term="man-in-the-middle" /><category term="command-line" /><category term="wheel" /><category term="design" /><category term="lightweight" /><category term="Bash" /><category term="builtin" /><category term="equation" /><category term="stupid" /><category term="cooking" /><category term="source-based" /><category term="Dead Hearts" /><category term="cal" /><category term="WordPress.com" /><category term="search engine" /><category term="FriendFeed" /><category term="StarCraft II" /><category term="hacking" /><category term="jQuery UI" /><category term="Sobaudon" /><category term="logo" /><category term="sponge" /><category term="spy" /><category term="typography" /><category term="sound" /><category term="charity" /><category term="plugin" /><category term="relative import" /><category term="bread" /><category term="LiveJournal" /><category term="computer" /><category term="concept" /><category term="Chrome Frame" /><category term="head" /><category term="maple leaf" /><category term="follower" /><category term="focus" /><category term="Live Like a Cat Day" /><category term="Motif" /><category term="Picasa Web Albums" /><category term="XIne" /><category term="counting" /><category term="Alyssa Suede" /><category term="fake referrer" /><category term="multiplexer" /><category term="optparse" /><category term="Annotated Time Line" /><category term="bullet points" /><category term="deletion" /><category term="Google News" /><category term="alien" /><category term="pond" /><category term="lactarian" /><category term="Internet radio" /><category term="Google Dictionary" /><category term="BRPS" /><category term="click" /><category term="IA32_EMULATION" /><category term="DoD" /><category term="booting" /><category term="CSS3" /><category term="Moonlight" /><category term="Taiwan" /><category term="screen recording" /><category term="3-column" /><category term="Google New" /><category term="film" /><category term="health" /><category term="macaroni" /><category term="CMU Sphinx" /><category term="calendar" /><category term="libnotify" /><category term="pitfall" /><category term="encoding" /><category term="Chuck" /><category term="Brobdingnagian Bards" /><category term="backlight" /><category term="Google Docs" /><category term="selfish" /><category term="burning" /><category term="cups" /><category term="Katy Perry" /><category term="chronic" /><category term="encryption" /><category term="cascading profile" /><category term="six" /><category term="sudoers" /><category term="stdin" /><category term="Universal Feed Parser" /><category term="dynamic content" /><category term="flip clock" /><category term="KeepNote" /><category term="performance" /><category term="pronoun" /><category term="blackout" /><category term="NetworkManager" /><category term="limit" /><category term="reverse" /><category term="utility" /><category term="generator" /><category term="xplanet" /><category term="offset" /><category term="jQuery" /><category term="Google Reader" /><category term="userChrome.css" /><category term="human readable" /><category term="camera" /><category term="footnote" /><category term="parameters" /><category term="moderation" /><category term="about:blank" /><category term="Ksplice" /><category term="playcount" /><category term="focus thief" /><category term="TSCC" /><category term="style" /><category term="CAPS" /><category term="dzen" /><category term="vbetool" /><category term="software" /><category term="Internationalization" /><category term="editing" /><category term="X-UA-Compatible" /><category term="cat" /><category term="chess" /><category term="recognization" /><category term="exclusion" /><category term="headache" /><category term="Justin.tv" /><category term="auto-reload" /><category term="distro" /><category term="grub" /><category term="43 Things" /><category term="Didi Benami" /><category term="New Year" /><category term="gun" /><category term="night" /><category term="map" /><category term="CFS" /><category term="benchmark" /><category term="clockywock" /><category term="Fortran 77" /><category term="forum" /><category term="help" /><category term="inputrc" /><category term="My Favorite Thing" /><category term="download" /><category term="Geeqie" /><category term="Flash Player" /><category term="October Sky" /><category term="OpenSUSE" /><category term="monitor" /><category term="Billy Connolly" /><category term="background" /><category term="Taylor Swift" /><category term="grocery" /><category term="timestamp" /><category term="file" /><category term="humanize" /><category term="addon" /><category term="Yahoo" /><category term="man" /><category term="FlickrFS" /><category term="sharing" /><category term="old" /><category term="ReactOS" /><category term="process" /><category term="arithmetic expansion" /><category term="Epiphany" /><category term="acoustic" /><category term="TNT" /><category term="Linus Torvalds" /><category term="instant messaging" /><category term="chart" /><category term="Google App Engine" /><category term="X" /><category term="BBC America" /><category term="life" /><category term="face" /><category term="Luxuslärm" /><category term="Friday" /><category term="cachebuster" /><category term="word processor" /><category term="flame" /><category term="FFT" /><category term="smiley" /><category term="FIGlet" /><category term="model" /><category term="failure" /><category term="spped" /><category term="binding" /><category term="tv show" /><category term="page navigation" /><category term="XOAuth" /><category term="flower" /><category term="Masterbranch" /><category term="world clock" /><category term="RPMFusion" /><category term="audio" /><category term="module" /><category term="git" /><category term="Halloween" /><category term="Bible" /><category term="gdata" /><category term="jQuery TextFill" /><category term="wish" /><category term="Bashrun" /><category term="tiv" /><category term="gradient" /><category term="OCR" /><category term="QT3" /><category term="encrypted post" /><category term="js-jquery-jknav" /><category term="StackOverflow" /><category term="system" /><category term="Wakoopa" /><category term="PDF" /><category term="Google Code" /><category term="Xorg" /><category term="God" /><category term="The International" /><category term="Pipes" /><category term="example" /><category term="store" /><category term="GNU gcal" /><category term="Bad Romance" /><category term="beta" /><category term="greeting" /><category term="report" /><category term="national flag" /><category term="unwrapper" /><category term="terms" /><category term="modeset" /><category term="OOP" /><category term="clip" /><category term="network" /><category term="Wordle" /><category term="project" /><category term="escape code" /><category term="tree" /><category term="account" /><category term="Cylon" /><category term="comment" /><category term="nss" /><category term="eval" /><category term="Dead key" /><category term="Google Code Hosting" /><category term="URI" /><category term="GNU" /><category term="twmn" /><category term="length" /><category term="AIDS" /><category term="GUI" /><category term="lilbtn" /><category term="Google Profile" /><category term="Weave" /><category term="bell pepper" /><category term="Your Love Is My Drug" /><category term="garlic" /><category term="Skribit" /><category term="bc" /><category term="infinity" /><category term="Google Gears" /><category term="Facebook" /><category term="Friday the 13th" /><category term="feeling" /><category term="TroopTube" /><category term="puma" /><category term="potato" /><category term="Office" /><category term="number" /><category term="Flot" /><category term="tip" /><category term="LZMA" /><category term="coercion" /><category term="Bing" /><category term="mwm" /><category term="copyright" /><category term="Mogan Freeman" /><category term="clis" /><category term="carrot" /><category term="eggless" /><category term="Deadliest Catch" /><category term="kernel" /><category term="chance" /><category term="weird" /><category term="intra-package import" /><category term="Taipei" /><category term="numbers" /><category term="Linux kernel" /><category term="human" /><category term="Markup Language" /><category term="Vulcan" /><category term="ampersand" /><category term="comedy" /><category term="IE9" /><category term="audio processing" /><category term="branch" /><category term="Google Visualization API" /><category term="Sweet Jesus" /><category term="evening" /><category term="poker" /><category term="gnome-keyring" /><category term="date" /><category term="Inconsolata" /><category term="Form" /><category term="typhoon" /><category term="validation" /><category term="nuclear" /><category term="Security Policies" /><category term="cursor" /><category term="DSL" /><category term="KDE4" /><category term="keyboard" /><category term="Wgasa" /><category term="idle" /><category term="WINE" /><category term="link" /><category term="recordMyDesktop" /><category term="Jesus" /><category term="file IO" /><category term="language code" /><category term="stove" /><category term="promise" /><category term="SHM" /><category term="ice cream" /><category term="wrapper" /><category term="verification" /><category term="breakfast" /><category term="gameplay" /><category term="Screen" /><category term="badge" /><category term="datastore" /><category term="Watchmen" /><category term="Adobe AIR" /><category term="W3C Validator" /><category term="game" /><category term="printf" /><category term="movie" /><category term="Say" /><category term="Lisa Hannigan" /><category term="g-yt-embed" /><category term="hand" /><category term="escape" /><category term="dawn" /><category term="IE8" /><category term="color" /><category term="base" /><category term="Damien Rice" /><category term="bastet" /><category term="Barack Obama" /><category term="capture" /><category term="Summer" /><category term="Atom" /><category term="wiki" /><category term="Lobster Wars" /><category term="box" /><category term="lacto vegetarian" /><category term="salad" /><category term="mock" /><category term="collection" /><category term="cover art" /><category term="web terminology" /><category term="Debra" /><category term="Labels" /><category term="keyframes" /><category term="relativeness" /><category term="Christina Stürmer" /><category term="Polydactyly" /><category term="I Wanna Dance With Somebody" /><category term="NDT" /><category term="Spring" /><category term="inconsistent" /><category term="Ian Murdock" /><category term="Marshall University" /><category term="Clip Smile" /><category term="cabin" /><category term="cairo-dock" /><category term="science" /><category term="Woopra" /><category term="log.sh" /><category term="guide" /><category term="security exception" /><category term="arithmetic evaluation" /><category term="nVidia" /><category term="counter" /><category term="Catoween" /><category term="cop" /><category term="IMAP" /><category term="Chrome Extension" /><category term="Fox" /><category term="rename" /><category term="Hawaii Five-0" /><category term="Graphviz" /><category term="Shell.FM" /><category term="developer tools" /><category term="transliteration" /><category term="conflict" /><category term="EncFS" /><category term="terminal" /><category term="Percent-encoding" /><category term="system monitoring" /><category term="US" /><category term="series" /><category term="hill" /><category term="singer" /><category term="loading time" /><category term="data" /><category term="fiction" /><category term="LaTeX" /><category term="password" /><category term="Naomi Watts" /><category term="profiling" /><category term="thief" /><category term="Square" /><category term="logging" /><category term="sox" /><category term="dinner" /><category term="blip" /><category term="Fast Flip" /><category term="UI" /><category term="new" /><category term="mencoder" /><category term="privacy" /><category term="Apple" /><category term="cookie" /><category term="Django template" /><category term="escaping" /><category term="caffeine" /><category term="action" /><category term="grandparents" /><category term="plaintext" /><category term="dragon" /><category term="Solaris" /><category term="JDIC" /><category term="romance" /><category term="livibetter.mp" /><category term="visualization" /><category term="attack" /><category term="RFC" /><category term="Google Spreadsheet" /><category term="type" /><category term="MSN" /><category term="Terrified" /><category term="waste" /><category term="traceback" /><category term="charger" /><category term="volume" /><category term="gnuclad" /><category term="sci-fi" /><category term="Lille" /><category term="bleeding" /><category term="nap" /><category term="Compose key" /><category term="Anaconda" /><category term="UK" /><category term="Dash" /><category term="Access-Control-Allow-Origin" /><category term="Public Domain" /><category term="fire" /><category term="Fedora Classroom" /><category term="cURL" /><category term="URxvt" /><category term="stair" /><category term="MPD" /><category term="No Ordinary Family" /><category term="direction" /><category term="statistics" /><category term="blogging" /><category term="notification" /><category term="circo" /><category term="SOPA" /><category term="Knowing" /><category term="svn" /><category term=".NET" /><category term="koala" /><category term="LOL" /><category term="Moskau" /><category term="super power" /><category term="Visual Effect" /><category term="interestingness" /><category term="template" /><category term="band" /><category term="snowman" /><category term="Gsource" /><category term="Steve Jobs" /><category term="ctypes" /><category term="locate" /><category term="word cloud" /><category term="Blackberry" /><category term="response" /><category term="animation" /><category term="mom" /><category term="Friend Connect" /><category term="BFS" /><category term="Covert Affairs" /><category term="driver" /><category term="navigation" /><category term="IE6" /><category term="XZ" /><category term="wallpaper" /><category term="Debian" /><category term="note" /><category term="cook" /><category term="program" /><category term="size" /><category term="Crafty" /><category term="SimpleHTTPServer" /><category term="webfont" /><category term="sudo" /><category term="moreutils" /><category term="TES" /><category term="datatype" /><category term="songwriter" /><category term="Arch Hurd" /><category term="classic" /><category term="parseInt" /><category term="pymunk" /><category term="related posts" /><category term="xinput" /><category term="twopi" /><category term="Yum" /><category term="detective" /><category term="instant noodles" /><category term="alignment" /><category term="Fox In Socks" /><category term="display manager" /><category term="quotation marks" /><category term="library" /><category term="widescreen" /><category term="four" /><category term="smile" /><category term="The Beast" /><category term="The X Files" /><category term="laundry" /><category term="teacher" /><category term="X.Org" /><category term="Lua" /><category term="Mono" /><category term="cron" /><category term="OldBlogTheBThing" /><category term="backup" /><category term="Adobe" /><category term="simulation" /><category term="big cat" /><category term="multiprocessing" /><category term="bad" /><category term="IO" /><category term="local" /><category term="wprintf" /><category term="webcam" /><category term="XML" /><category term="language" /><category term="regular expression" /><category term="fetching" /><category term="gaming" /><category term="adult" /><category term="devil" /><category term="interpreter" /><category term="subscription" /><category term="Google Analytics" /><category term="VCS" /><category term="speech" /><category term="xlock" /><category term="100" /><category term="tarball" /><category term="Stargate" /><category term="skeleton" /><category term="Gzip" /><category term="recursion" /><category term="blit" /><category term="visits" /><category term="Selah" /><category term="Twitter" /><category term="center" /><category term="BashPad" /><category term="signature" /><category term="Chase" /><category term="primitive value" /><category term="PNG" /><category term="change" /><category term="launcher" /><category term="Chi.mp" /><category term="fried rice" /><category term="espionage" /><category term="Blooger" /><category term="localStorage" /><category term="dwm" /><category term="Daniel Robbins" /><category term="Food Court Musical" /><category term="class" /><category term="simplejson" /><category term="happiness" /><category term="SMPlayer" /><category term="linuxwacom" /><category term="nudity" /><category term="recommendation" /><category term="idea" /><category term="watermelon" /><category term="snippet" /><category term="feed" /><category term="Internet" /><category term="util" /><category term="Fluxbox" /><category term="HAL" /><category term="tool" /><category term="maze" /><category term="webdesign" /><category term="sketch" /><category term="GNU/Screen" /><category term="microwave" /><category term="Blogspot" /><category term="Java" /><category term="bacon" /><category term="time" /><category term="broadcast" /><category term="manpage" /><category term="j.mp" /><category term="tab control" /><category term="MODEM" /><category term="microphone" /><category term="Google Docs Viewer" /><category term="tomorrow" /><category term="Google Buzz" /><category term="bzen2" /><category term="F1" /><category term="x11grabr" /><category term="package" /><category term="live" /><category term="movie-game" /><category term="hash" /><category term="shopping" /><category term="jQuery plugin" /><category term="Mozilla Firefox" /><category term="Hey Jude" /><category term="fullscreen" /><category term="resolution" /><category term="service" /><category term="bottle" /><category term="Skype" /><category term="John Mayer" /><category term="array" /><category term="indication" /><category term="homepage" /><category term="writing practice" /><category term="lsof" /><category term="PostRank" /><category term="configuration" /><category term="eix-sync" /><category term="dynamic loading" /><category term="xsnap" /><category term="Terminator" /><category term="indentation" /><category term="mother" /><category term="transform" /><category term="emoticon" /><category term="len" /><category term="authentication" /><category term="Completely Fair Scheduler" /><category term="crush" /><category term="Kara Dioguardi" /><category term="ON AIR" /><category term="violence" /><category term="baked" /><category term="Ishihara color test" /><category term="memory" /><category term="chroot" /><category term="search box" /><category term="letter" /><category term="German music" /><category term="cold" /><category term="Synaptics" /><category term="belief" /><category term="persimmon" /><category term="Super Simple" /><category term="Gentoo Portage" /><category term="memcache bug" /><category term="Hg" /><category term="leap second" /><category term="Boost" /><category term="love" /><category term="NiMH" /><category term="server down" /><category term="Fantastic Four" /><category term="OAuth" /><category term="client" /><category term="ACPI" /><category term="import" /><category term="song" /><category term="signal" /><category term="Basic Auth" /><category term="Dschinghis Khan" /><category term="Chromium" /><category term="Busted" /><category term="green" /><category term="results" /><category term="shell" /><category term="kat" /><category term="pastebinit" /><category term="cross-origin" /><category term="x86_64" /><category term="JSON" /><category term="The Company" /><category term="IM" /><category term="math" /><category term="QT" /><category term="Live Webmaster Tools" /><category term="binclock" /><category term="radio" /><category term="spamming" /><category term="drawing" /><category term="PEP 328" /><category term="lmgtfy.com" /><category term="login" /><category term="OpenDocument" /><category term="SSMTP" /><category term="MP3" /><category term="reverse video" /><category term="version" /><category term="Autumn" /><category term="donation" /><category term="issue" /><category term="i8042" /><category term="bubble" /><category term="Breaking Bad" /><category term="SXSW" /><category term="status code" /><category term="skin" /><category term="task" /><category term="vegetarian" /><category term="advertisment" /><category term="server" /><category term="Jason Reeves" /><category term="md5" /><category term="onion rings" /><category term="SunOS" /><category term="beer" /><category term="SQL" /><category term="stereomood" /><category term="lottery" /><category term="ads" /><category term="Alkaline" /><category term="3am" /><category term="type conversion" /><category term="reverse lens" /><category term="settings" /><category term="syntax" /><category term="xcompmgr" /><category term="microblogging" /><category term="binary" /><category term="pppoe" /><category term="dtwm" /><category term="Google Chart API" /><category term="travel" /><category term="popup" /><category term="egg" /><category term="desktop environment" /><category term="Compiz Fusion" /><category term="scrabble" /><category term="pillow" /><category term="webdev" /><category term="twitter_client" /><category term="roe" /><category term="humor" /><category term="Peace In Our Lifetime" /><category term="The Beatles" /><category term="interactive" /><category term="XSLT" /><category term="slow" /><category term="kitteh" /><category term="dream" /><category term="FreeBSD" /><category term="cloud" /><category term="Chrome Web Store" /><category term="Brain Fuck Scheduler" /><category term="follow" /><category term="pen pal" /><category term="Bill Gates" /><category term="Japan" /><category term="certificate" /><category term="url" /><category term="Scrabb.ly" /><category term="command-line options" /><category term="width" /><category term="asynchronous" /><category term="pastebin" /><category term="Pandora" /><category term="Blip.fm" /><category term="mpc" /><category term="converter" /><category term="tablet" /><category term="rm" /><category term="mirror" /><category term="Ubuntu 9.10" /><category term="cdrecord" /><category term="USA" /><category term="compression" /><category term="SMTP" /><category term="desire" /><category term="Mozilla" /><category term="telnet" /><category term="Kesha" /><category term="SoftMaker" /><category term="tweak" /><category term="Wacom" /><category term="port" /><category term="In Bruges" /><category term="LabelX" /><category term="authorization" /><category term="database" /><category term="key binding" /><category term="Windows 7" /><category term="meme" /><category term="French Fries" /><category term="name" /><category term="communication" /><category term="Jimmy's Food Factory" /><category term="blog" /><category term="Fedora 11" /><category term="pagination" /><category term="Fedora 10" /><category term="3D" /><category term="xlockmore" /><category term="icon" /><category term="religion" /><category term="Envy Code" /><category term="file conversion" /><category term="IE" /><category term="constellation" /><title>YJL --verbose</title><subtitle type="html">Outputs directly from me &amp;lt;del&amp;gt;about almost everything&amp;lt;/del&amp;gt;...</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.yjl.im/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.yjl.im/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>753</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/YJLv" /><feedburner:info uri="yjlv" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CkMDRHo_eSp7ImA9WhRbGEQ.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-8584414433685300436</id><published>2012-02-10T08:14:00.000-08:00</published><updated>2012-02-10T08:14:35.441-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-10T08:14:35.441-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DNS" /><category scheme="http://www.blogger.com/atom/ns#" term="OpenDNS" /><category scheme="http://www.blogger.com/atom/ns#" term="nameserver" /><category scheme="http://www.blogger.com/atom/ns#" term="Google" /><category scheme="http://www.blogger.com/atom/ns#" term="IP address" /><title>Have a list of backup DNS</title><content type="html">I was watching live stream and read the chat alongside, everything seemed to be normal until I couldn't open new websites. I had a script to get updates from all sorts of services also having trouble.&lt;br /&gt;
&lt;br /&gt;
Although the stream was still playing smoothly and chat message was still coming in, but I can't ping with domain name, so I decided to restart my PPP.&lt;br /&gt;
&lt;br /&gt;
Well, it's still didn't work. I noticed I could ping with IP address. I could also ping DNS with IP and resolve domain name with @dns_ip. Somehow, DNS didn't work normally, which are my ISP's DNS.&lt;br /&gt;
&lt;br /&gt;
I even checked route table, it's good.&lt;br /&gt;
&lt;br /&gt;
Restarting the ADSL router as the last hope, guessing that might be just some upgrading glitch in ISP's end. Well, it didn't work.&lt;br /&gt;
&lt;br /&gt;
Since, I knew the problem was with DNS. I thought I could just replace with other DNS. The funny thing was I didn't have any IP address of other DNS.&lt;br /&gt;
&lt;br /&gt;
Luckily, since I could @dns_ip to lookup Google's IP, so I could still use Google's IP to do search. Thank god! Amazingly, Google seems to be careful about such situation, I saw everything in search result. The Instant search was reacting to my typing, images were loaded normally. Everything was accessible via that single IP address I used to connect. (Google Search has many IPs)&lt;br /&gt;
&lt;br /&gt;
The only one I knew I could probably trust and it's open to public access is the &lt;a href="http://www.opendns.com/"&gt;OpenDNS&lt;/a&gt;. I can't just click on the result to go to the website since it requires DNS to resolve for the IP address. But I managed to get the IP address displayed in plain search result with right keyword.&lt;br /&gt;
&lt;br /&gt;
So, this tells me: you better to keep a list of backup DNS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-8584414433685300436?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cedaGnj6CAlSih2F8ar1dpBah3M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cedaGnj6CAlSih2F8ar1dpBah3M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cedaGnj6CAlSih2F8ar1dpBah3M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cedaGnj6CAlSih2F8ar1dpBah3M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=n9Vt6lwcec8:B3xKZf-Tss8:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=n9Vt6lwcec8:B3xKZf-Tss8:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/n9Vt6lwcec8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/8584414433685300436/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/have-list-of-backup-dns.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/8584414433685300436?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/8584414433685300436?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/n9Vt6lwcec8/have-list-of-backup-dns.html" title="Have a list of backup DNS" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/have-list-of-backup-dns.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYDRX0_fip7ImA9WhRbF0k.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-6811290922573183922</id><published>2012-02-08T15:02:00.000-08:00</published><updated>2012-02-08T15:02:54.346-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-08T15:02:54.346-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="radix" /><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="map" /><category scheme="http://www.blogger.com/atom/ns#" term="number" /><category scheme="http://www.blogger.com/atom/ns#" term="parseInt" /><category scheme="http://www.blogger.com/atom/ns#" term="base" /><category scheme="http://www.blogger.com/atom/ns#" term="pitfall" /><title>JavaScript map and parseInt</title><content type="html">I was bored and lurking at GitHub &lt;a href="https://github.com/timeline"&gt;Explore Timeline&lt;/a&gt;, this Gist caught my eye, &lt;a href="https://gist.github.com/1773348#file_parse_int.js"&gt;&lt;i&gt;"Hey, javascript! Are you fucking kidding me?!"&lt;/i&gt;&lt;/a&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09"].map(parseInt);
[0, NaN, 0, 0, 0, 0, 0, 0, 0, 0]
&amp;gt; ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09"].map(function(item) { return parseInt(item); });
[0, 1, 2, 3, 4, 5, 6, 7, 0, 0]
&amp;gt; ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09"].map(function(item) { return parseInt(parseFloat(item)); });
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]&lt;/code&gt;&lt;/pre&gt;
I found it's quite interesting to see a code fall into pitfall twice in one line of code. There is nothing wrong with &lt;code&gt;map&lt;/code&gt; or &lt;code&gt;parseInt&lt;/code&gt; I am afraid. JavaScript wasn't kidding with this Gist creator.&lt;br /&gt;
&lt;br /&gt;
The mapped/callback function of &lt;code&gt;map&lt;/code&gt; receives three arguments, the &lt;b&gt;element&lt;/b&gt;, &lt;b&gt;index&lt;/b&gt;, and the &lt;b&gt;array&lt;/b&gt;. As you know, you don't have to list/supply all three when you are defining/invoking a function.&lt;br /&gt;
&lt;br /&gt;
In the first line, the input arguments from &lt;code&gt;map&lt;/code&gt; causes &lt;code&gt;parseInt&lt;/code&gt; think you are asking different base when parsing. &lt;code&gt;parseInt&lt;/code&gt; also accepts number base besides the string.&lt;br /&gt;
&lt;br /&gt;
The second line still gets unexpected, although correct, answers. That is because 0# is generally considered as Octal number in programming languages, though not standardized in JavaScript. So, you can't really to expect it will be read as human does.&lt;br /&gt;
&lt;br /&gt;
The last one, &lt;code&gt;parseFloat&lt;/code&gt; is not the solution, it works because it's always base 10. In fact, using &lt;code&gt;Math.floor&lt;/code&gt; instead of &lt;code&gt;parseInt&lt;/code&gt; for second parsing looks little better to me, although it's still so bad. Or just drop the second parsing, they are all type &lt;code&gt;Number&lt;/code&gt; and they does not contain any error during the parsing. It's unnecessary code.&lt;br /&gt;
&lt;br /&gt;
One proper way to code this is&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;["00", "01", "02", "03", "04", "05", "06", "07", "08", "09"].map(
    function(item){return parseInt(item, 10);});&lt;/code&gt;&lt;/pre&gt;
This is rigorous and clear but, well, long.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-6811290922573183922?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/efvHEEmvUN1OvUFRkfBtnagbO1o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/efvHEEmvUN1OvUFRkfBtnagbO1o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/efvHEEmvUN1OvUFRkfBtnagbO1o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/efvHEEmvUN1OvUFRkfBtnagbO1o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=Ukt-pcioOq0:VC971A00ob0:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=Ukt-pcioOq0:VC971A00ob0:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/Ukt-pcioOq0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/6811290922573183922/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/javascript-map-and-parseint.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/6811290922573183922?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/6811290922573183922?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/Ukt-pcioOq0/javascript-map-and-parseint.html" title="JavaScript map and parseInt" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/javascript-map-and-parseint.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEANSH09fip7ImA9WhRbFkg.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-5265247020095648249</id><published>2012-02-07T15:19:00.000-08:00</published><updated>2012-02-07T15:19:59.366-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-07T15:19:59.366-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="notification" /><category scheme="http://www.blogger.com/atom/ns#" term="favicon" /><category scheme="http://www.blogger.com/atom/ns#" term="cross-domain" /><category scheme="http://www.blogger.com/atom/ns#" term="bubble" /><category scheme="http://www.blogger.com/atom/ns#" term="Tinycon" /><category scheme="http://www.blogger.com/atom/ns#" term="security exception" /><category scheme="http://www.blogger.com/atom/ns#" term="Firefox" /><title>Bubbling up your favicon with tinycon.js</title><content type="html">&lt;a class="reference external" href="https://github.com/tommoor/tinycon"&gt;Tinycon&lt;/a&gt; is an interesting small JavaScript library for manipulating page’s favicon. Here is a quick example, click on the button below and look at my favicon!&lt;br /&gt;
&lt;script src="https://gist.github.com/raw/1762690/tinycon.js"&gt;
&lt;/script&gt;
&lt;script&gt;
function bubble_favicon(){
  // http://stackoverflow.com/questions/2390232/why-does-canvas-todataurl-throw-a-security-exception
  $('link[rel=icon]').attr('href', 'data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAAAP8AAAAAAAAAAAAAAP8AAAD/AAAAAAAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAAAAAAD/AAAA/wAAAAAAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAAAAAAA/wAAAP8AAAAAAAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAAAAAAAP8AAAD/AAAAAAAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAD/AAAA/wAAAAAAAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAAAAAAA/wAAAP8AAAAAAAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAAAAAAAP8AAAD/AAAAAAAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAD/AAAA/wAAAAAAAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAAAAAAAAAAAAD/AAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAIZBAACCQQAA8k8AAPJPAADyTwAA8k8AAPJPAADyTwAA/n8AAPw/AAD4HwAA8Y8AAPPPAADzzwAA//8AAA%3D%3D');
  TEXT = 'YJL --verbose';
  TEXT_idx = 0;
  setInterval(function(){
    Tinycon.drawFavicon(TEXT[TEXT_idx++]);
    TEXT_idx %= TEXT.length;
  }, 1000);
  $('#btn-bubble-favicon').remove();
}
&lt;/script&gt;
&lt;button id="btn-bubble-favicon" onclick="bubble_favicon()"&gt;Start Bubbling!&lt;/button&gt;&lt;br /&gt;
Please be noted that I &lt;a class="reference external" href="https://gist.github.com/1762690"&gt;modified&lt;/a&gt; the original code for allowing non-number character to be rendered. General case and this library is for notifying the unread notification. Since it is for numbers, so the text renders a little be off and I don’t adjust it.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script src="https://gist.github.com/raw/1762690/tinycon.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
function bubble_favicon(){
  // $('link[rel=icon]').attr('href', 'data:image/x-icon;base64,LONG_LONG_BASE64_DATA');
  TEXT = 'YJL --verbose';
  TEXT_idx = 0;
  setInterval(function(){
    Tinycon.drawFavicon(TEXT[TEXT_idx++]);
    TEXT_idx %= TEXT.length;
  }, 1000);
  $('#btn-bubble-favicon').remove();
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
There is another issue I encountered when I was writing this post. I couldn’t get the text rendered because the icon was at cross-domain, which caused Firefox raised a &lt;a class="reference external" href="http://stackoverflow.com/questions/2390232/why-does-canvas-todataurl-throw-a-security-exception"&gt;security exception&lt;/a&gt; when calling &lt;tt class="docutils literal"&gt;toDataURL&lt;/tt&gt; on a canvas. If your page can be under same situation, you can update the favicon link element as shown above in commented code, so you wouldn’t have problem to use with Tinycon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-5265247020095648249?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/j67oULwbYZNMdXvqxqgGEQb821s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j67oULwbYZNMdXvqxqgGEQb821s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/j67oULwbYZNMdXvqxqgGEQb821s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j67oULwbYZNMdXvqxqgGEQb821s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=UNLPQ_xIAao:LBba9Cn-c_g:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=UNLPQ_xIAao:LBba9Cn-c_g:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/UNLPQ_xIAao" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/5265247020095648249/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/bubbling-up-your-favicon-with-tinyconjs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/5265247020095648249?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/5265247020095648249?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/UNLPQ_xIAao/bubbling-up-your-favicon-with-tinyconjs.html" title="Bubbling up your favicon with tinycon.js" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/bubbling-up-your-favicon-with-tinyconjs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMCQHs-cSp7ImA9WhRbFkk.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-2504615933850054304</id><published>2012-02-07T10:47:00.000-08:00</published><updated>2012-02-07T10:47:41.559-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-07T10:47:41.559-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="version" /><category scheme="http://www.blogger.com/atom/ns#" term="package" /><category scheme="http://www.blogger.com/atom/ns#" term="library" /><category scheme="http://www.blogger.com/atom/ns#" term="release" /><category scheme="http://www.blogger.com/atom/ns#" term="import" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>Why your Python library needs a separate version.py</title><content type="html">&lt;p&gt;Remember I &lt;a class="reference external" href="http://blog.yjl.im/2012/02/python-intra-package-import-aka.html"&gt;mentioned&lt;/a&gt; a Python library has &lt;tt class="docutils literal"&gt;version.py&lt;/tt&gt; which essentially only contains one line like &lt;tt class="docutils literal"&gt;VERSION = &amp;#39;x.y.z&amp;#8217;&lt;/tt&gt;?&lt;/p&gt;
&lt;p&gt;After I posted it, I mailed the author and asked him about it. He told me it&amp;#8217;s a common practice for packaging, you can see the &lt;a class="reference external" href="https://github.com/nvie/times/blob/master/setup.py#L4"&gt;&lt;tt class="docutils literal"&gt;get_version&lt;/tt&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def get_version():
    basedir = os.path.dirname(__file__)
    with open(os.path.join(basedir, 'times/version.py')) as f:
        VERSION = None
        exec(f.read())
        return VERSION
    raise RuntimeError('No version info found.')&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As you can see without thinking this is for package installation, you may &lt;a class="reference external" href="https://github.com/nvie/times/commit/a8373a2aa233a1efe5583406ef57e5d1748fa349"&gt;improve&lt;/a&gt; it as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def get_version():
    from times import __version__
    return __version__&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I would do it, it&amp;#8217;s clear and gets straight into the point.&lt;/p&gt;
&lt;p&gt;However, the author received a &lt;a class="reference external" href="https://github.com/nvie/times/pull/3"&gt;bug report&lt;/a&gt;, which reminded him of why he made version information in separate file. The reason of doing so became apparant when this bug report came in.&lt;/p&gt;
&lt;p&gt;The dependency is the issue. When you use pip or easy_install, they will handle the dependency for the user. Whatever dependency the library requires, as long as the packager list them all, they will be also be installed with the library.&lt;/p&gt;
&lt;p&gt;If you don&amp;#8217;t literally put the version number in setup script and you tries to extract the version information of the library by using direct import, it basically evaluates the library as if it&amp;#8217;s being used and that becomes an issue if some depended libraries are not installed and are being used by the library.&lt;/p&gt;
&lt;p&gt;In the case of bug report, &lt;em&gt;pytz&lt;/em&gt; exposed the issue, you can also see the reporter tried to &lt;a class="reference external" href="https://github.com/bwghughes/times/commit/30e926a01d345ca27f33210c4373ad975ffc7286"&gt;patch&lt;/a&gt; it by catching the &lt;tt class="docutils literal"&gt;ImportError&lt;/tt&gt; exception. The handling wasn&amp;#8217;t good, because the exception was bypass. It should end the program with error code, instead, because not everyone like using pip to install package. I don&amp;#8217;t think it&amp;#8217;s a good patch even as a workaround.&lt;/p&gt;
&lt;p&gt;The library author reverted back to previous method of getting version information. They are actually some other ways to get the version or even others.&lt;/p&gt;
&lt;p&gt;You can use regular expression to extract or to get variables like &lt;tt class="docutils literal"&gt;__foo_bar__ = &amp;#8216;blah blah blah&amp;#8217;&lt;/tt&gt;. If you have many libraries, your &lt;tt class="docutils literal"&gt;setup.py&lt;/tt&gt; can be more generalized, some package metadata can be store in &lt;tt class="docutils literal"&gt;__init__.py&lt;/tt&gt;. You can also use path trick and do a normal &lt;tt class="docutils literal"&gt;import&lt;/tt&gt; or manual import.&lt;/p&gt;
&lt;p&gt;I don&amp;#8217;t think there is a strict rule to bridge between setup script and library for package metadata. I would like to think it&amp;#8217;s safe to say, your library should not know about the setup script and act upon it.&lt;/p&gt;
&lt;p&gt;I want to point out why focus on &lt;em&gt;version&lt;/em&gt;, it&amp;#8217;s because it&amp;#8217;s probably the only one gets updated every time for a new release. You don&amp;#8217;t change authors, website, etc. very often. Being given own place can be a good way for release. You can then update it and add a log entry to Changelog, update the Readme. All of these are without touching the library code. I personally like having two type of maintenances, one is for actual coding, another is for documenting. Generally, I don&amp;#8217;t like them to be in same commit especially for a release. Although, you certainly need to mix them most of time.&lt;/p&gt;
&lt;p&gt;Any thoughts on this?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-2504615933850054304?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kEHxHPy4a6-izG29uT134G5H3h0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kEHxHPy4a6-izG29uT134G5H3h0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kEHxHPy4a6-izG29uT134G5H3h0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kEHxHPy4a6-izG29uT134G5H3h0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=Vbv8_9TB4bY:YjAtV5QekGM:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=Vbv8_9TB4bY:YjAtV5QekGM:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/Vbv8_9TB4bY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/2504615933850054304/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/why-your-python-library-needs-separate.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/2504615933850054304?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/2504615933850054304?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/Vbv8_9TB4bY/why-your-python-library-needs-separate.html" title="Why your Python library needs a separate version.py" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/why-your-python-library-needs-separate.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEENRHw4cCp7ImA9WhRbFUg.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-4089187581711290213</id><published>2012-02-06T10:24:00.000-08:00</published><updated>2012-02-06T10:24:55.238-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-06T10:24:55.238-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="screen resolution" /><category scheme="http://www.blogger.com/atom/ns#" term="dwm" /><category scheme="http://www.blogger.com/atom/ns#" term="fullscreen" /><category scheme="http://www.blogger.com/atom/ns#" term="SDL" /><category scheme="http://www.blogger.com/atom/ns#" term="DosBox" /><title>DOSBox fullscreen issue with DWM and SDL</title><content type="html">When I was trying to &lt;a href="http://blog.yjl.im/2012/02/playing-elder-scrolls-arena-in-dosbox.html"&gt;play TES: Arena&lt;/a&gt; in fullscreen, the screen didn't go as I expected. I saw the screen resolution changed from 1680x1050 (my native screen resolution), the game screen didn't show but a portion of X window from top-left corner.&lt;br /&gt;
&lt;br /&gt;
There was a &lt;a href="http://blog.yjl.im/2012/02/fus-ro-dah.html"&gt;thread of discussion&lt;/a&gt; about this, the problem didn't exist in DWM v4.3, but that was very old version of DWM. Although there seemed to have some patch, but I didn't look into it. I didn't like to patch on my own.&lt;br /&gt;
&lt;br /&gt;
I was using scaler of DOSBox at the time being in windowed mode, then I noticed there was an option &lt;code&gt;fullresolution&lt;/code&gt; under the sdl section. The workaround is actually quite simple, you set it to your native screen resolution, so the screen resolution won't be changed after switching to fullscreen mode.&lt;br /&gt;
&lt;br /&gt;
Problem solved.&lt;br /&gt;
&lt;br /&gt;
You should have a default configuration file under &lt;code&gt;~/.dosbox&lt;/code&gt; after first-run of DOSBox, you can copy and modify it and use it with current directory as &lt;code&gt;dosbox.conf&lt;/code&gt; when you run with &lt;code&gt;dosbox .&lt;/code&gt;. It is documented very well, or you can read about the options &lt;a href="http://www.dosbox.com/wiki/Dosbox.conf"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Note that some scaler doesn't re-scale to fill up the entire screen, you will see the picture centered at center of screen and leave a huge black border. normal2x/3x, advmame3x, and some re-scale to fill up the screen.&lt;br /&gt;
&lt;br /&gt;
This may actually better than real screen mode change, by keeping the same resolution, the switching is faster than real screen mode change. You won't feel a pause during the switching.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-4089187581711290213?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4g2sU4F7oN_A7b4SASYSPeXrqM0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4g2sU4F7oN_A7b4SASYSPeXrqM0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4g2sU4F7oN_A7b4SASYSPeXrqM0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4g2sU4F7oN_A7b4SASYSPeXrqM0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=b2xVym_RVDQ:hZ1cswQ8UQY:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=b2xVym_RVDQ:hZ1cswQ8UQY:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/b2xVym_RVDQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/4089187581711290213/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/dosbox-fullscreen-issue-with-dwm-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/4089187581711290213?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/4089187581711290213?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/b2xVym_RVDQ/dosbox-fullscreen-issue-with-dwm-and.html" title="DOSBox fullscreen issue with DWM and SDL" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/dosbox-fullscreen-issue-with-dwm-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08DQn46fCp7ImA9WhRbFUg.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-1479934464976238485</id><published>2012-02-06T09:42:00.000-08:00</published><updated>2012-02-06T10:11:13.014-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-06T10:11:13.014-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="The Elder Scrolls" /><category scheme="http://www.blogger.com/atom/ns#" term="dwm" /><category scheme="http://www.blogger.com/atom/ns#" term="TES" /><category scheme="http://www.blogger.com/atom/ns#" term="SDL" /><category scheme="http://www.blogger.com/atom/ns#" term="game" /><category scheme="http://www.blogger.com/atom/ns#" term="DosBox" /><category scheme="http://www.blogger.com/atom/ns#" term="Arena" /><title>Playing The Elder Scrolls: Arena in DOSBox</title><content type="html">After I had fun with &lt;a href="http://blog.yjl.im/2012/02/fus-ro-dah.html"&gt;Fus Ro Dah&lt;/a&gt;, I decided to try the first game in DOSBox, here is the commands I used to run it:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;unzip Arena106Setup.zip
# file Arena106.exe
# Arena106.exe: PE32 executable (GUI) Intel 80386, for MS Windows, UPX compressed, RAR self-extracting archive
unrar e Arena106.exe
dosbox ARENA.BAT&lt;/pre&gt;
&lt;br /&gt;
You can download the full game for free on &lt;a href="http://www.elderscrolls.com/arena"&gt;its website&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I have adjusted the &lt;a href="http://pastebin.com/NT3fuGd2"&gt;configuration file of DOSBox&lt;/a&gt;, so I can have fullscreen in DWM, there seems to have &lt;a href="http://blog.yjl.im/2012/02/fus-ro-dah.html"&gt;bug in SDL or DWM&lt;/a&gt;. Save it as &lt;code&gt;dosbox.conf&lt;/code&gt; and put it with game files, you will need to adjust it for your screen setting.&lt;br /&gt;
&lt;br /&gt;
Before I changed the default normal2x &lt;a href="http://www.dosbox.com/wiki/Scaler"&gt;scaler&lt;/a&gt; (you can also use command &lt;code&gt;scaler&lt;/code&gt; to change), the game picture really reminded me of the old times. I have no idea how I could have played many games in that period of time. The text was almost unreadable for me before I changed to hq3q or advmame3x. Here are some screenshot of original pictures: &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/--sVZDO2g1Zg/TzAMXSJBAcI/AAAAAAAAC_4/BvBEawaxlPs/s1600/a_001.png" imageanchor="1"&gt;&lt;img border="0" class="no-autoresize" src="http://1.bp.blogspot.com/--sVZDO2g1Zg/TzAMXSJBAcI/AAAAAAAAC_4/BvBEawaxlPs/s1600/a_001.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-hie5ew0Q4sA/TzAMYXiSRNI/AAAAAAAADAA/Jq0BKNbMP5o/s1600/a_002.png" imageanchor="1"&gt;&lt;img border="0" class="no-autoresize" src="http://3.bp.blogspot.com/-hie5ew0Q4sA/TzAMYXiSRNI/AAAAAAAADAA/Jq0BKNbMP5o/s1600/a_002.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-Qc_Dlf55vTU/TzAMZCvWDsI/AAAAAAAADAE/vu233Po6DFU/s1600/a_000.png" imageanchor="1"&gt;&lt;img border="0" class="no-autoresize" src="http://2.bp.blogspot.com/-Qc_Dlf55vTU/TzAMZCvWDsI/AAAAAAAADAE/vu233Po6DFU/s1600/a_000.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;i&gt;(I don't look like that in that picture at all, just random test :D)&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
I also had to change to CPU cycle, default was 3000, which was too slow when walking in the game.&lt;br /&gt;
&lt;br /&gt;
The ZIP comes with a PDF file for instruction of using DOSBox, it also contains a list of password for &lt;i&gt;copy protection&lt;/i&gt;, there is another &lt;code&gt;Passwords.txt&lt;/code&gt; for easy lookup.&lt;br /&gt;
&lt;br /&gt;
This certainly brought me back about two decades ago. After you bought a game, you opened the plastic wrapper, then took out a thick, well-designed, well-printed manual. You would hope there is more than just one manual, some posters or something.&lt;br /&gt;
&lt;br /&gt;
You flipped over the pages, then a piece of colored plastic would fall out, it could be solid color, or two colors. You would put it on certain page which the text was printed in unreadable background colors.&lt;br /&gt;
&lt;br /&gt;
But when you read through the colored plastic a number or a word would show up beneath. You then input that into a popup dialog, which showed up at random or at beginning of the game.&lt;br /&gt;
&lt;br /&gt;
Meh, that was the time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-1479934464976238485?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MiX_wX32xn1oQarAWcdciwPZS8M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MiX_wX32xn1oQarAWcdciwPZS8M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MiX_wX32xn1oQarAWcdciwPZS8M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MiX_wX32xn1oQarAWcdciwPZS8M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=YwnsSK4Xsfo:RV1OEds32Ow:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=YwnsSK4Xsfo:RV1OEds32Ow:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/YwnsSK4Xsfo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/1479934464976238485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/playing-elder-scrolls-arena-in-dosbox.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/1479934464976238485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/1479934464976238485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/YwnsSK4Xsfo/playing-elder-scrolls-arena-in-dosbox.html" title="Playing The Elder Scrolls: Arena in DOSBox" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/--sVZDO2g1Zg/TzAMXSJBAcI/AAAAAAAAC_4/BvBEawaxlPs/s72-c/a_001.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/playing-elder-scrolls-arena-in-dosbox.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8CRXk_eip7ImA9WhRbFEo.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-8317789735725217753</id><published>2012-02-05T13:37:00.000-08:00</published><updated>2012-02-05T13:37:44.742-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-05T13:37:44.742-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery plugin" /><category scheme="http://www.blogger.com/atom/ns#" term="feed" /><category scheme="http://www.blogger.com/atom/ns#" term="jquery-lifestream" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><category scheme="http://www.blogger.com/atom/ns#" term="updates" /><title>jQuery lifestream plugin</title><content type="html">&lt;p&gt;I found this &lt;a class="reference external" href="https://github.com/christianv/jquery-lifestream"&gt;jquery-lifestream&lt;/a&gt; plugin on GitHub and it&amp;#8217;s fairly easy to use, here is a quick example of my blog feed, &lt;a class="reference external" href="https://github.com/livibetter"&gt;GitHub&lt;/a&gt;, and &lt;a class="reference external" href="http://code.google.com/u/&amp;#64;UBRRRFVVAhFCWgR%2B/"&gt;Google Code&lt;/a&gt; updates:&lt;/p&gt;
&lt;div id="lifestream"&gt;&lt;/div&gt;
&lt;style&gt;#lifestream { font-family: monospace; }&lt;/style&gt;
&lt;script src="http://christianv.github.com/jquery-lifestream/jquery.lifestream.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
(function($) {
$.fn.lifestream.feeds.gcode = function( config, callback ) {

  parseFeed = function( input ) {
    var output = [], list, i = 0, j;
    if(input.query &amp;&amp; input.query.count &amp;&amp; input.query.count &gt; 0) {
      list = input.query.results.entry;
      j = list.length;
      for( ; i&lt;j; i++) {
        var item = list[i];

        output.push({
          url: config.user,
          date: new Date( item.updated ),
          config: config,
          html: item.title.content
        });
      }
    }
    return output;
  };

  $.ajax({
    url: $.fn.lifestream.createYqlUrl('select * from atom where url="'
      + config.user + '"'),
    dataType: 'jsonp',
    success: function( data ) {
      callback(parseFeed(data));
    }
  });

};
})(jQuery);

$("#lifestream").lifestream({
  limit: 15,
  list: [
    {
      service: "blogger",
      user: "yjlv",
      template: {
        posted: '${author.name} posted &lt;a href="${origLink}"&gt;${title}&lt;/a&gt;'
      }
    },
    {
      service: "github",
      user: "livibetter"
    },
    {
      service: "gcode",
      user: "http://code.google.com/feeds/u/115422682039760465813/updates/user/basic"
    }
  ]
});
&lt;/script&gt;&lt;p&gt;It already has support for more 20 or 30 services (it&amp;#8217;s a long list, didn&amp;#8217;t count), and you can write your template for layout which fits in with your design. The following code is the setup, you can see I add blog post author name for the output:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$("#lifestream").lifestream({
  limit: 15,
  list: [
    {
      service: "blogger",
      user: "yjlv",
      template: {
        posted: '${author.name} posted &amp;lt;a href="${origLink}"&amp;gt;${title}&amp;lt;/a&amp;gt;'
      }
    },
    {
      service: "github",
      user: "livibetter"
    },
    {
      service: "gcode",
      user: "http://code.google.com/feeds/u/115422682039760465813/updates/user/basic"
    }
  ]
});
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can even add more services without adding to the original code. For example, it does not support Google Code but you can see I have the updates from my Google Code account listed above. The updates on Google Code uses Atom feed, but &lt;a class="reference external" href="https://github.com/christianv/jquery-lifestream"&gt;jquery-lifestream&lt;/a&gt; doesn&amp;#8217;t support it. But that&amp;#8217;s fine, because you can easily expand &lt;a class="reference external" href="https://github.com/christianv/jquery-lifestream"&gt;jquery-lifestream&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(function($) {
  $.fn.lifestream.feeds.gcode = function( config, callback ) {

    parseFeed = function( input ) {
      var output = [], list, i = 0, j;
      if(input.query &amp;amp;&amp;amp; input.query.count &amp;amp;&amp;amp; input.query.count &amp;gt; 0) {
        list = input.query.results.entry;
        j = list.length;
        for( ; i&amp;lt;j; i++) {
          var item = list[i];

          output.push({
            url: config.user,
            date: new Date( item.updated ),
            config: config,
            html: item.title.content
          });
        }
      }
      return output;
    };

    $.ajax({
      url: $.fn.lifestream.createYqlUrl('select * from atom where url="'
        + config.user + '"'),
      dataType: 'jsonp',
      success: function( data ) {
        callback(parseFeed(data));
      }
    });

  };
})(jQuery);&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can rewrite the parser, do some advanced tasks, such as filter or extraction of some data from feed. For example, you can use jQuery to parse the html and extract the image, so it can be used as thumbnail. If you know about JavaScript, you can enrich the results easily.&lt;/p&gt;
&lt;p&gt;I think this can be used in many cases and it doesn&amp;#8217;t have to be your contents. You can add some blogroll, photo collection of multiple Flickr account, or updates from all kinds of social networkings for a project. Or just a gadget for your blog, which gathers your photos, tweets, etc. It can keep your blog or webpage  &lt;em&gt;cleaner&lt;/em&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-8317789735725217753?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/F0DNkBo5Ror7lvQvynRH_m9JOeI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F0DNkBo5Ror7lvQvynRH_m9JOeI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/F0DNkBo5Ror7lvQvynRH_m9JOeI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F0DNkBo5Ror7lvQvynRH_m9JOeI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=OOyBPeQE4eY:pJ0-13jlYx4:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=OOyBPeQE4eY:pJ0-13jlYx4:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/OOyBPeQE4eY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/8317789735725217753/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/jquery-lifestream-plugin.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/8317789735725217753?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/8317789735725217753?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/OOyBPeQE4eY/jquery-lifestream-plugin.html" title="jQuery lifestream plugin" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/jquery-lifestream-plugin.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0ABQXYzeCp7ImA9WhRbE0k.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-922805220038746930</id><published>2012-02-03T23:49:00.000-08:00</published><updated>2012-02-03T23:49:10.880-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-03T23:49:10.880-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Skyrim" /><category scheme="http://www.blogger.com/atom/ns#" term="Fus Ro Dah" /><category scheme="http://www.blogger.com/atom/ns#" term="dragon" /><category scheme="http://www.blogger.com/atom/ns#" term="video game" /><category scheme="http://www.blogger.com/atom/ns#" term="Elder Scrolls" /><title>Fus Ro Dah!</title><content type="html">&lt;p&gt;I don&amp;#8217;t use Windows and don&amp;#8217;t have any game consoles, but I do know about Skyrim. When it was released last year, I watched a lot of game playing on Justin.tv. I know how the main storyline goes.&lt;/p&gt;
&lt;p&gt;After the release, I often saw some people shouting &amp;#8220;FUS RO DAH!&amp;#8221; in channel not even about gaming. Whoever was not familiar with that game couldn&amp;#8217;t understand the meaning, then you see people started to ask about the meaning. It&amp;#8217;s quite silly to shout something irreverent in other channel. If it was about gaming, I saw more the shourting and some even got deleted because it&amp;#8217;s like snowball.&lt;/p&gt;
&lt;p&gt;I had watched a couple of &lt;em&gt;parody&lt;/em&gt; videos of Fus Ro Dah on YouTube, but I just found out there are plenty more after. No idea people are so into making fun of this. I put some I fell really funny in a &lt;a class="reference external" href="http://www.youtube.com/playlist?list=PLA066D0E2715CADDD"&gt;playlist&lt;/a&gt; (skip first one, it&amp;#8217;s the trailer, you will see it soon :):&lt;/p&gt;
&lt;iframe width="640" height="360" src="http://www.youtube.com/embed/videoseries?list=PLA066D0E2715CADDD&amp;amp;hl=en_US" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;p&gt;The one with Chuck Norris can be skipped after his part ends. Some people made Fus Ro Dah videos but they have no idea what that actually means, although few are still quite funny, even they didn&amp;#8217;t get the point.&lt;/p&gt;
&lt;p&gt;Now let&amp;#8217;s practice this dragon shout, shall we?&lt;/p&gt;
&lt;div id='fus-ro-dah'&gt;&lt;/div&gt;
&lt;div style="text-align:center"&gt;&lt;button id="btn-fus-ro-dah"&gt;Fus Ro Dah!&lt;/button&gt;&lt;/div&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"&gt;&lt;/script&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"&gt;&lt;/script&gt;
&lt;style&gt;
#btn-fus-ro-dah {
  font-size: 2em;
}
#yt-fus-ro-dah {
  position: fixed;
  top: 100%;
  z-index: 999;
}
&lt;/style&gt;
&lt;script&gt;
function fus_ro_dah() {
  if ($('#yt-fus-ro-dah').length &gt; 0)
    return;
  swfobject.embedSWF("http://www.youtube.com/v/PjqsYzBrP-M?version=3&amp;controls=0&amp;iv_load_policy=3&amp;enablejsapi=1&amp;playerapiid=yt-fus-ro-dah",
                     "fus-ro-dah", "640", "360", "9", null, null,
                     {allowScriptAccess: "always"},
                     {id: 'yt-fus-ro-dah'});
}
function fus_ro_dah_end(state) {
  if (state == 0 || state == 2) {
    $('#yt-fus-ro-dah').replaceWith('&lt;div id="fus-ro-dah"&gt;&lt;/div&gt;');
    $((!$.browser.webkit)?'html':'body')
        .stop()
        .clearQueue()
        .animate({scrollTop: $('#btn-fus-ro-dah').offset().top}, 1000, 'swing');
  }
}
function onYouTubePlayerReady(playerId) {
  $((!$.browser.webkit)?'html':'body').animate({scrollTop: 0}, 50000, 'swing');
  ytplayer = document.getElementById(playerId);
  ytplayer.addEventListener('onStateChange', 'fus_ro_dah_end');
  ytplayer.playVideo();

  $(ytplayer).css('top', $(window).height() + 'px')
  setTimeout(check_fus_ro_dah, 100);
}
function check_fus_ro_dah() {
  d = 67.5;
  ytplayer = document.getElementById('yt-fus-ro-dah');
  s = ytplayer.getCurrentTime();
  h = $(window).height();
  if (s &lt;= d - 10.0) {
    y = h - (h - 180) * s / (d - 10.0);
    // can't work with jQuery's animate
    $(ytplayer).css('top', y + 'px')
  }
  if (s &gt;= d) {
    $('#header')
      .effect('shake', {distance: 5, times: 4}, 125)
      .hide('explode', {pieces: 25}, 3000)
      .fadeIn()
      ;
  } else {
    setTimeout(check_fus_ro_dah, 100);
  }
}
$(function(){
  $('#btn-fus-ro-dah').click(fus_ro_dah);
});
&lt;/script&gt;&lt;p&gt;I also found some some nice &lt;a class="reference external" href="http://www.youtube.com/playlist?list=PLAC4E8B06A9D8CAFE"&gt;music covers&lt;/a&gt;:&lt;/p&gt;
&lt;iframe width="640" height="360" src="http://www.youtube.com/embed/videoseries?list=PLAC4E8B06A9D8CAFE&amp;amp;hl=en_US" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;p&gt;And the soundtrack:&lt;/p&gt;
&lt;object width="640" height="250" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="gsPlaylist669374811" name="gsPlaylist669374811"&gt;&lt;param name="movie" value="http://grooveshark.com/widget.swf" /&gt;&lt;param name="wmode" value="window" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="flashvars" value="hostname=cowbell.grooveshark.com&amp;playlistID=66937481&amp;bbg=000000&amp;bth=000000&amp;pfg=000000&amp;lfg=000000&amp;bt=FFFFFF&amp;pbg=FFFFFF&amp;pfgh=FFFFFF&amp;si=FFFFFF&amp;lbg=FFFFFF&amp;lfgh=FFFFFF&amp;sb=FFFFFF&amp;bfg=666666&amp;pbgh=666666&amp;lbgh=666666&amp;sbh=666666&amp;p=0" /&gt;&lt;object type="application/x-shockwave-flash" data="http://grooveshark.com/widget.swf" width="640" height="250"&gt;&lt;param name="wmode" value="window" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="flashvars" value="hostname=cowbell.grooveshark.com&amp;playlistID=66937481&amp;bbg=000000&amp;bth=000000&amp;pfg=000000&amp;lfg=000000&amp;bt=FFFFFF&amp;pbg=FFFFFF&amp;pfgh=FFFFFF&amp;si=FFFFFF&amp;lbg=FFFFFF&amp;lfgh=FFFFFF&amp;sb=FFFFFF&amp;bfg=666666&amp;pbgh=666666&amp;lbgh=666666&amp;sbh=666666&amp;p=0" /&gt;&lt;span&gt;&lt;a href="http://grooveshark.com/playlist/Skyrim/66937481" title="Skyrim by Yu-Jie Lin on Grooveshark"&gt;Skyrim by Yu-Jie Lin on Grooveshark&lt;/a&gt;&lt;/span&gt;&lt;/object&gt;&lt;/object&gt;&lt;p&gt;At some point, I really wanted to play it, but I don&amp;#8217;t think my computer can handle it and I would have to install Windows. That&amp;#8217;s a No-no. Actually, you can download the first two games, &lt;a class="reference external" href="http://www.elderscrolls.com/arena/"&gt;Arena&lt;/a&gt; and &lt;a class="reference external" href="http://www.elderscrolls.com/daggerfall/"&gt;Daggerfall&lt;/a&gt;, in the series on the website. They probably can be run in DOSBox, but it&amp;#8217;s not Skyrim.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-922805220038746930?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LVAPkCyezPpmUG-O1Jt0Bu5gWVs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LVAPkCyezPpmUG-O1Jt0Bu5gWVs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LVAPkCyezPpmUG-O1Jt0Bu5gWVs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LVAPkCyezPpmUG-O1Jt0Bu5gWVs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=Ii0PAtUnSUw:6_Prva0tBxM:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=Ii0PAtUnSUw:6_Prva0tBxM:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/Ii0PAtUnSUw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/922805220038746930/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/fus-ro-dah.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/922805220038746930?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/922805220038746930?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/Ii0PAtUnSUw/fus-ro-dah.html" title="Fus Ro Dah!" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/videoseries/default.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/fus-ro-dah.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4DR3s7fyp7ImA9WhRbE00.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-320667059253524558</id><published>2012-02-03T14:42:00.000-08:00</published><updated>2012-02-03T14:42:56.507-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-03T14:42:56.507-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="object" /><category scheme="http://www.blogger.com/atom/ns#" term="list" /><category scheme="http://www.blogger.com/atom/ns#" term="dict" /><category scheme="http://www.blogger.com/atom/ns#" term="traversing" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>Traversing Python object by key path</title><content type="html">&lt;p&gt;I am not the first one who tried to tackle this issue but I feel I need to write one on my own. To clearify what this is about, a simple example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;print o.attr1.key1&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Where &lt;tt class="docutils literal"&gt;o&lt;/tt&gt; is a normal object and &lt;tt class="docutils literal"&gt;o.attr1&lt;/tt&gt; is a &lt;tt class="docutils literal"&gt;dict&lt;/tt&gt;. You should see you cannot access dictionary item via attribute without adding code to your own dict class. I believe a better way, without touching other&amp;#8217;s code, is to do like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;print ot(o, 'attr1.key1')&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The goal is to have a unified syntax to access information deep inside of an object. To be honesty, I don&amp;#8217;t think it&amp;#8217;s often you will need to have such functionality, but when you sure do, you will want something to use right away.&lt;/p&gt;
&lt;p&gt;Here is my try (&lt;a class="reference external" href="https://gist.github.com/1733243"&gt;GitHub&lt;/a&gt;):&lt;/p&gt;
&lt;script src="https://gist.github.com/1733243.js?file=ot.py"&gt;&lt;/script&gt;&lt;p&gt;The output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
123
True
2
(1, 2, 3)
['number', 456, {'foo.bar': 'It is foobar!'}]
It is foobar!
s
r
&lt;/pre&gt;
&lt;p&gt;It might not look pretty or &lt;em&gt;magical&lt;/em&gt; but it works. Of course, you can wrapping class or object, make special class for inheriting, but often, you don&amp;#8217;t have easy way to change. They could be in library and you may need to do some dirty coding. This simple function can do the job well.&lt;/p&gt;
&lt;p&gt;You can supply your own key functions, they will be used in order. The key function returns found object or raise &lt;tt class="docutils literal"&gt;KeyError&lt;/tt&gt; if it cannot find a match. You can also use number as index for list object and dot &lt;tt class="docutils literal"&gt;.&lt;/tt&gt; for the key in dictionary, just remember to escape it. Also, you can even get a method and run it.&lt;/p&gt;
&lt;p&gt;If dictionary key is not string or number, then my code can not access to them.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-320667059253524558?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ah8GQ7Y6BL4AtcyCmCQUZBxOvD4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ah8GQ7Y6BL4AtcyCmCQUZBxOvD4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ah8GQ7Y6BL4AtcyCmCQUZBxOvD4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ah8GQ7Y6BL4AtcyCmCQUZBxOvD4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=RQW3p3gOS2A:l-xAzLMENaY:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=RQW3p3gOS2A:l-xAzLMENaY:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/RQW3p3gOS2A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/320667059253524558/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/traversing-python-object-by-key-path.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/320667059253524558?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/320667059253524558?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/RQW3p3gOS2A/traversing-python-object-by-key-path.html" title="Traversing Python object by key path" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/traversing-python-object-by-key-path.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8DQH49fSp7ImA9WhRbE00.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-7593420086012056053</id><published>2012-02-03T13:26:00.000-08:00</published><updated>2012-02-03T13:34:31.065-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-03T13:34:31.065-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="documentation" /><category scheme="http://www.blogger.com/atom/ns#" term="for loop" /><category scheme="http://www.blogger.com/atom/ns#" term="humor" /><category scheme="http://www.blogger.com/atom/ns#" term="LOL" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>I LOL'd at Python documentation</title><content type="html">Garsh, I feel I am too geeky or nerdy. How could I laugh out loud like that?&lt;br /&gt;
&lt;br /&gt;
I was looking &lt;i&gt;for&lt;/i&gt; &lt;code&gt;else&lt;/code&gt; in &lt;a href="http://docs.python.org/tutorial/controlflow.html#for-statements"&gt;&lt;code&gt;for&lt;/code&gt;&lt;/a&gt; loop. I can never be remembering when will &lt;code&gt;else&lt;/code&gt; clause gets executed, so I gotta check up every time. And this is the quote I just read (bold for emphasis):&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
The &lt;code&gt;for&lt;/code&gt; statement in Python differs a bit from what you may be used to in C or Pascal. blah blah blah in the order that they appear in the sequence. For example &lt;b&gt;(no pun intended)&lt;/b&gt;:&lt;/blockquote&gt;
&lt;br /&gt;
When I saw that bold text, I asked myself how on Earth an official programming language's documentation has that?&lt;br /&gt;
&lt;br /&gt;
And the important thing is I didn't get it first time, but I laughed like an idiot then.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-7593420086012056053?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/45nWGdJu_MRKV8YvVt3KXUcQvJ0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/45nWGdJu_MRKV8YvVt3KXUcQvJ0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/45nWGdJu_MRKV8YvVt3KXUcQvJ0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/45nWGdJu_MRKV8YvVt3KXUcQvJ0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=BYEDRoZMKhU:WQKA4dEJNvM:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=BYEDRoZMKhU:WQKA4dEJNvM:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/BYEDRoZMKhU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/7593420086012056053/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/i-lold-at-python-documentation.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/7593420086012056053?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/7593420086012056053?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/BYEDRoZMKhU/i-lold-at-python-documentation.html" title="I LOL'd at Python documentation" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/i-lold-at-python-documentation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEECSX8_cCp7ImA9WhRbEk8.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-5714580644184211724</id><published>2012-02-02T15:51:00.000-08:00</published><updated>2012-02-02T15:51:08.148-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-02T15:51:08.148-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="relative import" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><category scheme="http://www.blogger.com/atom/ns#" term="intra-package import" /><category scheme="http://www.blogger.com/atom/ns#" term="PEP 328" /><title>Python Intra-package import aka relative import</title><content type="html">&lt;p&gt;I only know &lt;a class="reference external" href="http://docs.python.org/tutorial/modules.html#intra-package-references"&gt;&lt;em&gt;Intra-package import&lt;/em&gt;&lt;/a&gt; for a few hours after reading someone&amp;#8217;s &lt;a class="reference external" href="https://github.com/nvie/times/blob/master/times/__init__.py"&gt;code&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from .version import VERSION&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;(By the way, the version.py is interesting. Wondering if there is any particular reason to put package version out of &lt;tt class="docutils literal"&gt;__init__.py&lt;/tt&gt;)&lt;/p&gt;
&lt;p&gt;This was first time I saw the syntax and I am pretty sure I never heard of &lt;em&gt;Intra-package import&lt;/em&gt; or relative import before. Alright, maybe once or twice. It&amp;#8217;s in the &lt;a class="reference external" href="http://docs.python.org/tutorial/modules.html#intra-package-references"&gt;Python documentation&lt;/a&gt;, but I never had a chance to read about &lt;tt class="docutils literal"&gt;import&lt;/tt&gt;. I started writing Python script before version 2.5 and never had a problem with importing, an excuse? Perhaps.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://www.python.org/dev/peps/pep-0328/#rationale-for-relative-imports"&gt;PEP 328&lt;/a&gt; lists some proposed syntax, though the final do not include them, but it worth reading. Also read &lt;a class="reference external" href="http://python.org/dev/peps/pep-0366/"&gt;PEP 366&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Basically, you prefix one dot to indicate relative import. One more dot, go up one level. Simply as that.&lt;/p&gt;
&lt;p&gt;In PEP 328, I found&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from ...package import bar
from ...sys import path&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;do not work, they go beyond the package. The Python documentation does not mention that, so I think it&amp;#8217;s not valid since it&amp;#8217;s not &lt;em&gt;intra&lt;/em&gt;-package.&lt;/p&gt;
&lt;p&gt;I think relative import is helpeful, because I used to write a code in a package like&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from package.subpackage import sibling_module&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;in a module. With this relative, it looks more clear:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from . import sibling_module&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;at least to me. Though the first one works well, but if you happen to be in need of change the package name, you know it will be some minutes task, depends on your shell scripting skill or how fast you can search-and-replace with your favorite editor.&lt;/p&gt;
&lt;p&gt;I also found one thing I didn&amp;#8217;t know before, you can &lt;tt class="docutils literal"&gt;from package import (module1, module2)&lt;/tt&gt;. Well, I don&amp;#8217;t know if anyone ever import with that syntax. The only reasonable way I can think of is to format like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from package import (
    mod1, mod2,
    mod3, mod4)&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Probably put modules into different lines for whatever reason.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-5714580644184211724?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_KFr6i5MVtmk5KQEkaXlZ6_5x28/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_KFr6i5MVtmk5KQEkaXlZ6_5x28/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_KFr6i5MVtmk5KQEkaXlZ6_5x28/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_KFr6i5MVtmk5KQEkaXlZ6_5x28/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=_OAjJ0ClH3I:1bp4shwmiaA:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=_OAjJ0ClH3I:1bp4shwmiaA:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/_OAjJ0ClH3I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/5714580644184211724/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/python-intra-package-import-aka.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/5714580644184211724?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/5714580644184211724?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/_OAjJ0ClH3I/python-intra-package-import-aka.html" title="Python Intra-package import aka relative import" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/python-intra-package-import-aka.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cDRX47eyp7ImA9WhRbEk0.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-5679356553858400656</id><published>2012-02-02T09:51:00.000-08:00</published><updated>2012-02-02T09:51:14.003-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-02T09:51:14.003-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="boolean" /><category scheme="http://www.blogger.com/atom/ns#" term="type conversion" /><category scheme="http://www.blogger.com/atom/ns#" term="coercion" /><category scheme="http://www.blogger.com/atom/ns#" term="primitive value" /><category scheme="http://www.blogger.com/atom/ns#" term="pitfall" /><title>Boolean in JavaScript</title><content type="html">&lt;p&gt;Boolean is interesting in JavaScript, well, if you haven&amp;#8217;t fallen into the pitfall.&lt;/p&gt;
&lt;p&gt;&lt;tt class="docutils literal"&gt;true&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;false&lt;/tt&gt;, and &lt;tt class="docutils literal"&gt;Boolean(something)&lt;/tt&gt; (returning either of first two) are the Boolean &lt;strong&gt;primitive values&lt;/strong&gt; and &lt;tt class="docutils literal"&gt;new Boolean(something)&lt;/tt&gt; is the Boolean &lt;strong&gt;object&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When someone writes with &lt;tt class="docutils literal"&gt;new Boolean()&lt;/tt&gt; in their JavaScript code and you don&amp;#8217;t see any bugs, s/he might be&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;lucky,&lt;/li&gt;
&lt;li&gt;having fantastic logic (kind way to say strange) in mind of coding, or&lt;/li&gt;
&lt;li&gt;smart or showing off or like having unnecessary code.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;For me, I have never seen any scenario which requires of using Boolean object. If you have seen it, please let me know, I would like to read the code.&lt;/p&gt;
&lt;p&gt;Here is a quick quiz for you, which ones get executed?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (true) ...;
if (Boolean(true)) ...;
if (Boolean("false")) ...;
if (new Boolean(false)) ...;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The answer is all of them. Take a quick look at &lt;a class="reference external" href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean"&gt;MDN&lt;/a&gt; and read &lt;tt class="docutils literal"&gt;ToBoolean&lt;/tt&gt; in ECMA-262.&lt;/p&gt;
&lt;p&gt;You should have no problems with first two. Non-empty string results &lt;tt class="docutils literal"&gt;true&lt;/tt&gt; and objects evaluates as &lt;tt class="docutils literal"&gt;true&lt;/tt&gt; in expression. If you get third one wrong, then you probably will get wrong with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if ('true' == true) ...;
// but not next one, and it's just lucky if you does get first one wrong.
if ('1' == 1) ...;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;First one is &lt;tt class="docutils literal"&gt;false&lt;/tt&gt;, second is &lt;tt class="docutils literal"&gt;true&lt;/tt&gt;. Only string and number will be converted automatically. (Hope I get this right :) This is a reason I don&amp;#8217;t like language with such &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Type_conversion"&gt;coercions&lt;/a&gt;, such as JavaScript or PHP, however I am not afraid of taking advantage of them. It&amp;#8217;s just sometimes your brain has gone AWOL and you ends up with buggy code and they usually don&amp;#8217;t expose at the moment of coding.&lt;/p&gt;
&lt;p&gt;Moreover, this could result the abuse of &lt;tt class="docutils literal"&gt;===&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;!==&lt;/tt&gt; usage. Either the coder is overcareful or s/he does not understand what type of the value is which just gets processed and assigned.&lt;/p&gt;
&lt;p&gt;So, if you insist of using Boolean object, don&amp;#8217;t forget the &lt;tt class="docutils literal"&gt;valueOf()&lt;/tt&gt; method for primitive values. But hey, really?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-5679356553858400656?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lGutkRh4Pbz97OOGiQsUCXh9jB0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lGutkRh4Pbz97OOGiQsUCXh9jB0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lGutkRh4Pbz97OOGiQsUCXh9jB0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lGutkRh4Pbz97OOGiQsUCXh9jB0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=g2KpgxW6iIY:POOESInDDts:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=g2KpgxW6iIY:POOESInDDts:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/g2KpgxW6iIY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/5679356553858400656/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/boolean-in-javascript.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/5679356553858400656?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/5679356553858400656?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/g2KpgxW6iIY/boolean-in-javascript.html" title="Boolean in JavaScript" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/boolean-in-javascript.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAFQHw4fCp7ImA9WhRbEk0.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-8429791290457413022</id><published>2012-02-02T08:38:00.000-08:00</published><updated>2012-02-02T08:38:31.234-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-02T08:38:31.234-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="gh-pages" /><category scheme="http://www.blogger.com/atom/ns#" term="VCS" /><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="github" /><category scheme="http://www.blogger.com/atom/ns#" term="branch" /><title>Pushing to GitHub Pages gh-pages branch from only local master branch</title><content type="html">If you have used GitHub, you must have already been familiar with &lt;code&gt;&lt;a href="http://pages.github.com/"&gt;gh-pages&lt;/a&gt;&lt;/code&gt; branch.&lt;br /&gt;
&lt;br /&gt;
I don't like have different code base from the pages branch, so in my projects, &lt;code&gt;master&lt;/code&gt; == &lt;code&gt;gh-pages&lt;/code&gt;, and many of projects are doing the same. If you have documents like library reference which is generated by source, then you probably will use different base.&lt;br /&gt;
&lt;br /&gt;
For a very long time, I had to do with these commands as follow in order to update that branch:&lt;br /&gt;
&lt;pre&gt;git checkout gh-pages
git pull . gh-pages
git push
git checkout master&lt;/pre&gt;
&lt;br /&gt;
It was just plain silly of me. I did google for it, but not RTFM, I didn't get any useful results, probably used wrong keywords. I finally found the correct answer with correct search keywords, here is the &lt;a href="http://blog.supermatter.com/post/761870270/git-push-a-local-branch-to-a-different-remote-branch"&gt;answer&lt;/a&gt;:&lt;br /&gt;
&lt;pre&gt;git push origin master:gh-pages&lt;/pre&gt;
&lt;br /&gt;
Here is from manpage git-push:&lt;br /&gt;
&lt;pre&gt;&amp;lt;refspec&amp;gt;...
    The format of a &amp;lt;refspec&amp;gt; parameter is an optional plus +, followed by the source ref &amp;lt;src&amp;gt;, followed by a colon :,
    followed by the destination ref &amp;lt;dst&amp;gt;. It is used to specify with what &amp;lt;src&amp;gt; object the &amp;lt;dst&amp;gt; ref in the remote
    repository is to be updated.
    [...]
    The &amp;lt;dst&amp;gt; tells which ref on the remote side is updated with this push. Arbitrary expressions cannot be used here, an
    actual ref must be named. If :&amp;lt;dst&amp;gt; is omitted, the same ref as &amp;lt;src&amp;gt; will be updated.&lt;/pre&gt;
&lt;br /&gt;
Well, it's all in the manual and I was actually using a shorthand by omitting the &amp;lt;dst&amp;gt;. It's good to know.&lt;br /&gt;
&lt;br /&gt;
So what if you try to omit &amp;lt;src&amp;gt; part? &lt;span style="font-size: xx-small;"&gt;&lt;i&gt;(I am glad I already know about this. Hehe, I am bad!)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;git push origin :remote-branch&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-8429791290457413022?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/b3Upi-c1GX9Vp7uIFxl8Pe7BYJ4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/b3Upi-c1GX9Vp7uIFxl8Pe7BYJ4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/b3Upi-c1GX9Vp7uIFxl8Pe7BYJ4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/b3Upi-c1GX9Vp7uIFxl8Pe7BYJ4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=74ylZCDz5M0:NIRjnzCoEB8:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=74ylZCDz5M0:NIRjnzCoEB8:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/74ylZCDz5M0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/8429791290457413022/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/02/pushing-to-github-pages-gh-pages-branch.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/8429791290457413022?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/8429791290457413022?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/74ylZCDz5M0/pushing-to-github-pages-gh-pages-branch.html" title="Pushing to GitHub Pages gh-pages branch from only local master branch" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/02/pushing-to-github-pages-gh-pages-branch.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMFSHs4cCp7ImA9WhRbEEk.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-6186217903704453245</id><published>2012-01-31T14:16:00.000-08:00</published><updated>2012-01-31T14:20:19.538-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-31T14:20:19.538-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="event" /><category scheme="http://www.blogger.com/atom/ns#" term="issue" /><category scheme="http://www.blogger.com/atom/ns#" term="Google Analytics" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="tracking" /><category scheme="http://www.blogger.com/atom/ns#" term="website" /><title>Using Google Analytics for website issue reporting</title><content type="html">I had this idea in the end of September 2010 when I was playing with &lt;a href="http://blog.yjl.im/2010/09/jquerify-google-analytics-tracking-code.html"&gt;Google Analytics' tracking code&lt;/a&gt;. I wrote some code for rating blog posts using the &lt;a href="http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html#Values"&gt;option value&lt;/a&gt;, the code did stay on my blog for a day or two before I took it down, it wasn't too useful for me. But a function allows visitor to report page issue could be very helpful if someone is willing to click on some buttons.&lt;br /&gt;
&lt;br /&gt;
I have finished a &lt;a href="https://gist.github.com/1713067"&gt;simple code&lt;/a&gt; and it's at bottom of this blog:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-q_SpmgcKiQc/TyhhQHQ10WI/AAAAAAAAC_o/7rUZqPcbbSk/s1600/2012-02-01--05:40:26.png" imageanchor="1"&gt;&lt;img border="0" class="no-autoresize" src="http://2.bp.blogspot.com/-q_SpmgcKiQc/TyhhQHQ10WI/AAAAAAAAC_o/7rUZqPcbbSk/s1600/2012-02-01--05:40:26.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Well, it doesn't look pretty. Here is the code in that HTML/JavaScript gadget:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script src="https://gist.github.com/raw/1713067/ga-wr.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
function init_page() {
  var gawr_options = {
    target: 'ga-wr',
    UA: 'UA-XXXXXXXX-X',
    report_options: [
      {
        title: 'Image is not loaded'
      },
      {
        title: 'Link is broken'
      },
      {
        title: 'Other'
      }
      ]
    };
  new GAWR(gawr_options);
}
$(init_page);
&amp;lt;/script&amp;gt;
&amp;lt;div id="ga-wr"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
For report of issues report, I can write my own program to get daily report using &lt;a href="http://blog.yjl.im/2011/02/generating-my-own-google-analytics.html"&gt;my current daily report&lt;/a&gt; as base. But I don't think I will trouble myself, not yet anyway. Right now, I can see the report with custom report in Google Analytics:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-hB0MYO3XN9g/TyhiWxUWkDI/AAAAAAAAC_w/XUpJApW_h8U/s1600/2012-02-01--05:50:43.png" imageanchor="1"&gt;&lt;img border="0" height="432" src="http://2.bp.blogspot.com/-hB0MYO3XN9g/TyhiWxUWkDI/AAAAAAAAC_w/XUpJApW_h8U/s640/2012-02-01--05:50:43.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
It works great for me for now. Note that, you need to use Alert/Total Events instead of Pageviews. It's event not page. The report does get updated very quick, probably a few minutes after reported. I will say that's instant almost.&lt;br /&gt;
&lt;br /&gt;
Now a little technical background of this script. Basically, you should use different profile. It will track page when a report is being submit and the report is recorded as &lt;a href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApiEventTracking.html"&gt;Event&lt;/a&gt;. Event action is the issue name and option label is the additional information as you seen in the image above.&lt;br /&gt;
&lt;br /&gt;
Option value can only accept integer, custom value probably can do the trick, but I put the data in option label. There is another way to record is to rewrite the page URL when tracking the page, but I don't like that. But this could be a benefit, rewriting url to be &lt;code&gt;/original-page-url/issue&lt;/code&gt; and still send the event. This way, if you watch Real-time tab, you can see there is a report just comes in if you don't use separate profile.&lt;br /&gt;
&lt;br /&gt;
And remember when visitor reports, page URL is recorded by page tracking, also user's browser and system and everything Google Analytics collects by default is already in the data. Isn't this awesome and brilliant? I don't even need to code for collecting such data if I need to check visitor's browser, they are just there for me to read.&lt;br /&gt;
&lt;br /&gt;
Google Analytics API can do more than just website access statistics, you can set up a poll or some thing more. Imagine you let people to vote and you use visitors metric or something to prevent some degree of voting spam.&lt;br /&gt;
&lt;br /&gt;
Only the data isn't public without coding and they require process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-6186217903704453245?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ELb5493MGaZMzD0M-iJaUYGioio/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ELb5493MGaZMzD0M-iJaUYGioio/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ELb5493MGaZMzD0M-iJaUYGioio/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ELb5493MGaZMzD0M-iJaUYGioio/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=jFTdDZC6Pjw:xn1TzNCOSe4:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=jFTdDZC6Pjw:xn1TzNCOSe4:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/jFTdDZC6Pjw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/6186217903704453245/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/using-google-analytics-for-website.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/6186217903704453245?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/6186217903704453245?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/jFTdDZC6Pjw/using-google-analytics-for-website.html" title="Using Google Analytics for website issue reporting" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-q_SpmgcKiQc/TyhhQHQ10WI/AAAAAAAAC_o/7rUZqPcbbSk/s72-c/2012-02-01--05:40:26.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/using-google-analytics-for-website.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EAR3s4cCp7ImA9WhRbEE8.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-8871436641751967702</id><published>2012-01-31T06:54:00.000-08:00</published><updated>2012-01-31T06:54:06.538-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-31T06:54:06.538-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wrapper" /><category scheme="http://www.blogger.com/atom/ns#" term="import" /><category scheme="http://www.blogger.com/atom/ns#" term="attribute" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><category scheme="http://www.blogger.com/atom/ns#" term="module" /><title>Importing arbitrary non-existing module attribute in Python</title><content type="html">&lt;p&gt;I think I need to explain the title, not really sure how accurately title this post. Here it is a quick code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from my_module import foobar&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Where &lt;tt class="docutils literal"&gt;foobar&lt;/tt&gt; is not defined in &lt;tt class="docutils literal"&gt;my_module&lt;/tt&gt; module, but the code will not raise &lt;tt class="docutils literal"&gt;ImportError&lt;/tt&gt;. So, it&amp;#8217;s a module whose attributes can be imported and which does not exist within it.&lt;/p&gt;
&lt;p&gt;I did not get this idea on my own and I don&amp;#8217;t know who firstly got this interesting idea. I saw this in a project called &lt;a class="reference external" href="https://github.com/amoffat/pbs"&gt;pbs&lt;/a&gt;, a &lt;cite&gt;Python subprocess wrapper&lt;/cite&gt;. (How abbreviated as &lt;cite&gt;pbs&lt;/cite&gt;?) It is written by &lt;em&gt;Andrew Moffat&lt;/em&gt; and licensed under the MIT License.&lt;/p&gt;
&lt;p&gt;To be honest, I am not interested in what this project can do, I don&amp;#8217;t feel writing Python script for easy command-line access would be more productive or easier than scripting in shell script. But that&amp;#8217;s not the point of this post and that code has many to learn from even I don&amp;#8217;t use.&lt;/p&gt;
&lt;p&gt;I found this project via &lt;a class="reference external" href="https://github.com/explore"&gt;GitHub Explore&lt;/a&gt;, the part of being able to import any commands caught my eyes and I was thinking: &lt;cite&gt;this only main code pbs.py must be hell long like traffic in &amp;lt;INSERT YOUR CITY&amp;gt;.&lt;/cite&gt; When I clicked in, it had only around 450 lines and most of them were comments. So, I took a close look at it.&lt;/p&gt;
&lt;p&gt;To strip it down, it could be just like (for Python 3.x and 2.x)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#############
# main script
#############

from my_module import attr1
print('Value of attr1: %s' % attr1)
print('')

from my_module import attr2
print('Value of attr2: %s' % attr2)

##############
# my_module.py
##############

import sys

attr1 = 123

class SelfWrapper(object):

  def __init__(self, self_module):

    self.self_module = self_module

  def __getattr__(self, name):

    print('%s is being imported:' % name)
    if hasattr(self.self_module, name):
      print('  found in self_module')
      return getattr(self.self_module, name)
    elif name.startswith('__'):
      print('  starts with __ and not found, raising AttributeError')
      raise AttributeError
    print('  returns a generated string')
    return 'automatically generated ' + name

sys.modules[__name__] = SelfWrapper(sys.modules[__name__])&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Where &lt;tt class="docutils literal"&gt;attr1&lt;/tt&gt; is defined, but &lt;tt class="docutils literal"&gt;attr2&lt;/tt&gt; is not. The output is&lt;/p&gt;
&lt;pre class="no-collapse literal-block"&gt;
__path__ is being imported:
  starts with __ and not found, raising AttributeError
attr1 is being imported:
  found in self_module
Value of attr1: 123

__path__ is being imported:
  starts with __ and not found, raising AttributeError
attr2 is being imported:
  returns a generated string
Value of attr2: automatically generated attr2
&lt;/pre&gt;
&lt;p&gt;If you don&amp;#8217;t check for &lt;tt class="docutils literal"&gt;__xyz__&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;__path__&lt;/tt&gt; in this case, &lt;tt class="docutils literal"&gt;__getattr__&lt;/tt&gt; will be invoked twice for &lt;tt class="docutils literal"&gt;attr1&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;attr2&lt;/tt&gt;. I can not answer the behind scene of module import for this &lt;tt class="docutils literal"&gt;__path__&lt;/tt&gt; part, feel free to educate me in comments.&lt;/p&gt;
&lt;p&gt;The project is great for this idea, however I would say it&amp;#8217;s fancy but not really necessary. I see no much trouble of using like &lt;tt class="docutils literal"&gt;Cmd.curl&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;Cmd.wget&lt;/tt&gt;, etc. But it&amp;#8217;s awesome to use &lt;tt class="docutils literal"&gt;import&lt;/tt&gt; like that. &lt;cite&gt;Cool&lt;/cite&gt;, right?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-8871436641751967702?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/54dwCV7P0GT3Gbz_SYFIgnnqEJo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/54dwCV7P0GT3Gbz_SYFIgnnqEJo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/54dwCV7P0GT3Gbz_SYFIgnnqEJo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/54dwCV7P0GT3Gbz_SYFIgnnqEJo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=gIF2qXJN3Z8:D_7jSy_tD5k:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=gIF2qXJN3Z8:D_7jSy_tD5k:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/gIF2qXJN3Z8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/8871436641751967702/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/importing-arbitrary-non-existing-module.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/8871436641751967702?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/8871436641751967702?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/gIF2qXJN3Z8/importing-arbitrary-non-existing-module.html" title="Importing arbitrary non-existing module attribute in Python" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/importing-arbitrary-non-existing-module.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcNRHk6eyp7ImA9WhRUGU4.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-4023757205069471812</id><published>2012-01-30T07:08:00.000-08:00</published><updated>2012-01-30T07:08:15.713-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T07:08:15.713-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="developer tools" /><category scheme="http://www.blogger.com/atom/ns#" term="IE8" /><category scheme="http://www.blogger.com/atom/ns#" term="Internet Explorer" /><category scheme="http://www.blogger.com/atom/ns#" term="IE9" /><category scheme="http://www.blogger.com/atom/ns#" term="debugging" /><category scheme="http://www.blogger.com/atom/ns#" term="date" /><title>Date.now in IE8 or before IE9</title><content type="html">This is the second time I tried to make my stuff work in IE. Too make it clear first, it's &lt;a href="https://github.com/joho/7XX-rfc"&gt;Code 735&lt;/a&gt;. IE always has to be &lt;i&gt;different&lt;/i&gt; and &lt;i&gt;unique&lt;/i&gt; from other major browsers if you put it in a way with utter kindness. (You have to be saint to think IE in that way)&lt;br /&gt;
&lt;br /&gt;
Okay, long story short:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Date.now()&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
will not work because &lt;a href="http://msdn.microsoft.com/en-us/library/ff679974%28v=vs.94%29.aspx"&gt;Date.now is undefined before IE9&lt;/a&gt;, it means it is not supported. (735!) A quick workaround is&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;// For IE8 and earlier version.
if (!Date.now) {
  Date.now = function() {
    return new Date().valueOf();
  }
}&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
You always have to give IE some special care while other browsers mostly can work with same code and render same output. 735! I don't know if &lt;code&gt;Date.now&lt;/code&gt; is in ECMA standard or not, but IE likes non-standard and enjoying creating some stuff on its own I would say.&lt;br /&gt;
&lt;br /&gt;
Another thing I have to mention here is the IE8 Developer Tools (I only have Windows XP, don't know about IE9). Since this is my second time of using, therefore exactly same issue I have still here. It always gives me not too accurate debug info, as the case above, it broke in jQuery code as IE told me. I had to manually set up breakpoints, so I finally found out the problematic code is with Date object. 735, again!&lt;br /&gt;
&lt;br /&gt;
Oh, wait! There is one more thing, where can I &lt;a href="http://stackoverflow.com/questions/1461057/change-ie8-developer-tool-font"&gt;change the fonts for Developer Tools&lt;/a&gt;? Variable-width font, really? Who a developer is gonna code in that kind of font? Hold on, I have seen someone coding PHP in that. Pheww... that's probably why I am not a fan of PHP, just kidding.&lt;br /&gt;
&lt;br /&gt;
Maybe there is a &lt;code&gt;&amp;lt;!--[if IEDEVTOOL]&amp;gt;&lt;/code&gt; or CSS hack for Developer Tools?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-4023757205069471812?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_THs2tZLQLmYJDqT40Py53zTTSQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_THs2tZLQLmYJDqT40Py53zTTSQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_THs2tZLQLmYJDqT40Py53zTTSQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_THs2tZLQLmYJDqT40Py53zTTSQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=c53DtKqVmdw:BqQJjryAww8:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=c53DtKqVmdw:BqQJjryAww8:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/c53DtKqVmdw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/4023757205069471812/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/datenow-in-ie8-or-before-ie9.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/4023757205069471812?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/4023757205069471812?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/c53DtKqVmdw/datenow-in-ie8-or-before-ie9.html" title="Date.now in IE8 or before IE9" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/datenow-in-ie8-or-before-ie9.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYGQHk5eSp7ImA9WhRUGEs.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-2233236742849415707</id><published>2012-01-29T10:35:00.000-08:00</published><updated>2012-01-29T10:35:21.721-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-29T10:35:21.721-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="indicator" /><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitch.tv" /><category scheme="http://www.blogger.com/atom/ns#" term="ON AIR" /><category scheme="http://www.blogger.com/atom/ns#" term="Justin.tv" /><title>ON AIR light for Justin.tv</title><content type="html">Just made this ON AIR light for Justin.tv/Twitch.tv streamers. I don't stream, so this is probably no use for me.&lt;br /&gt;
&lt;br /&gt;


&lt;script src="https://raw.github.com/gist/1699883/jtv-onair.js"&gt;
&lt;/script&gt;
&lt;style&gt;
@import url(ttp://fonts.googleapis.com/css?family=Ruda:900);

.JTVOnAir {
  background-color: #000;
  color: #800;
  border: 0.125ex solid #222;
  font-family: Ruda, sans-serif;
  font-weight: 900;
  line-height: 1em;
  height: 1em;
  padding: 0 0.25ex;
  cursor: pointer;
  vertical-align: middle;
}

.JTVOnAir.live {
  color: #F00;
  text-shadow: 0 0 0.125ex #F00;
}

#jtv-onair-test {
  background-color: gray;
  text-align: center;
  padding: 1em;
}
.target {
  font-size: 24px;
}
&lt;/style&gt;
&lt;script&gt;
$(function(){
  $.getJSON('http://api.justin.tv/api/stream/list.json?jsonp=?&amp;limit=1', function(data) {
    new JTVOnAir('target-on', data[0].channel.login);
    new JTVOnAir('target-off', 'blahblahblah-xyz-foobar');
  });
});
&lt;/script&gt;
&lt;br /&gt;
&lt;div id="jtv-onair-test"&gt;
&lt;span class="target" id="target-on"&gt;&lt;/span&gt;
  &lt;span class="target" id="target-off"&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
The one on the left is the currently most popular live channel, retrieved via API. The one on the right is a channel does not exist.&lt;br /&gt;
&lt;br /&gt;
I put the &lt;a href="https://gist.github.com/1699883"&gt;code on Gist&lt;/a&gt;. If you want to put this on your website with or without modification (more visible view count, thumbnail, etc.), you may send me an email (see About page) with your channel and website URLs if you don't know how to do. (Do not post your channel in comments, I will consider it's a spam).&lt;br /&gt;
&lt;br /&gt;
This should be easy to extend to cover other streaming service providers. If you use other than JTV, shoot me an email, I may be able to help as long as there is API to use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-2233236742849415707?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Jfr4FRFG68ik5-o1KjilJ74oBrU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Jfr4FRFG68ik5-o1KjilJ74oBrU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Jfr4FRFG68ik5-o1KjilJ74oBrU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Jfr4FRFG68ik5-o1KjilJ74oBrU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=dyLSB0c_N94:YkUWFH11EVg:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=dyLSB0c_N94:YkUWFH11EVg:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/dyLSB0c_N94" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/2233236742849415707/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/on-air-light-for-justintv.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/2233236742849415707?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/2233236742849415707?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/dyLSB0c_N94/on-air-light-for-justintv.html" title="ON AIR light for Justin.tv" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/on-air-light-for-justintv.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MCQXw5fyp7ImA9WhRUF0s.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-7058878569328831722</id><published>2012-01-28T07:44:00.000-08:00</published><updated>2012-01-28T07:44:20.227-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-28T07:44:20.227-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="type" /><category scheme="http://www.blogger.com/atom/ns#" term="file" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="locate" /><category scheme="http://www.blogger.com/atom/ns#" term="command" /><category scheme="http://www.blogger.com/atom/ns#" term="CLI" /><title>type, then file, or just file type?</title><content type="html">I used to run the following commands to find out if a command exists (besides using Bash auto-completion if it's executable in PATH) and what kind of the command is:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ type which
which is /usr/bin/which
$ file /usr/bin/which
/usr/bin/which: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped&lt;/pre&gt;
&lt;br /&gt;
And I am not kidding you, I manually typed &lt;code&gt;/usr/bin/which&lt;/code&gt; in the second command to find out the file type. &lt;code&gt;file&lt;/code&gt; requires a full path. I feel little embarrassed. :) But, it's nothing wrong with it.&lt;br /&gt;
&lt;br /&gt;
However, the better ways can be:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ file `type -p which`
$ file `which which`&lt;/pre&gt;
&lt;br /&gt;
Note that &lt;code&gt;type&lt;/code&gt; is a Bash shell builtin command (can differ from your environment), &lt;code&gt;which&lt;/code&gt; is a normal program. You can also use &lt;code&gt;locate&lt;/code&gt; for &lt;code&gt;file&lt;/code&gt;'d a list of matched files if you only have partial filename. All three commands can accept a number of filenames.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-7058878569328831722?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/puWJ9V1_jyaMLt763lKW12FEt2E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/puWJ9V1_jyaMLt763lKW12FEt2E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/puWJ9V1_jyaMLt763lKW12FEt2E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/puWJ9V1_jyaMLt763lKW12FEt2E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=SPqFV58ZJyU:jJrKW_6KdyE:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=SPqFV58ZJyU:jJrKW_6KdyE:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/SPqFV58ZJyU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/7058878569328831722/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/type-then-file-or-just-file-type.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/7058878569328831722?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/7058878569328831722?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/SPqFV58ZJyU/type-then-file-or-just-file-type.html" title="type, then file, or just file type?" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/type-then-file-or-just-file-type.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUBQ346fip7ImA9WhRUFkU.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-989480066147743444</id><published>2012-01-27T08:04:00.000-08:00</published><updated>2012-01-27T08:04:12.016-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-27T08:04:12.016-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="fadeout" /><category scheme="http://www.blogger.com/atom/ns#" term="fading" /><category scheme="http://www.blogger.com/atom/ns#" term="text" /><category scheme="http://www.blogger.com/atom/ns#" term="CSS" /><category scheme="http://www.blogger.com/atom/ns#" term="effect" /><category scheme="http://www.blogger.com/atom/ns#" term="gradient" /><title>Bottom text fadeout with solid background color using CSS</title><content type="html">&lt;p&gt;I was making a &lt;a class="reference external" href="http://livibetter.github.com//ffrc-kittycam-ce/kittyoverflow.html"&gt;webpage&lt;/a&gt; and wanted to make bottom of a text fade, which is a small portion of a long text. It should indicate perfectly that there is more text as if saying &lt;em&gt;&amp;#8220;click to read more.&amp;#8221;&lt;/em&gt;&lt;/p&gt;&lt;style&gt;
.fade-text-container {
  color: #aaa;
  background-color: #333;
  border-radius: 0.5em;
  padding: 0.5em;
}

.fade-text-container,
.text-container {
  line-height: 1.5em;
  width: 320px;
  /* 10 lines =&gt; 1.5em * 10 = 15em ***/
  height: 15em;
  overflow: hidden;
}

.fadeout {
  position: relative;
  /* 3 lines =&gt; 1.5em * 3 = 4.5em ***/
  height: 4.5em;
  top: -4.5em;
  background: -webkit-linear-gradient(
    rgba(51, 51, 51, 0) 0%,
    rgba(51, 51, 51, 1) 100%
    );
  background: -moz-linear-gradient(
    rgba(51, 51, 51, 0) 0%,
    rgba(51, 51, 51, 1) 100%
    );
  background: linear-gradient(
    rgba(51, 51, 51, 0) 0%,
    rgba(51, 51, 51, 1) 100%
    );
  z-index: 1;
}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="fade-text-container"&gt;  &lt;div class="text-container"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam dui nunc, tempus vel ullamcorper ac, aliquet iaculis purus. Donec fermentum ipsum nec odio convallis et venenatis felis bibendum. Proin sed quam massa. Ut nibh mauris, tempor eget suscipit nec, tempus ac lectus. Proin sed augue ante, in fringilla nunc. Proin adipiscing orci molestie mi vehicula viverra. Aliquam erat volutpat. Proin tortor leo, tempor quis luctus vitae, pharetra non quam. Mauris et nisl sit amet arcu pharetra tempus in vel enim. Vestibulum lacinia porttitor sodales.&lt;/div&gt;  &lt;div class="fadeout"&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;style&amp;gt;
.fade-text-container {
  color: #aaa;
  background-color: #333;
  border-radius: 0.5em;
  padding: 0.5em;
}

.fade-text-container,
.text-container {
  line-height: 1.5em;
  width: 320px;
  /* 10 lines =&amp;gt; 1.5em * 10 = 15em ***/
  height: 15em;
  overflow: hidden;
}

.fadeout {
  position: relative;
  /* 3 lines =&amp;gt; 1.5em * 3 = 4.5em ***/
  height: 4.5em;
  top: -4.5em;
  background: -webkit-linear-gradient(
    rgba(51, 51, 51, 0) 0%,
    rgba(51, 51, 51, 1) 100%
    );
  background: -moz-linear-gradient(
    rgba(51, 51, 51, 0) 0%,
    rgba(51, 51, 51, 1) 100%
    );
  background: linear-gradient(
    rgba(51, 51, 51, 0) 0%,
    rgba(51, 51, 51, 1) 100%
    );
  z-index: 1;
}
&amp;lt;/style&amp;gt;

&amp;lt;div class="fade-text-container"&amp;gt;
  &amp;lt;div class="text-container"&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam dui nunc, tempus vel ullamcorper ac, aliquet iaculis purus. Donec fermentum ipsum nec odio convallis et venenatis felis bibendum. Proin sed quam massa. Ut nibh mauris, tempor eget suscipit nec, tempus ac lectus. Proin sed augue ante, in fringilla nunc. Proin adipiscing orci molestie mi vehicula viverra. Aliquam erat volutpat. Proin tortor leo, tempor quis luctus vitae, pharetra non quam. Mauris et nisl sit amet arcu pharetra tempus in vel enim. Vestibulum lacinia porttitor sodales.&amp;lt;/div&amp;gt;
  &amp;lt;div class="fadeout"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It&amp;#8217;s two-level container, top one &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;.fade-text-container&lt;/span&gt;&lt;/tt&gt; contains the text &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;.text-container&lt;/span&gt;&lt;/tt&gt; and the fadeout effect &lt;tt class="docutils literal"&gt;.fadeout&lt;/tt&gt;. Because the need of calucating the position of &lt;tt class="docutils literal"&gt;.fadeout&lt;/tt&gt;, so I made two-level and so &lt;tt class="docutils literal"&gt;.fadeout&lt;/tt&gt; can be placed at exactly at bottom of text. Using this method, I can set how many exactly lines I want to fade out.&lt;/p&gt;&lt;p&gt;There is one issue I am aware of, because &lt;tt class="docutils literal"&gt;.fadeout&lt;/tt&gt; is on top of text, therefore the text under it can not be selected. It shouldn&amp;#8217;t be a big issue, because normally you want visitor actually to click and to go to another page. You can set up a click event on &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;.fade-text-container&lt;/span&gt;&lt;/tt&gt; and redirect user to other page.&lt;/p&gt;&lt;p&gt;This method only works with background is solid color.&lt;/p&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-989480066147743444?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/J2GI5v8sEs2hZJhXp1hVZiiMRYA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J2GI5v8sEs2hZJhXp1hVZiiMRYA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/J2GI5v8sEs2hZJhXp1hVZiiMRYA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J2GI5v8sEs2hZJhXp1hVZiiMRYA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=Q8i_mWUixU0:xLsPl7SN5Uo:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=Q8i_mWUixU0:xLsPl7SN5Uo:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/Q8i_mWUixU0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/989480066147743444/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/bottom-text-fadeout-with-solid.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/989480066147743444?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/989480066147743444?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/Q8i_mWUixU0/bottom-text-fadeout-with-solid.html" title="Bottom text fadeout with solid background color using CSS" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/bottom-text-fadeout-with-solid.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYGSHw_eyp7ImA9WhRUFUQ.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-1676161211929250002</id><published>2012-01-26T08:42:00.000-08:00</published><updated>2012-01-26T08:42:09.243-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-26T08:42:09.243-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="JSON" /><category scheme="http://www.blogger.com/atom/ns#" term="filter" /><category scheme="http://www.blogger.com/atom/ns#" term="link" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title>Filtering links in Blogger/YouTube/etc API JSON</title><content type="html">&lt;br /&gt;
If you have used Google/Blogger/YouTube/etc API with JSON format, you may have seen the &lt;tt class="docutils literal"&gt;link&lt;/tt&gt; array like&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code class="javascript"&gt;entry =
{
&amp;nbsp; "link":
&amp;nbsp;&amp;nbsp;&amp;nbsp; [
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "rel":&amp;nbsp;&amp;nbsp; "replies",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":&amp;nbsp; "application/atom+xml",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "href":&amp;nbsp; "http://example.com/link1",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": "Post Comments"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "rel":&amp;nbsp;&amp;nbsp; "replies",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":&amp;nbsp; "text/html",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "href":&amp;nbsp; "http://example.com/link2",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": "Comments"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "rel":&amp;nbsp;&amp;nbsp; "edit",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":&amp;nbsp; "application/atom+xml",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "href":&amp;nbsp; "http://example.com/link3",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "rel":&amp;nbsp;&amp;nbsp; "self",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":&amp;nbsp; "application/atom+xml",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "href":&amp;nbsp; "http://example.com/link4",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "rel":&amp;nbsp;&amp;nbsp; "alternate",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":&amp;nbsp; "text/html",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "href":&amp;nbsp; "http://example.com/link5",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": "Example Title"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; ]
}&lt;/code&gt;&lt;/pre&gt;
Usually, you want the one which type is &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt; and a link to normal webpage. I used to write a &lt;tt class="docutils literal"&gt;for&lt;/tt&gt; loop, every time I need to get that one. I do mean every time, who knows how much time I wasted in writing the same loop code.&lt;br /&gt;
&lt;br /&gt;
I finally came up a quick and better way using jQuery:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;var link = $($.grep(entry.link, function(link, idx) {return link.rel == 'alternate'})).prop('href');
// breakdown
var link = $(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $.grep(entry.link,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function(link, idx) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return link.rel == 'alternate'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; })
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ).prop('href');&lt;/code&gt;&lt;/pre&gt;
Even its reasonably little longer one-liner, its much more clear than a &lt;tt class="docutils literal"&gt;for&lt;/tt&gt; loop, and could be same clear for who is not familiar with jQuery. The only drawback I could think of is: it could be slower than &lt;tt class="docutils literal"&gt;for&lt;/tt&gt; loop, though I haven’t tested.&lt;br /&gt;
&lt;br /&gt;
jQuery accepts objects not just DOM, you can have some methods though you don’t have selector-like to filter, but in this case, &lt;tt class="docutils literal"&gt;$.grep&lt;/tt&gt; is good enough for processing. The result will be an array of objects and I use &lt;tt class="docutils literal"&gt;prop()&lt;/tt&gt; to extract the &lt;cite&gt;href&lt;/cite&gt; attribute after the results are turned into jQuery object.&lt;br /&gt;
&lt;br /&gt;
Certainly, you can use just &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;match_results[0].href&lt;/span&gt;&lt;/tt&gt;, directly access object’s &lt;tt class="docutils literal"&gt;href&lt;/tt&gt; attribute. But you can not guarantee that &lt;tt class="docutils literal"&gt;match_results&lt;/tt&gt; is not an empty array. If it is, you will get a Type Error, because your code tries to get &lt;tt class="docutils literal"&gt;undefined.href&lt;/tt&gt;.&lt;br /&gt;
&lt;br /&gt;
Using &lt;tt class="docutils literal"&gt;prop()&lt;/tt&gt;, it will fail silently by returning &lt;tt class="docutils literal"&gt;undefined&lt;/tt&gt; and you can check it or just leave it in &lt;tt class="docutils literal"&gt;&amp;lt;a/&amp;gt;&lt;/tt&gt; if you don’t care.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-1676161211929250002?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lZU5ifRPVNLOY7a3gZxcYL0jYDM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lZU5ifRPVNLOY7a3gZxcYL0jYDM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lZU5ifRPVNLOY7a3gZxcYL0jYDM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lZU5ifRPVNLOY7a3gZxcYL0jYDM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=-OUDcfArYY8:JmTftcM1En4:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=-OUDcfArYY8:JmTftcM1En4:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/-OUDcfArYY8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/1676161211929250002/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/filtering-links-in-bloggeryoutubeetc.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/1676161211929250002?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/1676161211929250002?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/-OUDcfArYY8/filtering-links-in-bloggeryoutubeetc.html" title="Filtering links in Blogger/YouTube/etc API JSON" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/filtering-links-in-bloggeryoutubeetc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQFSHw6fCp7ImA9WhRUFE8.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-6884553803557061699</id><published>2012-01-24T08:41:00.000-08:00</published><updated>2012-01-24T08:41:59.214-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-24T08:41:59.214-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="shell scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="template" /><category scheme="http://www.blogger.com/atom/ns#" term="skeleton" /><category scheme="http://www.blogger.com/atom/ns#" term="boilerplate" /><category scheme="http://www.blogger.com/atom/ns#" term="template.sh" /><category scheme="http://www.blogger.com/atom/ns#" term="Bash" /><title>My Bash script template</title><content type="html">A few days ago, I read &lt;a href="http://linuxtidbits.wordpress.com/2012/01/20/bash-script-templates/"&gt;Bash Script Templates&lt;/a&gt; and I think this might be a good idea to start one of my own. I later found &lt;a href="http://blog.bigsmoke.us/2011/01/05/bash-script-template"&gt;two&lt;/a&gt; &lt;a href="http://bashify.com/?Scripts_%26amp%3B_Tools:Script_Skeleton"&gt;more&lt;/a&gt; posts about it, it's not easy to find one. Either search engine was playing with me or I was too dumb to enter perfect search terms.&lt;br /&gt;
&lt;br /&gt;
I read them and got some concepts from all three of them. Some I like, some I don't. I mingled them altogether with my own thoughts. I created a new repository: &lt;a href="https://github.com/livibetter/template.sh"&gt;template.sh&lt;/a&gt;, it could be a good idea for it to have own repo, so you may contribute to it easily.&lt;br /&gt;
&lt;br /&gt;
It's still a work-in-progress, but it already has 177 lines (159 sloc) for &lt;a href="https://github.com/livibetter/template.sh/blob/af090bf29e991b7c75d65aa53e123a02f2bbb1db/template.sh"&gt;first version&lt;/a&gt;. I have been thinking that a library could be a better idea, especially when I was writing the &lt;code&gt;parse_options&lt;/code&gt; function. It could be working like argument parsing in C or in Python with their libraries, and the code would be more clean.&lt;br /&gt;
&lt;br /&gt;
I had also thought of creating user interface, you can click buttons or be asked questions to enable/disable features, then a template will be generated. But that's a lot of works, not sure if that's worth. I didn't go that way eventually, but a simple file.&lt;br /&gt;
&lt;br /&gt;
Please be aware that I haven't used it yet, so I don't really know if it's practical enough. If you run into trouble, please open an issue. Any feedback is welcome, leave a comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-6884553803557061699?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Gn3oziQWDUIsX-wVOWtEgHeN9V0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Gn3oziQWDUIsX-wVOWtEgHeN9V0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Gn3oziQWDUIsX-wVOWtEgHeN9V0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Gn3oziQWDUIsX-wVOWtEgHeN9V0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=X8kf0mvSgBA:3Hm4JJ26NHU:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=X8kf0mvSgBA:3Hm4JJ26NHU:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/X8kf0mvSgBA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/6884553803557061699/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/my-bash-script-template.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/6884553803557061699?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/6884553803557061699?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/X8kf0mvSgBA/my-bash-script-template.html" title="My Bash script template" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/my-bash-script-template.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUMSXw5fyp7ImA9WhRUE0k.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-7569808048011026514</id><published>2012-01-23T10:11:00.000-08:00</published><updated>2012-01-23T10:11:28.227-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-23T10:11:28.227-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="arithmetic evaluation" /><category scheme="http://www.blogger.com/atom/ns#" term="shell scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="builtin" /><category scheme="http://www.blogger.com/atom/ns#" term="arithmetic expansion" /><category scheme="http://www.blogger.com/atom/ns#" term="return value" /><category scheme="http://www.blogger.com/atom/ns#" term="Bash" /><title>Arithmetic Expansion and colon builtin command in Bash</title><content type="html">I just did a system update and got configuration diffs like&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;-               i=$(($i + 1))
+               : $(( i += 1 ))&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
If you don't know &lt;code&gt;:&lt;/code&gt; builtin yet, read first entry of "SHELL BUILTIN COMMANDS." I have been using it quite often with infinite while loop, e.g.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;while :; do
  do_something
done&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
I never thought of putting something behind it, and that diff is quite genius in my opinion. However I will just write&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="bash"&gt;&lt;code&gt;(( i++ ))&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
I don't see there is a reason for using Arithmetic Expansion, Evaluation is enough and clear. Expansion will returns the expanded string, which cause command execution if you don't prefix with &lt;code&gt;:&lt;/code&gt;, and you will get "command not found" error.&lt;br /&gt;
&lt;br /&gt;
There is a good use of &lt;code&gt;:&lt;/code&gt;, putting it after last command of a function or last command of a script, if they have chances to return non-zero and you do not care if that command runs into problem. This way it will clear out the returned value.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-7569808048011026514?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Wn4jH_IjE8UYl03OkPtWZ2zkcFg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Wn4jH_IjE8UYl03OkPtWZ2zkcFg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Wn4jH_IjE8UYl03OkPtWZ2zkcFg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Wn4jH_IjE8UYl03OkPtWZ2zkcFg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=eEHH20vwJvU:8RDjAVAZUqM:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=eEHH20vwJvU:8RDjAVAZUqM:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/eEHH20vwJvU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/7569808048011026514/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/arithmetic-expansion-and-colon-builtin.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/7569808048011026514?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/7569808048011026514?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/eEHH20vwJvU/arithmetic-expansion-and-colon-builtin.html" title="Arithmetic Expansion and colon builtin command in Bash" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/arithmetic-expansion-and-colon-builtin.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YARnYzfSp7ImA9WhRUE04.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-1829031064169320095</id><published>2012-01-23T07:05:00.000-08:00</published><updated>2012-01-23T07:05:47.885-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-23T07:05:47.885-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="shell scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="log.sh" /><category scheme="http://www.blogger.com/atom/ns#" term="library" /><category scheme="http://www.blogger.com/atom/ns#" term="logging" /><category scheme="http://www.blogger.com/atom/ns#" term="Bash" /><title>log.sh - Bash logging library</title><content type="html">As I mentioned in previous post about &lt;a href="http://blog.yjl.im/2012/01/printing-out-call-stack-in-bash.html"&gt;Call Stack&lt;/a&gt;, the thing is ready on GitHub, &lt;a href="https://github.com/livibetter/log.sh"&gt;log.sh&lt;/a&gt;. It's a library for easy logging, here is a quick screenshot of the examples:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-C4ina8EsnG8/Tx11fpAzEcI/AAAAAAAAC_Y/_-9WjbSOZgs/s1600/2012-01-23--22%253A51%253A57.png" imageanchor="1"&gt;&lt;img border="0" class="no-autoresize" src="http://1.bp.blogspot.com/-C4ina8EsnG8/Tx11fpAzEcI/AAAAAAAAC_Y/_-9WjbSOZgs/s1600/2012-01-23--22%253A51%253A57.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
As you can see, it's &lt;b&gt;&lt;span style="color: blue;"&gt;c&lt;/span&gt;&lt;span style="color: lime;"&gt;o&lt;/span&gt;&lt;span style="color: yellow;"&gt;l&lt;/span&gt;&lt;span style="color: red;"&gt;o&lt;/span&gt;&lt;span style="background-color: red; color: white;"&gt;r&lt;/span&gt;&lt;/b&gt;ful, little too fancy, I hope it didn't blind you. It's new , so I hope someone can jump in and improve it. There are some in it I didn't like, e.g. the templating.&lt;br /&gt;
&lt;br /&gt;
It's easy to use, just &lt;code&gt;source log.sh&lt;/code&gt;, then you are good to go. Please read more on &lt;a href="https://github.com/livibetter/log.sh"&gt;GitHub&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-1829031064169320095?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GQd2sN92SehRlWOtlqnuMeBVyqc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GQd2sN92SehRlWOtlqnuMeBVyqc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GQd2sN92SehRlWOtlqnuMeBVyqc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GQd2sN92SehRlWOtlqnuMeBVyqc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=AEt4tP6l8I0:QXg2awJQQwA:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=AEt4tP6l8I0:QXg2awJQQwA:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/AEt4tP6l8I0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/1829031064169320095/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/logsh-bash-logging-library.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/1829031064169320095?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/1829031064169320095?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/AEt4tP6l8I0/logsh-bash-logging-library.html" title="log.sh - Bash logging library" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-C4ina8EsnG8/Tx11fpAzEcI/AAAAAAAAC_Y/_-9WjbSOZgs/s72-c/2012-01-23--22%253A51%253A57.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/logsh-bash-logging-library.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYMQHY_eip7ImA9WhRUEko.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-4012406183786434129</id><published>2012-01-22T14:43:00.000-08:00</published><updated>2012-01-22T14:43:01.842-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-22T14:43:01.842-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="call stack" /><category scheme="http://www.blogger.com/atom/ns#" term="shell scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="traceback" /><category scheme="http://www.blogger.com/atom/ns#" term="Bash" /><title>Printing out Call Stack in Bash</title><content type="html">&lt;p&gt;Yes, there is such same thing called &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Call_stack"&gt;Call Stack&lt;/a&gt; in Bash as you see in C, Python, etc. The information is stored in &lt;tt class="docutils literal"&gt;BASH_SOURCE&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;BASH_LINENO&lt;/tt&gt;, and &lt;tt class="docutils literal"&gt;FUNCNAME&lt;/tt&gt;. They all are arrays with same length/depth. The last item represents main script, the first item is the current function (or main script) of where these arrays are accessed.&lt;/p&gt;
&lt;p&gt;Here is some working code, the first file &lt;tt class="docutils literal"&gt;test.sh&lt;/tt&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class="bash"&gt;#!/bin/bash
# Copyright 2012 Yu-Jie Lin
# MIT License

# Log Call Stack
LSLOGSTACK () {
  local i=0
  local FRAMES=${#BASH_LINENO[@]}
  # FRAMES-2 skips main, the last one in arrays
  for ((i=FRAMES-2; i&amp;gt;=0; i--)); do
    echo '  File' \"${BASH_SOURCE[i+1]}\", line ${BASH_LINENO[i]}, in ${FUNCNAME[i+1]}
    # Grab the source code of the line
    sed -n "${BASH_LINENO[i]}{s/^/    /;p}" "${BASH_SOURCE[i+1]}"
  done
}

source src.sh
# LINE 18
func2 () {
  func3 foo bar
}
# LINE 22
func1 () {
  func2 a b c
}
# LINE 26
func1 1 2 3&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is extracted from something I am currently working on, which will be released under the MIT License, so this small code is with same license. The second file &lt;tt class="docutils literal"&gt;src.sh&lt;/tt&gt; is for being sourced:&lt;/p&gt;
&lt;pre&gt;&lt;code class="bash"&gt;func3 () {
  LSLOGSTACK
}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And the output:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ ./test.sh
  File &amp;quot;./test.sh&amp;quot;, line 27, in main
    func1 1 2 3
  File &amp;quot;./test.sh&amp;quot;, line 24, in func1
      func2 a b c
  File &amp;quot;./test.sh&amp;quot;, line 20, in func2
      func3 foo bar
  File &amp;quot;src.sh&amp;quot;, line 2, in func3
      LSLOGSTACK
&lt;/pre&gt;
&lt;p&gt;It may look vaguely familiar to you if you are also a Python coder, the code mimics the output of &lt;a class="reference external" href="http://docs.python.org/library/traceback.html"&gt;Traceback&lt;/a&gt; module.&lt;/p&gt;
&lt;p&gt;The explanation of those three arrays can be found in &lt;tt class="docutils literal"&gt;man bash&lt;/tt&gt;. I am also planning to print out &lt;tt class="docutils literal"&gt;BASH_ARGV&lt;/tt&gt; for each frame, but that will be in that library I am coding.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-4012406183786434129?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5feERWa4ZFEX70uTMjqHG1xGu3A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5feERWa4ZFEX70uTMjqHG1xGu3A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5feERWa4ZFEX70uTMjqHG1xGu3A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5feERWa4ZFEX70uTMjqHG1xGu3A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=6dTV8lQHArM:hZaiJGifHVY:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=6dTV8lQHArM:hZaiJGifHVY:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/6dTV8lQHArM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/4012406183786434129/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/printing-out-call-stack-in-bash.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/4012406183786434129?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/4012406183786434129?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/6dTV8lQHArM/printing-out-call-stack-in-bash.html" title="Printing out Call Stack in Bash" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/printing-out-call-stack-in-bash.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIFQn8yfCp7ImA9WhRUEks.&quot;"><id>tag:blogger.com,1999:blog-3803541356848955053.post-3823154959950015159</id><published>2012-01-22T12:18:00.000-08:00</published><updated>2012-01-22T12:18:33.194-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-22T12:18:33.194-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="status code" /><category scheme="http://www.blogger.com/atom/ns#" term="HTTP" /><category scheme="http://www.blogger.com/atom/ns#" term="parody" /><category scheme="http://www.blogger.com/atom/ns#" term="RFC" /><category scheme="http://www.blogger.com/atom/ns#" term="LOL" /><category scheme="http://www.blogger.com/atom/ns#" term="webdev" /><title>RFC for HTTP Status Code 7XX: Developer Errors</title><content type="html">Go check out first on &lt;a href="https://github.com/joho/7XX-rfc"&gt;GitHub&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
At first glance of the title, even it's a bit of weird, I was kind of believing that was a valid document until I read the code 701. Then, I started laughing. Here is a list of my favorites:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;72X - Edge Cases  &lt;ul&gt;
&lt;li&gt;720 - Unpossible&lt;/li&gt;
&lt;li&gt;721 - Known Unknowns&lt;/li&gt;
&lt;li&gt;722 - Unknown Unknowns&lt;/li&gt;
&lt;li&gt;723 - Tricky&lt;/li&gt;
&lt;li&gt;724 - This line should be unreachable&lt;/li&gt;
&lt;li&gt;725 - It works on my machine&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;73X - Fucking  &lt;ul&gt;
&lt;li&gt;735 - Fucking IE&lt;/li&gt;
&lt;li&gt;736 - Fucking Race Conditions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;74X - Meme Driven  &lt;ul&gt;
&lt;li&gt;742 - A kitten dies&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;76X - Substance-Affected Developer  &lt;ul&gt;
&lt;li&gt;761 - Hungover&lt;/li&gt;
&lt;li&gt;762 - Stoned&lt;/li&gt;
&lt;li&gt;763 - Over-Caffienated&lt;/li&gt;
&lt;li&gt;764 - Under-Caffienated&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;77X - Predictable Problems  &lt;ul&gt;
&lt;li&gt;777 - Coincidence&lt;/li&gt;
&lt;li&gt;779 - Off By Too Many To Count Error&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;78X - Somebody Else's Problem  &lt;ul&gt;
&lt;li&gt;781 - Operations&lt;/li&gt;
&lt;li&gt;782 - QA&lt;/li&gt;
&lt;li&gt;783 - It was a customer request, honestly&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
Someone really needs to get this into standard. ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3803541356848955053-3823154959950015159?l=blog.yjl.im' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FnWfDyaelR1H2SLu1z5XNzC4mjQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FnWfDyaelR1H2SLu1z5XNzC4mjQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FnWfDyaelR1H2SLu1z5XNzC4mjQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FnWfDyaelR1H2SLu1z5XNzC4mjQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/YJLv?a=XR2L2Hv7NxY:iXXRWKeMCGc:AOzAX-4I-Ts"&gt;&lt;img src="http://feeds.feedburner.com/~ff/YJLv?i=XR2L2Hv7NxY:iXXRWKeMCGc:AOzAX-4I-Ts" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/YJLv/~4/XR2L2Hv7NxY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.yjl.im/feeds/3823154959950015159/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.yjl.im/2012/01/rfc-for-http-status-code-7xx-developer.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/3823154959950015159?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3803541356848955053/posts/default/3823154959950015159?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/YJLv/~3/XR2L2Hv7NxY/rfc-for-http-status-code-7xx-developer.html" title="RFC for HTTP Status Code 7XX: Developer Errors" /><author><name>Yu-Jie Lin</name><uri>https://profiles.google.com/115422682039760465813</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-e-i3n52TFPI/AAAAAAAAAAI/AAAAAAAAAAA/N3NefrEGlxM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.yjl.im/2012/01/rfc-for-http-status-code-7xx-developer.html</feedburner:origLink></entry></feed>

