{"id":26010,"date":"2016-04-12T17:06:30","date_gmt":"2016-04-12T15:06:30","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=26010"},"modified":"2016-04-12T17:06:30","modified_gmt":"2016-04-12T15:06:30","slug":"open-source-software-is-so-reassuring","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2016\/04\/12\/open-source-software-is-so-reassuring\/","title":{"rendered":"Open Source software is so reassuring &#8230;"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>There&#8217;s nothing like working on a problem for a few days and getting to the reassuring <a href=\"https:\/\/github.com\/bestpractical\/rt\/blob\/rt-4.4.0\/lib\/RT\/Interface\/Web\/Handler.pm#L256\">code snippet<\/a> like this:<\/p>\n<pre class=\"brush: perl; light: true; title: ; notranslate\" title=\"\">\r\nsub PSGIApp {\r\n    my $self = shift;\r\n\r\n    # XXX: this is fucked\r\n    require HTML::Mason::CGIHandler;\r\n    require HTML::Mason::PSGIHandler::Streamy;\r\n    my $h = RT::Interface::Web::Handler::NewHandler('HTML::Mason::PSGIHandler::Streamy');\r\n\r\n    $self-&gt;InitSessionDir;\r\n\r\n    my $mason = sub {\r\n        my $env = shift;\r\n\r\n        # mod_fastcgi starts with an empty %ENV, but provides it on each\r\n        # request.  Pick it up and cache it during the first request.\r\n        $ENV{PATH} \/\/= $env-&gt;{PATH};\r\n\r\n        # HTML::Mason::Utils::cgi_request_args uses $ENV{QUERY_STRING} to\r\n        # determine if to call url_param or not\r\n        # (see comments in HTML::Mason::Utils::cgi_request_args)\r\n        $ENV{QUERY_STRING} = $env-&gt;{QUERY_STRING};\r\n<\/pre>\n<p>The first comment\u00a0is misleading. It throws you off. Almost make you close the file and go somewhere else. But that&#8217;s just a little frustration from the last few days. The solution to my problem is here too&#8230; And that&#8217;s when the warm, cozy feeling I have for the Open Source Software kicks in.<\/p>\n<p>P.S.: both the problem and the solution will be posted separately.<\/p>\n<p>&nbsp;<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>There&#8217;s nothing like working on a problem for a few days and getting to the reassuring code snippet like this: sub PSGIApp { my $self = shift; # XXX: this is fucked require HTML::Mason::CGIHandler; require HTML::Mason::PSGIHandler::Streamy; my $h = RT::Interface::Web::Handler::NewHandler(&#8216;HTML::Mason::PSGIHandler::Streamy&#8217;); $self-&gt;InitSessionDir; my $mason = sub { my $env = shift; # mod_fastcgi starts with an &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2016\/04\/12\/open-source-software-is-so-reassuring\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Open Source software is so reassuring &#8230;<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Open Source software is so reassuring ... #programming #WebDev #OpenSource","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,18,62,1334],"tags":[2418,3150,1330],"keyring_services":[],"class_list":["post-26010","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","category-technology","category-web-work","tag-humor","tag-request-tracker","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":26031,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/04\/18\/single-sign-on-between-sugarcrm-and-request-tracker\/","url_meta":{"origin":26010,"position":0},"title":"Single Sign-On Between SugarCRM and Request Tracker","author":"Leonid Mamchenkov","date":"April 18, 2016","format":false,"excerpt":"As mentioned\u00a0before,\u00a0over the last few month I've been involved in quite a few integration projects, using mostly SugarCRM and Request Tracker. \u00a0One of the interesting challenges was the Single Sign-On (SSO) between the two. The interesting bit comes from these facts: Different technologies: SugarCRM is written in PHP, while Request\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":22534,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/09\/16\/phpdotenv-loads-environment-variables-from-env-file-to-getenv-_env-and-_server-automagically\/","url_meta":{"origin":26010,"position":1},"title":"phpdotenv &#8211; Loads environment variables from .env file to getenv(), $_ENV and $_SERVER automagically","author":"Leonid Mamchenkov","date":"September 16, 2014","format":"link","excerpt":"phpdotenv - Loads environment variables from .env file to getenv(), $_ENV and $_SERVER automagically","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26813,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/10\/31\/easier-aws-cli-with-docker\/","url_meta":{"origin":26010,"position":2},"title":"Easier AWS CLI with Docker","author":"Leonid Mamchenkov","date":"October 31, 2016","format":false,"excerpt":"Here is a handy blog post that shows how to simplify the installation and running of the Amazon AWS command line commands, using Docker. \u00a0With the Dockerfile like this: [code] FROM python:2.7 ENV AWS_DEFAULT_REGION='[your region]' ENV AWS_ACCESS_KEY_ID='[your access key id]' ENV AWS_SECRET_ACCESS_KEY='[your secret]' RUN pip install awscli CMD \/bin\/bash [\/code]\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":25961,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/03\/20\/single-sign-on-sugarcrm-roundcube-multiple-php-sessions\/","url_meta":{"origin":26010,"position":3},"title":"Single Sign-On with SugarCRM and RoundCube Using Multiple PHP Sessions","author":"Leonid Mamchenkov","date":"March 20, 2016","format":false,"excerpt":"I am currently involved in an interesting integration project at work. \u00a0As part of it, we need to create a single sign-on process between\u00a0SugarCRM (version 6.5.20) and RoundCube (version 1.1.4) webmail application. \u00a0RoundCube webmail is being displayed within the iframe inside the SugarCRM user interface, so it would help if\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26385,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/08\/30\/micro-a-modern-and-intuitive-terminal-based-text-editor\/","url_meta":{"origin":26010,"position":4},"title":"Micro &#8211; a modern and intuitive terminal-based text editor","author":"Leonid Mamchenkov","date":"August 30, 2016","format":false,"excerpt":"Micro is a modern console based text editor, written in Go. \u00a0Version 1.0.0 has been recently released. \u00a0It's cross-platform (installs as a single binary) and supports a variety of features: Easy to use and to install No dependencies or external files are needed -- just the binary you can download\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"micro-solarized","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/08\/micro-solarized-500x319.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":24603,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/08\/19\/custom-single-sign-on-with-nginx-and-auth-request-module\/","url_meta":{"origin":26010,"position":5},"title":"Custom Single Sign-On with Nginx and Auth Request Module","author":"Leonid Mamchenkov","date":"August 19, 2015","format":false,"excerpt":"In a recent project I crashed into a wall. \u00a0At least for a couple of days that is. \u00a0The requirement was to integrate the Request Tracker (aka RT) installation on CentOS 7 server with Nginx to\u00a0a client's company single sign-on solution. \u00a0Which wasn't LDAP. \u00a0Or Active Directory. \u00a0Or anything standard\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/26010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=26010"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/26010\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=26010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=26010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=26010"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=26010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}