<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1014045108168426651</id><updated>2024-10-04T19:06:01.525-07:00</updated><category term="google"/><category term="cr48"/><category term="chromium"/><category term="linux"/><category term="php"/><category term="scripting"/><category term="wordpress"/><category term="shell"/><category term="unix"/><category term="perl"/><category term="bash"/><category term="geek writings"/><category term="mysql"/><category term="android"/><category term="blurb"/><category term="code"/><category term="command"/><category term="g1"/><category term="python"/><category term="apache"/><category term="chrome"/><category term="cloud"/><category term="freebsd"/><category term="htc dream"/><category term="java"/><category term="javascript"/><category term="nginx"/><category term="rant"/><category term="regex"/><category term="sql"/><category term="xml"/><category term="C"/><category term="amazon mp3"/><category term="cryptography"/><category term="data recovery"/><category term="email"/><category term="fail"/><category term="fezbook"/><category term="ffmpeg"/><category term="ghost in the wires"/><category term="google music"/><category term="google+"/><category term="hdd"/><category term="htc magic"/><category term="lorem ipsum"/><category term="math"/><category term="mobile"/><category term="monty"/><category term="opensuse"/><category term="play framework"/><category term="review"/><category term="rfc"/><category term="story"/><category term="thunderbird"/><category term="ubuntu"/><category term="vi"/><category term="voip"/><category term="w3c"/><title type='text'>Drin Cruz Is A Geek</title><subtitle type='html'>Pablums of a technologist.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>97</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-8398381169282979159</id><published>2012-09-05T15:03:00.000-07:00</published><updated>2012-09-05T15:03:03.690-07:00</updated><title type='text'>Terminal Style for Calibre</title><content type='html'>&lt;p&gt;I am no frontend designer, but this works for me. Resembles a terminal, a lot easier on my eyes. :)&lt;/p&gt;
&lt;p&gt;I like &lt;a href=&quot;http://calibre-ebook.com/&quot;&gt;calibre&lt;/a&gt;. Cheers!&lt;/p&gt;
&lt;code&gt;
body {color:rgb(50,999,50) !important;
background-color:rgb(0,0,0) !important;
text-align:justify !important;
margin-top:0px;
margin-bottom:4px;
margin-left:50px;
margin-right:50px;
text-indent:3em !important;}

h1, h2, h3, h4, h5, h6
{color: red !important;
text-align:center !important;
font-style:italic !important;
font-weight:bold !important;}
&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/8398381169282979159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/8398381169282979159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/8398381169282979159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/8398381169282979159'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2012/09/terminal-style-for-calibre.html' title='Terminal Style for Calibre'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-2299837025171202828</id><published>2012-08-22T19:53:00.000-07:00</published><updated>2012-08-22T19:59:42.931-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="opensuse"/><category scheme="http://www.blogger.com/atom/ns#" term="play framework"/><title type='text'>Don&#39;t Forget, Bugs Can Be Environment-specific Too</title><content type='html'>&lt;h2&gt;
Fun With Play Framework&lt;/h2&gt;
I recently heard a lot of great stuff about&amp;nbsp;&lt;a href=&quot;http://www.playframework.org/&quot;&gt;the Play Framework&lt;/a&gt;&amp;nbsp;so I decided to download it and play with it. The&amp;nbsp;&lt;a href=&quot;http://www.playframework.org/documentation/2.0.2/NewApplication&quot;&gt;tutorial&lt;/a&gt;&amp;nbsp;seemed rather simple, I figured I would just breeze through it. Nope. Not at all.&lt;br /&gt;
&lt;br /&gt;
Running &lt;code&gt;play&lt;/code&gt; on its own worked normally as it should; creating a new application via &lt;code&gt;play new&lt;/code&gt; worked as it should. Running &lt;code&gt;play&lt;/code&gt;&amp;nbsp;in the app directory is where it failed. &lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;error: error while loading &lt;root&gt;, error in opening zip file
[error] scala.tools.nsc.MissingRequirementError: object scala not found.
[error] Use &#39;last&#39; for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?&amp;nbsp;&lt;/root&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;root&gt;&lt;br /&gt;&lt;/root&gt;&lt;/code&gt;
Interesting. I dug deeper and thought it was due to Play&#39;s bundled version of &lt;code&gt;sbt&lt;/code&gt;. So, I installed a &lt;a href=&quot;https://github.com/harrah/xsbt/wiki/Getting-Started-Setup&quot;&gt;version of sbt&lt;/a&gt;. I tried a &quot;hello world&quot; test with it and got the same error. Aha! So it must be a bug with &lt;code&gt;sbt&lt;/code&gt;.

No, not really. I google&#39;d and stumbled upon &lt;a href=&quot;http://allstarnix.blogspot.com/2012/07/scala-error-while-loading-and-how-to.html&quot;&gt;Howard Guo&#39;s blog&lt;/a&gt; and read that he too was running openSUSE. Ah, now that&#39;s where it all hit me! 

I loaded Play on my old Ubuntu box and bingo all is well!

Sheesh.&lt;br /&gt;
&lt;br /&gt;
The &lt;a href=&quot;https://bugzilla.novell.com/show_bug.cgi?id=770040#c0&quot;&gt;Bugzilla entry&lt;/a&gt; says this bug probably won&#39;t be fixed since it&#39;s in openjdk 1.6.0, but luckily the fix is easy enough!&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
That&#39;s quite unfortunate - please type&lt;br /&gt;
chmod 0644&lt;br /&gt;/usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/lib/ext/gnome-java-bridge.jar&lt;br /&gt;
as a root as a workaround. I doubt we will release any new maintenance update&lt;br /&gt;of openjdk6 in the future.&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/2299837025171202828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/2299837025171202828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/2299837025171202828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/2299837025171202828'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2012/08/dont-forget-bugs-can-be-environment.html' title='Don&#39;t Forget, Bugs Can Be Environment-specific Too'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-9128653757272742029</id><published>2012-07-06T08:29:00.000-07:00</published><updated>2012-07-06T08:31:25.632-07:00</updated><title type='text'>PHP: The Language You Love And Hate</title><content type='html'>&lt;h2&gt;




&lt;span style=&quot;font-size: small;&quot;&gt;tl;dr&lt;/span&gt;&lt;/h2&gt;
&lt;a href=&quot;http://drincruz.blogspot.com/search/label/php&quot;&gt;I use PHP&lt;/a&gt;&amp;nbsp;and find that it works well for most jobs, but for others, not &lt;i&gt;that&lt;/i&gt;&amp;nbsp;great. Use the language that best fits the job!&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;




&lt;span style=&quot;font-size: small;&quot;&gt;PHP in the critic spotlight lately&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
Quite a few &quot;&lt;a href=&quot;http://fabien.potencier.org/article/64/php-is-much-better-than-you-think&quot;&gt;PHP is good&lt;/a&gt;&quot; and &quot;&lt;a href=&quot;http://www.codinghorror.com/blog/2012/06/the-php-singularity.html&quot;&gt;PHP is bad&lt;/a&gt;&quot; posts lately; even from people who, like me, use PHP, love it, and also hate it, have come out to &lt;a href=&quot;http://blog.ircmaxell.com/2012/07/true-problem-with-php.html&quot;&gt;say a thing or two&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Well, if you read &lt;a href=&quot;http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/&quot;&gt;veekun&#39;s post&lt;/a&gt;, he&#39;s got something going there that I really want to point out, even though it really wasn&#39;t meant for the way I&#39;m thinking about it; it&#39;s the &lt;b&gt;toolbox&lt;/b&gt;. As engineers, it is our responsibility to build things. You can hammer in a nail with a wrench (haven&#39;t we all done that once before?), but obviously you should have used a hammer. Heck, you can even use a nail gun if it does the job better.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;




&lt;span style=&quot;font-size: small;&quot;&gt;Languages Are Engineers&#39; Tools In Their Toolbox&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;No, really. The more you know, the more knowledgeable and versatile you will be. And obviously if you have that knowledge, you&#39;ll know what &quot;tool&quot; is the right one. &lt;a href=&quot;https://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions&quot;&gt;Steve Yegge&#39;s post on interview phone screens&lt;/a&gt;&amp;nbsp;tells a wonderful tale of this.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&quot;&lt;/span&gt;Many C/C++/Java candidates, even some with 10+ years of experience, would happily spend a week writing a 2,500-line program to do something you could do in 30 seconds with a simple Unix command.&quot;&lt;/blockquote&gt;
I&#39;ll let you read the article for the complete story, but it essentially explains that you can do a search and replace in many ways, but if you don&#39;t know how to use &lt;code&gt;grep&lt;/code&gt; or &lt;code&gt;python&lt;/code&gt; or even &lt;code&gt;php&lt;/code&gt; you would be wasting lots of time on a quick job.&lt;br /&gt;
&lt;br /&gt;
Now, I&#39;m not saying to go and learn all the languages out there. I&#39;m just saying that maybe knowing a little bit of a compiled language, scripting language, and a frontend language would help you understand better the full stack of whatever you are working on.&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/9128653757272742029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/9128653757272742029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/9128653757272742029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/9128653757272742029'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2012/07/php-language-you-love-and-hate.html' title='PHP: The Language You Love And Hate'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-5281966113130619359</id><published>2012-04-18T21:37:00.000-07:00</published><updated>2012-04-18T21:37:38.956-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fezbook"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>FezBook Update: Added a Java Library</title><content type='html'>&lt;h3&gt;FezBook Java Library&lt;/h3&gt;
&lt;p&gt;I shouldn&#39;t need to say anything more than the title right? Well anyhow, my little &lt;a href=&quot;http://drincruz.blogspot.com/p/fezbook.html&quot;&gt;FezBook Library&lt;/a&gt; that I&#39;ve been using is also now available in java. Exciting! You can check it out on my &lt;a href=&quot;https://github.com/drincruz/FezBook/blob/master/FezBook.java&quot;&gt;github FezBook repository&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Why?&lt;/h3&gt;
&lt;p&gt;Well, why not? Hehe :) Honestly, I&#39;ve been working on a backend service and java seemed like a nice fit. I haven&#39;t had the chance to drop a javadoc anywhere, so be patient. I may just end up adding the phpdocs and javadocs in the repository itself.&lt;/p&gt;

&lt;h3&gt;ymmv&lt;/h3&gt;
&lt;p&gt;Well, just try it and see. Same thing with the PHP version, you&#39;ll need to do your own OAuth or already have your access token. Enjoy!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/5281966113130619359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/5281966113130619359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/5281966113130619359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/5281966113130619359'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2012/04/fezbook-update-added-java-library.html' title='FezBook Update: Added a Java Library'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-8321274161620016156</id><published>2012-02-29T08:22:00.000-08:00</published><updated>2012-02-29T08:22:01.328-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><title type='text'>Grepping for Control Characters</title><content type='html'>&lt;h3&gt;&quot;&lt;code&gt;\t&lt;/code&gt; Will Not Work&quot;&lt;/h3&gt;
&lt;p&gt;
Plain and simple, send a &lt;code&gt;^v&lt;/code&gt; before the control character you want. ;)
&lt;/p&gt;
&lt;h3&gt;What happened there?&lt;/h3&gt;
&lt;p&gt;
Say for example you want to &lt;code&gt;grep&lt;/code&gt; for lines in a file that have tabs. You&#39;ve tried &lt;code&gt;grep &#39;\t&#39; yourfile&lt;/code&gt; to all avail and it&#39;s just not working. Well, you&#39;re close, you actually want to send a &lt;code&gt;tab&lt;/code&gt;. To do so, use &lt;code&gt;^v&lt;/code&gt; (control + v) and then send an actual tab:&lt;br /&gt;&lt;code&gt;grep &#39;^v[tab button]&#39; yourfile&lt;/code&gt;
&lt;/p&gt;

&lt;p&gt;This seems to be a common question from people and a coworker just dropped in to ask, so here ya go! Cheers!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/8321274161620016156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/8321274161620016156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/8321274161620016156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/8321274161620016156'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2012/02/grepping-for-control-characters.html' title='Grepping for Control Characters'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-3500427987830576679</id><published>2011-12-08T08:29:00.001-08:00</published><updated>2011-12-08T08:42:20.527-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><title type='text'>Python CSV Parsing</title><content type='html'>&lt;p&gt;If you haven&#39;t realized already, I live and breathe in a command-line world. That&#39;s not even just talking about my work-related things; even when helping out helping out someone who is running Windows I will do majority of the things I need to do in the cmd prompt. Anyhow, I&#39;m starting to ramble...&lt;/p&gt;

&lt;p&gt;I also sporadically get some data sent to me in csv (or I will convert it to csv format). Now, if you have done this enough times, you&#39;ll obviously want to have some sort of csv parser. And what do you know, voila! I&#39;ve got a simple one here for all of my command-line junkies out there!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/1447503&quot;&gt;csvreader.py&lt;/a&gt; is short enough to be available as a short gist on github. --My first activity on github by the way!&lt;/p&gt;

&lt;p&gt;I&#39;m sure you&#39;ll all find a nice way to use that. If you were curious what I ended up doing, well here&#39;s a generic code snippet: &lt;code&gt;for f in `python csvreader.py tmp/b.20111208_1042.csv 0`; do echo $f; php postInfo.php /mnt/$f; done;&lt;/code&gt;&lt;/p&gt;

Cheers!</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/3500427987830576679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/3500427987830576679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/3500427987830576679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/3500427987830576679'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/12/python-csv-parsing.html' title='Python CSV Parsing'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-1320734128114313872</id><published>2011-10-02T21:05:00.000-07:00</published><updated>2011-10-03T08:28:03.372-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="cryptography"/><category scheme="http://www.blogger.com/atom/ns#" term="ghost in the wires"/><title type='text'>Decoding the &quot;Ghost in the Wires&quot;: Chapter 01</title><content type='html'>&lt;h3&gt;Quick Intro&lt;/h3&gt;
&lt;p&gt;I recently just finished Kevin Mitnick&#39;s &lt;i&gt;Ghost in the Wires&lt;/i&gt;. Excellent read! I highly recommend!

The cryptic text got my attention and I decided I wanted to give a &lt;i&gt;crack&lt;/i&gt; at them. Let&#39;s see how far I can get before I give up.
&lt;/p&gt;
&lt;h3&gt;01 Yjcv ku vjg pcog qh vjg uauvgo wugf da jco qrgtcvqtu vq ocmg htgg rjqpg ecnnu?&lt;/h3&gt;
&lt;p&gt;I wrote a simple &lt;a href=&quot;http://en.wikipedia.org/wiki/Caesar_cipher&quot;&gt;Caesar cipher&lt;/a&gt; C program, called &lt;code&gt;rotn&lt;/code&gt; that I can pipe in some text.&lt;/p&gt;
&lt;code&gt;
for n in {1..26}; do cat ~/tmp/ghost01 | rotn $n; done&lt;br&gt;
Zkdw lv wkh qdph ri wkh vbvwhp xvhg eb kdp rshudwruv wr pdnh iuhh skrqh fdoov?&lt;br&gt;
Alex mw xli reqi sj xli wcwxiq ywih fc leq stivexsvw xs qeoi jvii tlsri geppw?&lt;br&gt;
Bmfy nx ymj sfrj tk ymj xdxyjr zxji gd mfr tujwfytwx yt rfpj kwjj umtsj hfqqx?&lt;br&gt;
Cngz oy znk tgsk ul znk yeyzks aykj he ngs uvkxgzuxy zu sgqk lxkk vnutk igrry?&lt;br&gt;
Doha pz aol uhtl vm aol zfzalt bzlk if oht vwlyhavyz av thrl myll wovul jhssz?&lt;br&gt;
Epib qa bpm vium wn bpm agabmu caml jg piu wxmzibwza bw uism nzmm xpwvm kitta?&lt;br&gt;
Fqjc rb cqn wjvn xo cqn bhbcnv dbnm kh qjv xynajcxab cx vjtn oann yqxwn ljuub?&lt;br&gt;
Grkd sc dro xkwo yp dro cicdow econ li rkw yzobkdybc dy wkuo pboo zryxo mkvvc?&lt;br&gt;
Hsle td esp ylxp zq esp djdepx fdpo mj slx zapclezcd ez xlvp qcpp aszyp nlwwd?&lt;br&gt;
Itmf ue ftq zmyq ar ftq ekefqy geqp nk tmy abqdmfade fa ymwq rdqq btazq omxxe?&lt;br&gt;
Jung vf gur anzr bs gur flfgrz hfrq ol unz bcrengbef gb znxr serr cubar pnyyf?&lt;br&gt;
Kvoh wg hvs boas ct hvs gmghsa igsr pm voa cdsfohcfg hc aoys tfss dvcbs qozzg?&lt;br&gt;
Lwpi xh iwt cpbt du iwt hnhitb jhts qn wpb detgpidgh id bpzt ugtt ewdct rpaah?&lt;br&gt;
Mxqj yi jxu dqcu ev jxu ioijuc kiut ro xqc efuhqjehi je cqau vhuu fxedu sqbbi?&lt;br&gt;
Nyrk zj kyv erdv fw kyv jpjkvd ljvu sp yrd fgvirkfij kf drbv wivv gyfev trccj?&lt;br&gt;
Ozsl ak lzw fsew gx lzw kqklwe mkwv tq zse ghwjslgjk lg escw xjww hzgfw usddk?&lt;br&gt;
Patm bl max gtfx hy max lrlmxf nlxw ur atf hixktmhkl mh ftdx ykxx iahgx vteel?&lt;br&gt;
Qbun cm nby hugy iz nby msmnyg omyx vs bug ijylunilm ni guey zlyy jbihy wuffm?&lt;br&gt;
Rcvo dn ocz ivhz ja ocz ntnozh pnzy wt cvh jkzmvojmn oj hvfz amzz kcjiz xvggn?&lt;br&gt;
Sdwp eo pda jwia kb pda ouopai qoaz xu dwi klanwpkno pk iwga bnaa ldkja ywhho?&lt;br&gt;
Texq fp qeb kxjb lc qeb pvpqbj rpba yv exj lmboxqlop ql jxhb cobb melkb zxiip?&lt;br&gt;
Ufyr gq rfc lykc md rfc qwqrck sqcb zw fyk mncpyrmpq rm kyic dpcc nfmlc ayjjq?&lt;br&gt;
Vgzs hr sgd mzld ne sgd rxrsdl trdc ax gzl nodqzsnqr sn lzjd eqdd ognmd bzkkr?&lt;br&gt;
What is the name of the system used by ham operators to make free phone calls?&lt;br&gt;
Xibu jt uif obnf pg uif tztufn vtfe cz ibn pqfsbupst up nblf gsff qipof dbmmt?&lt;br&gt;
Yjcv ku vjg pcog qh vjg uauvgo wugf da jco qrgtcvqtu vq ocmg htgg rjqpg ecnnu?&lt;br&gt;
&lt;/code&gt;
&lt;p&gt;Did you see the decrypted text? These should be fun. Let&#39;s see how long it will take for me to crack the next chapter. 8)&lt;/p&gt;

&lt;p&gt;Oh, and yes I will publish the code for my Caesar cipher program for those curious. Just give me some time, I&#39;ve been fighting to not open a github account, but I think that&#39;s a decent option as of now.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/1320734128114313872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/1320734128114313872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1320734128114313872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1320734128114313872'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/10/decoding-ghost-in-wires-chapter-01.html' title='Decoding the &quot;Ghost in the Wires&quot;: Chapter 01'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-517000716825748270</id><published>2011-09-18T15:51:00.000-07:00</published><updated>2011-09-18T15:51:21.172-07:00</updated><title type='text'>Pyweek Post Mortem</title><content type='html'>&lt;h3&gt;



Pyweek Was Brutal&lt;/h3&gt;
&lt;a href=&quot;http://www.pyweek.org/&quot;&gt;Pyweek&lt;/a&gt;: a week long contest to develop a game in python. Sounds fun right? I thought it did. I&#39;ll tell you right now, that it was brutal; but ultimately, even though I didn&#39;t even submit my code for review, I think I accomplished a lot.&lt;br /&gt;
&lt;h3&gt;


Pyweek Objectives&lt;/h3&gt;
You have one week to develop a game in python. The contest&#39;s theme is voted on one week before the contest starts. This keeps things fair so there is nobody working on their projects before the contest starts. You are allowed to use any libraries specified on pyweek&#39;s &lt;a href=&quot;http://pyweek.org/s/rules/&quot;&gt;rules page&lt;/a&gt;. All graphics and music must be created by you for the contest. That&#39;s about it in a nutshell, there&#39;s a lot more detail on the pyweek site.&lt;br /&gt;
&lt;h3&gt;


&lt;i&gt;My&lt;/i&gt; Objectives&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;Learn a python game library&lt;/i&gt;. &lt;br /&gt;Yes, that&#39;s right, I entered a contest to learn. I like challenges and feel like I needed something like this to push me to learn. &lt;/li&gt;
&lt;li&gt;&lt;i&gt;Survive.&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;

You &lt;i&gt;really&lt;/i&gt; need to use the entire week&lt;/h3&gt;
One week. That&#39;s all you get. From 00:00 UTC September 11 until 23:59 UTC September 17 is all the time you will get. Now, to paint a picture of my week, here was what my schedule looked like:&lt;br /&gt;
&lt;b&gt;Sunday&lt;/b&gt;: housework all day, ~10pm EST start some pyweek work write up some game ideas&lt;br /&gt;
&lt;b&gt;Monday&lt;/b&gt;: work -- start getting sick, though a little bit of &lt;a href=&quot;http://www.pygame.org/&quot;&gt;pygame&lt;/a&gt; learning&lt;br /&gt;
&lt;b&gt;Tuesday&lt;/b&gt;: work -- still sick&lt;br /&gt;
&lt;b&gt;Wednesday&lt;/b&gt;: work --still sick&lt;br /&gt;
&lt;b&gt;Thursday&lt;/b&gt;: work --still sick, but able to do a little bit of pygame tutorials to keep learning&lt;br /&gt;
&lt;b&gt;Friday&lt;/b&gt;: work - pyweek work&lt;br /&gt;
&lt;b&gt;Saturday&lt;/b&gt;: pyweek work&lt;br /&gt;
Fighting a cold for time is seriously an uphill struggle. If you&#39;re sick, stay in bed to rest up.&lt;br /&gt;
&lt;h3&gt;

A Failure at Pyweek, A Success At Learning&lt;/h3&gt;
So as I stated earlier, I never even submitted my code for review. I was not able to get as far as I would have liked to, though for my objectives, I think I did well. The theme for Pyweek was &quot;mutate&quot;; I had a basic idea and I tried to keep things simple, but apparently not simple enough. Well, not simple for someone who is just learning the pygame library. &lt;br /&gt;
I learned a lot in this short time and I am ultimately happy that I at least have something a little bit playable. Crappy, yes. But hey, I made it and I made every piece of it; from code to background music, to little character gifs, I made them all. And for that reason, if someone ever asks me if I&#39;ve ever created a game, &quot;why yes! yes, I did!&quot;

You can checkout my Pyweek diaries &lt;a href=&quot;http://pyweek.org/e/drinPy/&quot;&gt;here&lt;/a&gt; and check out all of the entries &lt;a href=&quot;http://pyweek.org/13/entries/&quot;&gt;here&lt;/a&gt;. There are some really awesome games out there, go check them out! Congrats to &lt;b&gt;all&lt;/b&gt; Pyweek contestants!

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk9P_DQqKIl5xpZKXjRJ7hwe6bv3KYOmGE471GxAy9NnWo4whuJcTHN9UZdb6FimsbJknP3xCSDzOGgwaExuDYBq0zDjT7mXY1FBx4pmTDo8fIasS58vIa8_ipWcweyC_6UHjLscc4jF4z/s640/Screenshot-Dr.%252520Laughing%252527s%252520Adventures-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;510&quot; width=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk9P_DQqKIl5xpZKXjRJ7hwe6bv3KYOmGE471GxAy9NnWo4whuJcTHN9UZdb6FimsbJknP3xCSDzOGgwaExuDYBq0zDjT7mXY1FBx4pmTDo8fIasS58vIa8_ipWcweyC_6UHjLscc4jF4z/s640/Screenshot-Dr.%252520Laughing%252527s%252520Adventures-2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/517000716825748270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/517000716825748270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/517000716825748270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/517000716825748270'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/09/pyweek-post-mortem.html' title='Pyweek Post Mortem'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk9P_DQqKIl5xpZKXjRJ7hwe6bv3KYOmGE471GxAy9NnWo4whuJcTHN9UZdb6FimsbJknP3xCSDzOGgwaExuDYBq0zDjT7mXY1FBx4pmTDo8fIasS58vIa8_ipWcweyC_6UHjLscc4jF4z/s72-c/Screenshot-Dr.%252520Laughing%252527s%252520Adventures-2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-1954174773715765457</id><published>2011-08-03T11:45:00.000-07:00</published><updated>2011-08-03T11:45:42.253-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="scripting"/><title type='text'>Python: Reading and Running Commands From A File</title><content type='html'>So I recently came across a broken process that needed some manual re-running. I was able to search through the log files and then see what part needed to be re-run. I ended up with a new data file (that I modified) to be a list of each command that failed for each iteration. So, the file looked something like this:&lt;br /&gt;
&lt;code&gt;/path/to/program -option x -site a&lt;br /&gt;
/path/to/program -option x -site b&lt;br /&gt;
...&lt;br /&gt;
/path/to/program -option x -site z&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using a bash &lt;code&gt;for line in `cat command.file`; do $line; done&lt;/code&gt; would not work since I would end up with a &lt;br /&gt;
&lt;i&gt;-bash: -option: command not found&lt;br /&gt;
-bash: x: command not found&lt;br /&gt;
-bash: -site: command not found&lt;br /&gt;
&lt;/i&gt; error. So, here&#39;s some quick Python that can get the job done:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
f = open(&#39;/tmp/tmp-fix.commands&#39;)&lt;br /&gt;
for line in f:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print line.rstrip()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; os.system(line.rstrip())&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Yay for saving me some time! Cheers!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/1954174773715765457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/1954174773715765457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1954174773715765457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1954174773715765457'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/08/python-reading-and-running-commands.html' title='Python: Reading and Running Commands From A File'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-2509993989517302745</id><published>2011-08-02T11:15:00.000-07:00</published><updated>2011-08-02T11:16:10.011-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="ffmpeg"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>ffmpeg: Creating A Single Image Video With Audio via CLI</title><content type='html'>&lt;p&gt;Here&#39;s a nice quickie for you command line junkies. So say you wanted to share an audio file, but for sites like Facebook or Google+ you only have an option to upload a video. Okay sure, just create a video with the audio embedded. &lt;/p&gt;&lt;p&gt;My friend left me a hilarious voicemail a while back that I wanted to share with friends. I also wanted to set an image to constantly display just for viewing pleasure. So, bake the image to loop add in the mp3 voicemail and voila!&lt;/p&gt;&lt;br /&gt;
&lt;code&gt;ffmpeg -loop_input -i Downloads/P1010155.png -i Downloads/30ad00fa24c1dcdf7479271f290c82252216718a.mp3 -shortest tmp/output.mp4&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/2509993989517302745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/2509993989517302745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/2509993989517302745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/2509993989517302745'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/08/ffmpeg-creating-single-image-with-audio.html' title='ffmpeg: Creating A Single Image Video With Audio via CLI'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-3570319624380288878</id><published>2011-07-29T09:33:00.000-07:00</published><updated>2011-07-29T09:33:24.618-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon mp3"/><category scheme="http://www.blogger.com/atom/ns#" term="geek writings"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="google music"/><title type='text'>Google Music vs. Amazon MP3 (so far at least)</title><content type='html'>&lt;p&gt;So &lt;a href=&quot;http://music.google.com&quot;&gt;Google Music&lt;/a&gt; &lt;i&gt;finally&lt;/i&gt; built a linux-compatible music manager, so I finally got started playing with Google Music. &lt;a href=&quot;http://www.amazon.com&quot;&gt;Amazon MP3&lt;/a&gt; has a similar gripe with linux, but they at least allow uploads via the Amazon Cloud Drive.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Side By Side&lt;/h2&gt;&lt;p&gt;So far the breakdown goes as follows:&lt;br /&gt;
- Google Music does not have a web-based way to upload my music&lt;br /&gt;
+ Amazon MP3 (though through Amazon Cloud Drive) can do web-based uploads&lt;br /&gt;
- Google Music does not have a way for me to download my music (really?! but, they&#39;re my files!)&lt;br /&gt;
+ Amazon MP3 has a download ability (&lt;a href=&quot;http://drincruz.blogspot.com/2011/04/amazon-cloud-drive-now-doesnt-support.html&quot;&gt;a little buggy&lt;/a&gt; for linux users it seems, but it&#39;s there)&lt;br /&gt;
- Google Music capped my music library (is this just for beta?)&lt;br /&gt;
+ Amazon MP3 [so far] has given me unlimited storage for music. (this is basically paid for though, since I have purchased Amazon MP3 music)&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I still can&#39;t eliminate carrying around local mp3 files on my phone since NYC subways don&#39;t have internet access [yet]. But, having the ability to stream through my albums is super helpful whether at work, home, at a friend&#39;s house, etc.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/3570319624380288878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/3570319624380288878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/3570319624380288878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/3570319624380288878'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/07/google-music-vs-amazon-mp3-so-far-at.html' title='Google Music vs. Amazon MP3 (so far at least)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-1724956211581157429</id><published>2011-07-26T09:57:00.000-07:00</published><updated>2011-07-26T09:58:50.616-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="scripting"/><title type='text'>Python: Getting Line Counts of Files and Reading Directories</title><content type='html'>&lt;p&gt;I have a bunch of little &lt;a href=&quot;http://drincruz.blogspot.com/search/label/scripting&quot;&gt;scripts&lt;/a&gt; to help out with day-to-day tasks (don&#39;t we all?). For some reason, (probably because I&#39;ve been busy) I never posted &lt;i&gt;anything&lt;/i&gt; tagged with &quot;python&quot;. Whoa! Sharing is caring, so here it is.&lt;/p&gt;&lt;code&gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
def lines_in_file(f):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return len(open(f).readlines())&lt;br /&gt;
&lt;br /&gt;
files = os.listdir(sys.argv[1])&lt;br /&gt;
totalcount = 0&lt;br /&gt;
for f in files:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; totalcount += lines_in_file(sys.argv[1] + f)&lt;br /&gt;
&lt;br /&gt;
print totalcount&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;h2&gt;&lt;i&gt;Why would this be helpful?&lt;/i&gt;&lt;/h2&gt;&lt;p&gt;Well, it may or may not to you, but maybe you&#39;re just looking for a python example on how to get a line count of a file: &lt;br /&gt;
&lt;code&gt;def lines_in_file(f):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return len(open(f).readlines())&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Or maybe, you&#39;re just looking for a python example to list files in a directory: &lt;br /&gt;
&lt;code&gt;files = os.listdir(sys.argv[1])&lt;br /&gt;
for f in files:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print f ## modified from the original script, to show you an example&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;&lt;h2&gt;How I Use It In Case You Were Curious...&lt;/h2&gt;&lt;p&gt;So, we have this one cron job that parses through a directory that contains CSV files. So essentially, each line is a python run. Or I can also think of it as, X number of accounts are participating in Job Y.&lt;/p&gt;&lt;p&gt;That&#39;s it! Cheers!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/1724956211581157429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/1724956211581157429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1724956211581157429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1724956211581157429'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/07/python-getting-line-counts-of-files-and.html' title='Python: Getting Line Counts of Files and Reading Directories'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-7434222741417053722</id><published>2011-07-20T14:42:00.000-07:00</published><updated>2011-07-20T14:42:06.818-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geek writings"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="google+"/><title type='text'>Google+ Blurb: After I Logged Into Facebook</title><content type='html'>&lt;p&gt;So I had to log in to facebook for some fun app debugging today (code rolled out today btw, yay!) and decided to poke around and see what&#39;s going on there and...not missing much at all! I&#39;ve heard some chatter about Google+ being too noisy, but I seriously think facebook is noisier. Yes, the &quot;main&quot; stream on Google+ is definitely noisy, but you gotta remember that&#39;s &lt;b&gt;all&lt;/b&gt; of your circles! To be honest, I pretty much &lt;i&gt;only&lt;/i&gt; check my circle streams to filter out cruft. &quot;What are my friends up to?&quot;: friends circle; simple. Doing the equivalent in facebook... I technically can do that, but that&#39;s only in those fb groups; otherwise, I need to go to each of my friends&#39; pages and &lt;strike&gt;stalk&lt;/strike&gt; see their recent activity, etc. but even in doing that, I&#39;m already seeing too much. I could really care less if my friend &lt;i&gt;likes&lt;/i&gt; &quot;Nose-picking&quot; or &quot;I leveled up in Farmville&quot;. I can probably go on, but i won&#39;t. Just my $0.02. 8-)&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;P.S. I do, however, miss one thing: band/musician updates. I started following bands on facebook to get updates on new shows, albums, etc. here, it&#39;s all technology (for now).&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/7434222741417053722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/7434222741417053722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/7434222741417053722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/7434222741417053722'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/07/google-blurb-after-i-logged-into.html' title='Google+ Blurb: After I Logged Into Facebook'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-6422404979645962116</id><published>2011-07-05T14:52:00.000-07:00</published><updated>2011-07-05T14:52:04.613-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geek writings"/><title type='text'>There&#39;s a Bikeshed In The Forest</title><content type='html'>&lt;h2&gt;Into The Forest We Go&lt;/h2&gt;&lt;p&gt;So lately I&#39;ve been inundated with a (IMHO) very aggressive project schedule; and when I say &quot;project&quot;, I mean &lt;i&gt;projects&lt;/i&gt; plural since the ending of the first one overlapped with some of the discovery &amp; design portion of the second one. Which is fine, since I&#39;ve done that many of times. Though, somewhere along the schedule of the second project I started having more and more bikeshed&#39;ing talks. Be it that I was busy or if I wasn&#39;t completely focused due to personal reasons, I fed into these bikeshed&#39;ing talks and they kept coming and I sunk like quicksand.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Painting the Bikeshed&lt;/h2&gt;&lt;p&gt;For those of you who come from a BSD background, you all have probably heard the &lt;a href=&quot;http://bikeshed.com/&quot;&gt;&quot;painting the bikeshed&quot; phrase&lt;/a&gt;. If not, go and give it a read; even if you aren&#39;t part of the *nix scene or even if you&#39;re not an engineer; the thread will shed some light on managing projects whether personal or work-related.&lt;/p&gt;&lt;p&gt;Anyhow, in a brief summation: somewhere, somehow, I got sidetracked with tasks of changing certain language of front-end and etc. design-related issues as opposed to working on core-code functionality. In turn, the project needed to delay a bit.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Lesson learned&lt;/b&gt;: Be more vocal. Yes, let the PM know that there are bigger issues at hand and you&#39;ll get back to the miniscule issues at a later time.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Forest? Huh?&lt;/h2&gt;&lt;p&gt;So what&#39;s the bikeshed have to do with the forest? Well, another phrase has been echoing in my brain a lot lately, and that&#39;s &lt;a href=&quot;http://esl.about.com/library/glossary/bldef_130.htm&quot;&gt;&quot;can&#39;t see the forrest for the trees&quot;&lt;/a&gt;. It has a similar premise behind it and I thought it was very fitting, being that I&#39;ve caught myself (twice now), wasting time debugging code to only later see that there was a simple error that was causing issues; the more recent issue was actually a human error and not code-related at all. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Lesson learned here&lt;/b&gt;: it&#39;s okay to step away for a bit to rest your brain (and your eyes!) from code. &lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Cheers! Code. Debug. Repeat.&lt;/p&gt;&lt;br /&gt;
&lt;h3&gt;Post Script&lt;/h3&gt;&lt;p&gt;* My one delayed project was only delayed three days. We are now just maintaining code and debugging small bugs.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/6422404979645962116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/6422404979645962116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/6422404979645962116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/6422404979645962116'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/07/theres-bikeshed-in-forest.html' title='There&#39;s a Bikeshed In The Forest'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-5106062346796673213</id><published>2011-05-02T09:18:00.000-07:00</published><updated>2011-05-02T09:19:26.749-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress"/><title type='text'>Nginx&#39;s Rewrite Rules for WordPress MS In a Subdirectory</title><content type='html'>&lt;p&gt;Nginx&#39;s rewrite rules have been giving me a headache lately. Okay, cool so it doesn&#39;t support &lt;code&gt;.htaccess&lt;/code&gt; files; that&#39;s fine. WordPress&#39; &lt;a href=&quot;http://codex.wordpress.org/Nginx&quot;&gt;Codex Nginx Page&lt;/a&gt; gives me some great information on how to do the rewrites.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Ah but I&#39;m &lt;a href=&quot;http://drincruz.blogspot.com/2011/04/nginx-running-fastcgi-under-alias.html&quot;&gt;running WordPress in a subdirectory&lt;/a&gt;! My site URI for WordPress is something like, http://mydomain.com/subdir/. Okay? Yea should be fine as long as you rewrite the rewrite rules a little bit like so:&lt;/p&gt;&lt;code&gt;              if (!-e $request_filename) {&lt;br /&gt;
rewrite ^/subdir/[_0-9a-zA-Z-]+(/wp-.*) /subdir$1 last;&lt;br /&gt;
rewrite ^/subdir/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$ /subdir$1 last;&lt;br /&gt;
rewrite ^/subdir/[_0-9a-zA-Z-]+(/.*\.php)$ /subdir$1 last;&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;That wasn&#39;t so bad right? Yea, it confused the heck out of me though at first! So hopefully the next person won&#39;t have the same headaches! Cheers!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/5106062346796673213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/5106062346796673213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/5106062346796673213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/5106062346796673213'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/05/nginxs-rewrite-rules-for-wordpress-ms.html' title='Nginx&#39;s Rewrite Rules for WordPress MS In a Subdirectory'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-4466793737445948832</id><published>2011-04-28T09:23:00.000-07:00</published><updated>2011-04-28T09:23:53.294-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nginx"/><title type='text'>Nginx: Running FastCGI Under an Alias</title><content type='html'>&lt;p&gt;So yay, &lt;a href=&quot;http://nginx.org&quot;&gt;Nginx&lt;/a&gt; has been a new playground for me here. It&#39;s awesome thus far and I love the process management! I&#39;ve still got a bunch of exploring to do and I&#39;m super busy, so excuse the brevity!&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;FastCGI Issues With Aliases&lt;/h2&gt;&lt;p&gt;I&#39;ve scoured the web for help on this one and it seems like a common issue that people have had. Check out the &lt;a href=&quot;http://kovyrin.net/2006/05/30/nginx-php-fastcgi-howto/&quot;&gt;comment section on this post&lt;/a&gt; for a good starting point on this issue. But the usual trial and error was what ultimately got everything working for me.&lt;/p&gt;&lt;br /&gt;
Here&#39;s what I got working for me below:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
location /dir/ {&lt;br /&gt;
alias /usr/local/www/foo/;&lt;br /&gt;
index index.php;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
location ~ /dir/.*\.php$ {&lt;br /&gt;
if ($fastcgi_script_name ~ /dir(/.*\.php)$) {&lt;br /&gt;
set $valid_fastcgi_script_name $1;&lt;br /&gt;
}&lt;br /&gt;
fastcgi_pass 127.0.0.1:9000;&lt;br /&gt;
fastcgi_index index.php;&lt;br /&gt;
fastcgi_param SCRIPT_FILENAME /usr/local/www/foo$valid_fastcgi_script_name;&lt;br /&gt;
include fastcgi_params;&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;The problem I was running into was here:&lt;br /&gt;
&lt;code&gt;location ~ /dir/.*\.php$ {&lt;br /&gt;
if ($fastcgi_script_name ~ /dir(/.*\.php)$) {&lt;br /&gt;
set $valid_fastcgi_script_name $1;&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
I assumed &lt;code&gt;$fastcgi_script_name&lt;/code&gt; was going to be from &lt;code&gt;/foo&lt;/code&gt; but it was already being passed the alias (&lt;code&gt;/dir&lt;/code&gt;).&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I suppose I&#39;m just writing this to remind me in the future, but in case this helps anyone else, hope it makes sense!&lt;/p&gt;&lt;br /&gt;
Cheers!</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/4466793737445948832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/4466793737445948832' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/4466793737445948832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/4466793737445948832'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/04/nginx-running-fastcgi-under-alias.html' title='Nginx: Running FastCGI Under an Alias'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-4801664018070552191</id><published>2011-04-12T13:05:00.000-07:00</published><updated>2011-04-13T11:11:29.075-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>PHP: Encode Text Into Numeric HTML Entities While Keeping HTML</title><content type='html'>&lt;p&gt;If for whatever reason you need to have some text with special characters encoded into numeric HTML entities, but you also have HTML that you &lt;b&gt;do not&lt;/b&gt; want to encode, well here you have it!&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Why Numeric HTML Entities?&lt;/h2&gt;&lt;p&gt;If you&#39;ve worked with RSS before I&#39;m sure you understand the dilemma. For those of you that don&#39;t know, &lt;a href=&quot;http://people.w3.org/~dom/archives/2005/04/named-versus-numeric-entities/&quot;&gt;RSS has a problem with validating if there are non-numeric HTML entities&lt;/a&gt; (the normal output you get from &lt;code&gt;htmlentities()&lt;/code&gt;). More headaches, more &lt;a href=&quot;http://drincruz.blogspot.com/2008/09/xml-rfc822-and-w3cdtf-validation.html&quot;&gt;XML fun!&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Why Keep HTML?&lt;/h2&gt;&lt;p&gt;Well, to be honest, it&#39;s just because we have a special scenario right now. But, I&#39;m sure some people may find this helpful.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;*Note*&lt;/b&gt; The numeric HTML entities foreach loop is based off of &lt;a href=&quot;http://www.michaelkrenz.de/2006/07/09/encode-characters-as-numeric-entity-references-with-php/&quot;&gt;Michael Krenz&#39;s &lt;code&gt;xml_character_encode&lt;/code&gt; function&lt;/a&gt;. Thank you sir!&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
function htmlentities_keephtml($text) {&lt;br /&gt;
$entities = get_html_translation_table(HTML_ENTITIES);&lt;br /&gt;
unset($entities[&#39;&quot;&#39;]);&lt;br /&gt;
unset($entities[&#39;&lt;&#39;]);
    unset($entities[&#39;&gt;&#39;]);&lt;br /&gt;
unset($entities[&#39;&amp;&#39;]);&lt;br /&gt;
foreach ($entities as $k=&gt;$v)&lt;br /&gt;
$entities[$k] = &quot;&amp;#&quot; . ord($k) . &quot;;&quot;;&lt;br /&gt;
$s = array_keys($entities);&lt;br /&gt;
$r = array_values($entities);&lt;br /&gt;
&lt;br /&gt;
$text = html_entity_decode($text, ENT_NOQUOTES); // decode the named entities &lt;br /&gt;
$text = str_replace($s, $r, $text); // now encode to numeric entities&lt;br /&gt;
&lt;br /&gt;
return $text;&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/4801664018070552191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/4801664018070552191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/4801664018070552191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/4801664018070552191'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/04/php-encode-text-into-numeric-html.html' title='PHP: Encode Text Into Numeric HTML Entities While Keeping HTML'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-2059483046933947571</id><published>2011-04-09T22:13:00.000-07:00</published><updated>2011-04-19T11:34:39.231-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cloud"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><title type='text'>Amazon Cloud Drive Now Doesn&#39;t Support Multiple Downloads?!</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsG-j0BMIQkfn4msZl5JzXCbSwuVoeNb70diL5Vd1fpxqu9QtVxuciMrsYfFO_51ZKdJVBsISmhp0oEkrDsyc0_teUSPHpAkoCePb9TnhxUHhsrupi69CPPno72kQHCQoWAE8mc04Eitas/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;141&quot; width=&quot;322&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsG-j0BMIQkfn4msZl5JzXCbSwuVoeNb70diL5Vd1fpxqu9QtVxuciMrsYfFO_51ZKdJVBsISmhp0oEkrDsyc0_teUSPHpAkoCePb9TnhxUHhsrupi69CPPno72kQHCQoWAE8mc04Eitas/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h1&gt;Wait, what?!&lt;/h1&gt;&lt;p&gt;This change must be recent because I downloaded the only two albums I purchased from Amazon already and I definitely did NOT download them one at a time. I just so happen to have downloaded those files on my laptop and now I&#39;m on my desktop. Yes, I can simply power on my laptop, but what&#39;s the point of having my files in the Amazon Cloud Drive anyway then?!&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;So now, &lt;a href=&quot;http://www.amazon.com/99-Darkest-Pieces-Classical-Music/dp/B0048NUUS2/ref=sr_1_1?ie=UTF8&amp;qid=1302412303&amp;sr=8-1&quot;&gt;99 files for me to download&lt;/a&gt; one at a time?! (Yes, that&#39;s right classical music!) Not cool Amazon. Fail on you...&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;Update&lt;/b&gt;: Okay, between sometime after this post and now (April 19, 2011), Amazon has made multiple downloads possible again. Thank you Amazon!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/2059483046933947571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/2059483046933947571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/2059483046933947571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/2059483046933947571'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/04/amazon-cloud-drive-now-doesnt-support.html' title='Amazon Cloud Drive Now Doesn&#39;t Support Multiple Downloads?!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsG-j0BMIQkfn4msZl5JzXCbSwuVoeNb70diL5Vd1fpxqu9QtVxuciMrsYfFO_51ZKdJVBsISmhp0oEkrDsyc0_teUSPHpAkoCePb9TnhxUHhsrupi69CPPno72kQHCQoWAE8mc04Eitas/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-8951908879226424532</id><published>2011-04-07T13:23:00.000-07:00</published><updated>2011-04-07T13:23:12.458-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>Google Chrome Update and Now No Status Panel Icon?</title><content type='html'>No more &lt;a href=&quot;http://drincruz.blogspot.com/2011/03/google-chrome-100648127.html&quot;&gt;Google Chrome in my status panel&lt;/a&gt;?&lt;br /&gt;
&lt;br /&gt;
So, I guess this was only a month test. Okay, so what&#39;s the statistics on this test guys? ;)</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/8951908879226424532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/8951908879226424532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/8951908879226424532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/8951908879226424532'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/04/google-chrome-update-and-now-no-status.html' title='Google Chrome Update and Now No Status Panel Icon?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-3281957577529736777</id><published>2011-03-31T06:59:00.000-07:00</published><updated>2011-03-31T06:59:36.812-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blurb"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>New Blogger Views</title><content type='html'>&lt;h2&gt;&lt;a href=&quot;http://googleblog.blogspot.com/2011/03/fresh-new-perspectives-for-your-blog.html&quot;&gt;Five New Blogger Views&lt;/a&gt;&lt;/h2&gt;Google introduced five new blogger designs this morning. If you are browsing a blogger site, simply append &quot;/view&quot; to see the available ones. &lt;br /&gt;
&lt;br /&gt;
I personally think I like the &lt;a href=&quot;http://drincruz.blogspot.com/view/timeslide&quot;&gt;&quot;slider&quot; view&lt;/a&gt;. The other views probably won&#39;t work as well for news-like sites that user experience is based off of chronological posts.&lt;br /&gt;
&lt;br /&gt;
Still very cool!&lt;br /&gt;
&lt;br /&gt;
Cheers!</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/3281957577529736777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/3281957577529736777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/3281957577529736777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/3281957577529736777'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/03/new-blogger-views.html' title='New Blogger Views'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-188921440496970607</id><published>2011-03-25T08:40:00.000-07:00</published><updated>2011-03-25T08:40:36.373-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="scripting"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><title type='text'>Printing a Specific Range With sed</title><content type='html'>&lt;h2&gt;Issue&lt;/h2&gt;&lt;p&gt;You want to print only a specific range of lines from a file/input.&lt;/p&gt;&lt;h2&gt;Solution&lt;/h2&gt;&lt;p&gt;Use &lt;code&gt;sed&lt;/code&gt;! Say for example you want to print out lines 15 through 30, you can do that like so:&lt;br /&gt;
&lt;code&gt;sed -n &#39;15,30p&#39; [file]&lt;/code&gt;&lt;/p&gt;&lt;h2&gt;Real World Scenario&lt;/h2&gt;&lt;p&gt;Okay, so here&#39;s how I actually ended up using it; I have a process to publish files across hundreds of sites. I have a PHP script that prints out site information (one site per line). I also have another PHP script that handles publishing that takes in the site name as an argument. See where I&#39;m going here? ;)&lt;/p&gt;&lt;p&gt;So what I need to do is loosely pseudo-coded as follows:&lt;br&gt;&lt;br /&gt;
&lt;code&gt;for site in siteinfo.php&lt;br /&gt;
publish.php $site&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Where does the &lt;code&gt;sed&lt;/code&gt; command come in handy? Well, like I said I have hundreds of sites to publish to, so a &lt;code&gt;sleep&lt;/code&gt; comes in handy to give the servers a little break. So, I ended up breaking it up as follows:&lt;br /&gt;
&lt;code&gt;for s in `/usr/local/bin/php sites.php|sed -n &#39;1,100p&#39;`; do /usr/local/bin/php publish.php $s; done | tee -a $log;&lt;br /&gt;
sleep 300;&lt;br /&gt;
&lt;br /&gt;
for s in `/usr/local/bin/php sites.php|sed -n &#39;101,200p&#39;`; do /usr/local/bin/php publish.php $s; done | tee -a $log;&lt;br /&gt;
sleep 300;&lt;br /&gt;
&lt;br /&gt;
etc...&lt;br /&gt;
etc...&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/188921440496970607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/188921440496970607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/188921440496970607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/188921440496970607'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/03/printing-specific-range-with-sed.html' title='Printing a Specific Range With sed'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-1993236128995102943</id><published>2011-03-23T07:11:00.000-07:00</published><updated>2011-03-23T07:11:24.235-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chromium"/><category scheme="http://www.blogger.com/atom/ns#" term="cr48"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>CR-48: Dev Channel Users Are Down</title><content type='html'>So, if you happen to be on the dev channel, the nightly build two nights ago has a serious issue. There&#39;s word that a fix will be out soon, but if you wanted to get back up online sooner, try jumping back on the beta channel. &lt;br /&gt;
&lt;br /&gt;
Just the usual struggles with being on the dev channel...&lt;br /&gt;
&lt;br /&gt;
Cheers!</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/1993236128995102943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/1993236128995102943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1993236128995102943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1993236128995102943'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/03/cr-48-dev-channel-users-are-down.html' title='CR-48: Dev Channel Users Are Down'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-1045688151505416381</id><published>2011-03-17T20:12:00.000-07:00</published><updated>2011-03-17T20:39:27.866-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geek writings"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>Google Bookmarks --Really, Bookmarks! (I think)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9uW4EQNj3Wm2cE8M99aGmWWCo2VD6hF5wetk7oAvTse5q6J5TAlDLHhwY0gnJuQfeeE3fZGbwPYxVlLeksVmBzLdXmzWKGwCs3ff6uXROunjvK9w1hnruidgVAnveE9t8JL7PMyOYgt0_/s640/IMG_20110317_225607.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear:right; float:right;margin-left:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje-qWpOCPrIScOhM-nlcUMQZntMO3S-EO3HkYNSNVMpiarhRGv_-uZOxgLRBgp7ZkmY37REcAH9t8K01uSsBAwK-LupcaGLNlCUaqAumdudxwVz_jmtgoyoZklolRpEwOMd2MUCGOPZtA-/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;I just got these and thought they were pretty rad. But are they bookmarks? If they are, isn&#39;t it a bit counterintuitive if we&#39;re supposed to be supporting ebooks in lieu of traditional books? ;)&lt;br /&gt;
&lt;br /&gt;
I thought I would share anyway. I think I&#39;ll end up hanging these up. Now where to put them? In the office? In the home office? In the man cave? Decisions decisions...&lt;br /&gt;
&lt;br /&gt;
But thanks &lt;a href=&quot;http://books.google.com/&quot;&gt;Google&lt;/a&gt;! These made my day!&lt;br /&gt;
&lt;br /&gt;
Cheers!</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/1045688151505416381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/1045688151505416381' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1045688151505416381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/1045688151505416381'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/03/google-bookmarks-really-bookmarks-i.html' title='Google Bookmarks --Really, Bookmarks! (I think)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje-qWpOCPrIScOhM-nlcUMQZntMO3S-EO3HkYNSNVMpiarhRGv_-uZOxgLRBgp7ZkmY37REcAH9t8K01uSsBAwK-LupcaGLNlCUaqAumdudxwVz_jmtgoyoZklolRpEwOMd2MUCGOPZtA-/s72-c" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-8103743327834834107</id><published>2011-03-14T07:33:00.000-07:00</published><updated>2011-03-14T07:33:19.925-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geek writings"/><category scheme="http://www.blogger.com/atom/ns#" term="math"/><title type='text'>Pi Day or Half-Tau Day?</title><content type='html'>&lt;h2&gt;&lt;a href=&quot;http://www.cnn.com/2011/TECH/innovation/03/14/pi.tau.math/index.html?eref=rss_topstories&amp;utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+rss%2Fcnn_topstories+%28RSS%3A+Top+Stories%29&quot;&gt;Pi Day or Half-Tau Day?&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;
&lt;p&gt;I&#39;ve been happily celebrating pi day for quite some time now and it seems to have been gaining in popularity; perhaps due to &lt;a href=&quot;http://drincruz.blogspot.com/2011/02/geek-culture-will-never-dieor-be.html&quot;&gt;the rise of geek culture (or lack thereof)&lt;/a&gt;? Tau is awesome, but it&#39;s base is pi nonetheless. I&#39;m a pi fan and probably always will be. &lt;b&gt;Though&lt;/b&gt;, tau does make good weather for a lovely BBQ. I smell a tau BBQ celebration in the making!&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;a href=&quot;http://drincruz.blogspot.com/2009/02/happy-1234567890-epoch-time-est.html&quot;&gt;Auspicious numbers&lt;/a&gt; are awesome to have, another day sounds even better. I welcome tau day with open arms and hopefully a BBQ pit.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Unfortunately, I forgot to wear my pi shirt today.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/8103743327834834107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/8103743327834834107' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/8103743327834834107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/8103743327834834107'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/03/pi-day-or-half-tau-day.html' title='Pi Day or Half-Tau Day?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1014045108168426651.post-5064390265094075012</id><published>2011-03-10T06:28:00.000-08:00</published><updated>2011-03-10T06:28:55.183-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>Google Chrome 10.0.648.127</title><content type='html'>&lt;h2&gt;Chrome in my status panel?&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHmv91KeT-5xjfNlqYJcUIQAD9FBdVt4wPWbTMwVmRkHNahnuLgrgTf0djn9jOFIXj5m5IiQpj05W_wkvgzbzkiyId9JOAze23eP60KpCWuOwONqU9OukpkUGTEidUmxi8hecsO9ElD76i/&quot; imageanchor=&quot;1&quot; style=&quot;clear:left; float:left;margin-right:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;58&quot; width=&quot;297&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHmv91KeT-5xjfNlqYJcUIQAD9FBdVt4wPWbTMwVmRkHNahnuLgrgTf0djn9jOFIXj5m5IiQpj05W_wkvgzbzkiyId9JOAze23eP60KpCWuOwONqU9OukpkUGTEidUmxi8hecsO9ElD76i/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;I noticed recently that Google Chrome, even when not started is already in my status panel. Interesting. Is this to speed something up? No complaints as of now, but hey what&#39;s it for? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Anyhow, I&#39;ll find out later. Off to fill myself up with caffeine!</content><link rel='replies' type='application/atom+xml' href='http://drincruz.blogspot.com/feeds/5064390265094075012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1014045108168426651/5064390265094075012' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/5064390265094075012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1014045108168426651/posts/default/5064390265094075012'/><link rel='alternate' type='text/html' href='http://drincruz.blogspot.com/2011/03/google-chrome-100648127.html' title='Google Chrome 10.0.648.127'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13606416853152074926</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHmv91KeT-5xjfNlqYJcUIQAD9FBdVt4wPWbTMwVmRkHNahnuLgrgTf0djn9jOFIXj5m5IiQpj05W_wkvgzbzkiyId9JOAze23eP60KpCWuOwONqU9OukpkUGTEidUmxi8hecsO9ElD76i/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry></feed>