title_0

{"item":{"status":"visible","url":"\/2012\/06\/30\/Nginx--Have-static-and-PHP-files-play-nice-together\/","trash":"","name":"Nginx--Have-static-and-PHP-files-play-nice-together","parent":"","title":"Nginx: Have static and PHP files play nice together","date":"2012-06-30 17:00:00","filepath":"posts\/20120630_Nginx--Have-static-and-PHP-files-play-nice-together.xml.json","type":"post","content":"<p><img style=\"float: left; margin-left: 10px; margin-right: 10px;\" src=\"http:\/\/www.8bitrobot.com\/media\/uploads\/2012\/01\/information.png\" alt=\"\" width=\"72\" \/>While trying to configure <a href=\"http:\/\/nginx.org\/\">Nginx<\/a> and PHP so that the PHP files would run from the same directory as static files, the error \"<em>290 rewrite or internal redirection cycle while internally redirecting to \"\/index.php\"...<\/em>\" persistently recurred.<\/p>\n<p>Everything worked fine after changing nginx.conf to the following (inside <em>server {<\/em>):<\/p>\n<pre style=\"padding-left: 30px; clear: both;\">root html;\nindex index.php index.html index.htm;\nlocation \/ {\n try_files $uri $uri\/ \/index.php?$args;\n}\nlocation ~ \\.php$ {\n include fastcgi_params;\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n fastcgi_pass 127.0.0.1:9123;\n}<\/pre>\n<p><em><a href=\"http:\/\/wiki.nginx.org\/Pitfalls#Proxy_Everything\">Source<\/a>&nbsp;(in the \"Also Good Section\")<\/em><\/p>"}}

title_1

{"item":{"status":"visible","url":"\/2012\/06\/29\/How-to-send-URL-parameters-in-Backbone-js\/","trash":"","name":"How-to-send-URL-parameters-in-Backbone-js","parent":"","title":"How to send URL parameters in Backbone.js","date":"2012-06-29 00:00:37","filepath":"posts\/20120629_How-to-send-URL-parameters-in-Backbone-js.xml.json","type":"post","content":"<p><a href=\"http:\/\/backbonejs.org\/\"><img style=\"margin-left: 10px; margin-right: 10px; float: left;\" src=\"http:\/\/www.8bitrobot.com\/media\/uploads\/backbone-300x300.png\" alt=\"\" width=\"72\" \/><\/a>Say you want to request a collection from the server in <a href=\"http:\/\/backbonejs.org\/\">backbone.js<\/a>, but don't want to receive every single item available. &nbsp;Instead, you want to receive only the first 100 items. &nbsp;Well, <a href=\"http:\/\/api.jquery.com\/jQuery.ajax\/\">jQuery.ajax<\/a> options can be passed directly as fetch options.&nbsp;<sup><a href=\"http:\/\/backbonejs.org\/#Collection-fetch\">docs<\/a><\/sup><\/p>\n<p>So, when you want to fetch the collection call the following:<\/p>\n<pre style=\"padding-left: 30px;\">instance_of_your_collection.fetch({data: {count: 100}});<\/pre>\n<p>If there are problems with the above, try parameterizing the data:<\/p>\n<pre style=\"padding-left: 30px;\">instance_of_your_collection.fetch({data: $.param({count: 100})});<\/pre>\n<p>On the server side, if you are using the <a href=\"http:\/\/www.slimframework.com\">Slim Framework<\/a>&nbsp;with PHP, you can check the parameters like so:<\/p>\n<pre style=\"padding-left: 30px;\">$app-&gt;request()-&gt;params('count');<\/pre>\n<p>&nbsp;<\/p>"}}

title_2

{"item":{"status":"visible","url":"\/2012\/06\/28\/Spotlight--The-Rip-Tide---Beirut\/","trash":"","name":"Spotlight--The-Rip-Tide---Beirut","parent":"","title":"Spotlight: The Rip Tide - Beirut","date":"2012-06-28 22:41:39","filepath":"posts\/20120628_Spotlight--The-Rip-Tide---Beirut.xml.json","type":"post","content":"<p>Here's a gorgeous music video by <a href=\"http:\/\/www.beirutband.com\/\">Beirut<\/a> called The Rip Tide for your viewing pleasure.<\/p>\n<p style=\"text-align: center;\"><iframe src=\"http:\/\/www.youtube.com\/embed\/sX7fd8uQles\" frameborder=\"0\" width=\"420\" height=\"236\"><\/iframe><\/p>\n<p>It's a calling for my deep yearning to be on the deep sea and return to our mother's great bosom in perpetual undulation and rocking. &nbsp;The sea is like one grand&nbsp;lullaby.<\/p>"}}

title_3

{"item":{"status":"visible","url":"\/2012\/06\/26\/How-to-run-PHP-on-Nginx-with-Slim-Framework-on-Windows\/","trash":"","name":"How-to-run-PHP-on-Nginx-with-Slim-Framework-on-Windows","parent":"","title":"How to run PHP on Nginx with Slim Framework on Windows","date":"2012-06-26 20:34:53","filepath":"posts\/20120626_How-to-run-PHP-on-Nginx-with-Slim-Framework-on-Windows.xml.json","type":"post","content":"<p><img style=\"margin-left: 10px; margin-right: 10px; float: left;\" src=\"http:\/\/www.8bitrobot.com\/media\/uploads\/2012\/01\/gear.png\" alt=\"\" width=\"60\" height=\"64\" \/>I found myself wanting to test some PHP on my local Windows machine and wanted a lightweight, fast solution besides <a href=\"http:\/\/httpd.apache.org\/docs\/2.0\/platform\/windows.html\">Apache<\/a>. &nbsp;My motivation was getting a test environment with a&nbsp;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\">RESTful<\/a>&nbsp;serverside api for <a href=\"http:\/\/backbonejs.org\/\">backbone.js<\/a> testing.<\/p>\n<p>The resulting toolchain is comprised of:<\/p>\n<ol>\n<li><a href=\"http:\/\/nginx.org\/en\/docs\/windows.html\">Nginx<\/a> (a tiny, fast HTTP server)<\/li>\n<li><a href=\"http:\/\/windows.php.net\">PHP<\/a><\/li>\n<li><a href=\"http:\/\/www.slimframework.com\/\">Slim Framework<\/a>&nbsp;(framework for writing RESTful APIs and applications)<\/li>\n<\/ol>\n<p>Being no fan of PHP, getting this configuration was like putting salt on a wound, but it might be useful for those that want to get up and running in a very short time. &nbsp;I'll keep the explanations to a minimum to stay true to an&nbsp;<a href=\"http:\/\/www.8bitrobot.com\/tag\/impatient%20guide\/\">Impatient Guide<\/a>.<\/p>\n<ul>\n<li><a href=\"http:\/\/nginx.org\/en\/docs\/windows.html\">Download<\/a> and unzip <strong>nginx<\/strong> to <em>c:\\nginx-xxx\\&nbsp;<\/em><\/li>\n<li><a href=\"http:\/\/windows.php.net\/download\/\">Download<\/a> and unzip PHP to <em>c:\\nginx-xxx\\php\\&nbsp;<\/em><\/li>\n<li>Open <em>c:\\nginx-xxx\\conf\\nginx.config<\/em>&nbsp;in a text editor and uncomment the .php (FastCGI) location config to look like this (take note of the bold items):<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">location ~ \\.php$ {\n root <strong>scripts<\/strong>;\n fastcgi_pass 127.0.0.1:<strong>9123<\/strong>;\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n include fastcgi_params;\n try_files $uri $uri\/ \/index.php?$args;\n}<\/pre>\n<ul>\n<li><a href=\"http:\/\/wiki.nginx.org\/PHPFastCGIOnWindows\">Download<\/a> RunHiddenConsole.exe to <em>c:\\nginx-xxx\\php\\&nbsp;<\/em><\/li>\n<li>Create a batch file called <em>start-php-fcgi.bat<\/em>&nbsp;in <em>c:\\nginx-xxx\\<\/em> with the following (take note of the bold items):<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">@ECHO OFF\nECHO Starting PHP FastCGI...\nset PATH=C:\\nginx-<strong>xxx<\/strong>\\php;%PATH%\nRunHiddenConsole.exe C:\\nginx-<strong>xxx<\/strong>\\php\\php-cgi.exe -b 127.0.0.1:<strong>9123<\/strong><\/pre>\n<div>\n<ul>\n<li>Your PHP files will be put in a directory called <em>scripts<\/em> so <a href=\"http:\/\/www.slimframework.com\">download<\/a>&nbsp;the Slim Framework into <em>c:\\nginx-xxx\\scripts\\&nbsp;<\/em><\/li>\n<li>Start nginx and FastCGI via a console window:<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">&gt; cd c:\\nginx-<strong>xxx<\/strong>\\\n&gt; start nginx.exe\n&gt; start-php-fcgi.bat<\/pre>\n<\/div>\n<ul>\n<li>&nbsp;Confirm the installation by browsing to the Slim welcome page:&nbsp;<a href=\"http:\/\/localhost\/index.php\">http:\/\/localhost\/index.php<\/a><\/li>\n<li>Confirm Slim's REST handling with <a href=\"http:\/\/curl.haxx.se\/download.html\">Curl<\/a>:<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">&gt; curl.exe -i -X DELETE localhost\/index.php\/delete\nHTTP\/1.1 200 OK\nServer: nginx\/1.2.1\nDate: Tue, 26 Jun 2012 00:35:50 GMT\nContent-Type: text\/html\nTransfer-Encoding: chunked\nConnection: keep-alive\nX-Powered-By: PHP\/5.4.4\n\nThis is a DELETE route<\/pre>\n<ul>\n<li>That's it. &nbsp;You're done. &nbsp;<strong>High Five!!<\/strong><\/li>\n<\/ul>\n<p>One neat thing about this toolchain is you can zip everything up and make it portable. &nbsp;There is no need to mess with installers, environment variables, etc...<\/p>\n<p>Confused? &nbsp;Visit&nbsp;<a href=\"http:\/\/wiki.nginx.org\/PHPFastCGIOnWindows\">PHPFastCGIOnWindows<\/a>.<\/p>"}}

title_4

{"item":{"status":"visible","url":"\/2012\/06\/22\/Banana-mascot-s-confidence-deflates\/","trash":"","name":"Banana-mascot-s-confidence-deflates","parent":"","title":"Banana mascot's confidence deflates","date":"2012-06-22 18:40:13","filepath":"posts\/20120622_Banana-mascot-s-confidence-deflates.xml.json","type":"post","content":"<p>These inflatable suits are amazing and are probably a blast to joke around in.<\/p>\n<p style=\"text-align: center;\"><iframe src=\"http:\/\/www.youtube.com\/embed\/Y-1vLkk-mH4\" frameborder=\"0\" width=\"420\" height=\"315\"><\/iframe><\/p>"}}

title_5

{"item":{"status":"visible","url":"\/2012\/06\/06\/Filestack---A-simple-open-source-blogging-platform\/","trash":"","name":"Filestack---A-simple-open-source-blogging-platform","parent":"","title":"Filestack - A simple open source blogging platform","date":"2012-06-06 18:26:56","filepath":"posts\/20120606_Filestack---A-simple-open-source-blogging-platform.xml.json","type":"post","content":"<p><img style=\"float: left; margin-left: 10px; margin-right: 10px;\" src=\"http:\/\/www.8bitrobot.com\/media\/uploads\/files_med.png\" alt=\"\" width=\"40\" \/>After one hack to many, I've decided to abandon my <a href=\"http:\/\/wordpress.org\/\">WordPress<\/a> installation on <a href=\"http:\/\/dreamhost.com\/\">Dreamhost<\/a> and create my own lightweight replacement. &nbsp;WordPress is just too large a target for hackers and comment spammers making a small blog a chore to maintain and backup.<\/p>\n<p>Thus,&nbsp;<a href=\"http:\/\/www.8bitrobot.com\/Software\/Filestack\/\">Filestack<\/a> was born. &nbsp;It's an open source, Apache 2.0 licensed, blog platform built on Django.<\/p>\n<p><strong>Here's it's raison d'&ecirc;tre:<\/strong><\/p>\n<ul>\n<li>Easy content storage with files (back up is painless)<\/li>\n<li>Single user<\/li>\n<li>Basic CMS features: Scheduled publishing, Categories, Tags, etc...<\/li>\n<li>WYSIWYG HTML editor<\/li>\n<li>No destructive actions, like content deletion, available via HTTP<\/li>\n<li>Quick serving of a WordPress export file<\/li>\n<\/ul>\n<p><strong>Bonus Features:<\/strong><\/p>\n<ul>\n<li>Themeable and with Django templates<\/li>\n<li>File upload helper<\/li>\n<li>Encapsulated Django app with quick installation<\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.8bitrobot.com\/Filestack\/\">Filestack<\/a> was built with <a href=\"http:\/\/python.org\/\">Python<\/a>, <a href=\"https:\/\/www.djangoproject.com\/\">Django<\/a>, <a href=\"http:\/\/jquery.com\/\">jQuery<\/a>, <a href=\"http:\/\/960.gs\">960.gs<\/a>, <a href=\"http:\/\/www.fancybox.net\">fancybox<\/a>, and <a href=\"http:\/\/www.tinymce.com\/\">TinyMCE<\/a>.<\/p>\n<p>You can find the <a href=\"https:\/\/github.com\/DeanCutlet\/filestack\">source code<\/a> on GitHub.<\/p>\n<p><strong>Screenshots:<\/strong><\/p>\n<p><strong><\/strong>You are looking at it. &nbsp;<a href=\"http:\/\/www.8bitrobot.com\">8BitRobot.com<\/a> is running <a href=\"http:\/\/www.8bitrobot.com\/Filestack\/\">Filestack<\/a>&nbsp;with the default <em>Newsprint<\/em> theme.<\/p>"}}

title_6

{"item":{"status":"visible","url":"\/2012\/06\/06\/Venus-transit-2012\/","trash":"","name":"Venus-transit-2012","parent":"","title":"Venus transit 2012","date":"2012-06-06 00:24:12","filepath":"posts\/20120606_Venus-transit-2012.xml.json","type":"post","content":"<p>Here's a photo of the Venus transit across the Sun on 2012\/06\/05 at about 5:00 pm PDT (UTC 0:00).<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.8bitrobot.com\/media\/uploads\/venus.jpg\"><img src=\"http:\/\/www.8bitrobot.com\/media\/uploads\/venus.jpg\" alt=\"\" width=\"256\" \/><\/a><\/p>\n<p style=\"text-align: left;\">Here I'm using a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Newtonian_telescope\">Newtonian Reflector<\/a>&nbsp;telescope to project the image of the sun, its sunspots, and the ass side of Venus on a wall. &nbsp;The process can be quite dangerous, as I've burned the base of a couple of lenses. Oops!<\/p>\n<p style=\"text-align: left;\"><em>It's best to break something while using it, than to let it go to waste.<\/em><\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/venustransit.nasa.gov\/2012\/transit\/\"><em>More info from NASA<\/em><\/a><\/p>"}}

title_7

{"item":{"status":"visible","url":"\/2012\/04\/10\/kyary-sometimes-you-feel-like-a-nut\/","trash":"","name":"kyary-sometimes-you-feel-like-a-nut","parent":"","title":"Kyary: Sometimes you feel like a nut","date":"2012-04-10 10:49:19","filepath":"posts\/20001358_kyary-sometimes-you-feel-like-a-nut.xml.json","type":"post","content":"<p style=\"text-align: center;\"><a href=\"http:\/\/kyarypon.tumblr.com\/post\/8603107526\"><img class=\"alignnone\" title=\"kyary sofa\" src=\"http:\/\/28.media.tumblr.com\/tumblr_lpkfouL2wq1r0r5vbo1_250.jpg\" alt=\"kyary sofa\" width=\"250\" height=\"187\" \/><\/a> <a href=\"http:\/\/kyarypon.tumblr.com\/post\/8603107526\"><img class=\"alignnone\" title=\"Kyary face sofa\" src=\"http:\/\/26.media.tumblr.com\/tumblr_lpkfouL2wq1r0r5vbo2_250.jpg\" alt=\"Kyary face sofa\" width=\"250\" height=\"187\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/kyarypon.tumblr.com\/post\/8603107526\"><img class=\"alignnone\" title=\"Kyary sofa fail\" src=\"http:\/\/29.media.tumblr.com\/tumblr_lpkfouL2wq1r0r5vbo3_500.jpg\" alt=\"Kyary sofa fail\" width=\"480\" height=\"359\" \/><\/a><\/p>\n<em>via <a href=\"http:\/\/kyarypon.tumblr.com\/post\/8603107526\">Only You Kyary Pon<\/a>.<\/em>"}}

title_8

{"item":{"status":"visible","url":"\/2012\/04\/06\/daily-dose-of-cuteness\/","trash":"","name":"daily-dose-of-cuteness","parent":"","title":"Daily dose of cuteness","date":"2012-04-06 08:47:52","filepath":"posts\/20001505_daily-dose-of-cuteness.xml.json","type":"post","content":"<p style=\"text-align: center;\"><iframe width=\"560\" height=\"315\" src=\"http:\/\/www.youtube.com\/embed\/3fd-v3DYT7U\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\nKitten scared by a\u00a0vacuum\u00a0cleaner. \u00a0Awwww, how cute!"}}

title_9

{"item":{"status":"visible","url":"\/2012\/04\/05\/contraceptive-for-men\/","trash":"","name":"contraceptive-for-men","parent":"","title":"Big Pharma killer: Contraceptive for men","date":"2012-04-05 11:27:36","filepath":"posts\/20001489_contraceptive-for-men.xml.json","type":"post","content":"<a href=\"http:\/\/www.wired.com\/magazine\/2011\/04\/ff_vasectomy\/all\/1\"><img class=\"alignleft size-full wp-image-1480\" style=\"margin-right: 10px; margin-bottom: 10px;\" title=\"rx medicine\" src=\"http:\/\/www.8bitrobot.com\/media\/uploads\/2012\/03\/rx.png\" alt=\"rx medicine\" width=\"67\" height=\"70\" \/><\/a>Researcher\u00a0Sujoy Guha in India has created a new contraceptive that only needs to be applied once, lasts for 10+ years, is reversable, is extremely cheap, ... and is for <strong>men.<\/strong>\n\nInstead of an invasive vasectomy procedure, a simple procedure of injecting a gel called Vasagel into the\u00a0vas deferens tubes in a man's testicles. \u00a0After about 72 hours, the man is no longer potent because sperm are broken apart when passing by this layer of gel (due to the\u00a0<a href=\"http:\/\/etd.lib.fsu.edu\/theses\/available\/etd-03252004-143258\/unrestricted\/02-hhr-Chapter1.pdf\">polyelectrolytic effect<\/a>).\n\nWhen the man decides to have a planned pregnancy, he will undergo another procedure where water and baking soda is injected into the same locations to flush out the Vasagel.\n\nThe materials used are extremely cheap and a pharmaceutical companies would be losing out of massive amounts of money selling contraceptives to women.\n\nNow this won't be available in the US for a really long while, due to drug approval processes and, more importantly, due to Big Pharma lobbying groups. \u00a0However, since the procedure is at the final stage of approval in India, men can take a nice vacation to India to get temporarily neutered. \u00a0That vacation would be much cheaper than raising an unwanted child!\n\nread <a href=\"http:\/\/www.wired.com\/magazine\/2011\/04\/ff_vasectomy\/all\/1\">the article on Wired<\/a>."}}
 

Lorem Ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

 
This page is best viewed with Firefox 3.5+, Chrome 5+, Safari 5+, Opera 10.6+, IE 9+
Copyright © 2014 8bitrobot.com