<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="HandheldFriendly" content="True" />
<meta name="MobileOptimized" content="320" />

<title>Naveen&#039;s blog</title>

<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="http://naveensrinivasan.azurewebsites.net/xmlrpc.php">

<!-- All in One SEO Pack 2.3.4.2 by Michael Torbert of Semper Fi Web Design[286,340] -->
<meta name="description" itemprop="description" content="Here is my learning of how I debugged the CrashLoopBackOff in kubernetes when the pod wasn't starting. I wanted to deploy the jenkins docker image in the" />

<meta name="keywords" itemprop="keywords" content="docker,shell,health,adevntcode,adventcode,fsharp,github,etw,iis,yoga" />
<link rel='next' href='http://naveensrinivasan.azurewebsites.net/index.php/page/2/' />

<link rel="canonical" href="http://naveensrinivasan.azurewebsites.net/" />
<!-- /all in one seo pack -->
<link rel="alternate" type="application/rss+xml" title="Naveen&#039;s Blog &raquo; Feed" href="http://naveensrinivasan.azurewebsites.net/index.php/feed/" />
<link rel="alternate" type="application/rss+xml" title="Naveen&#039;s Blog &raquo; Comments Feed" href="http://naveensrinivasan.azurewebsites.net/index.php/comments/feed/" />
		<script type="text/javascript">
			window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/","ext":".png","source":{"concatemoji":"http:\/\/naveensrinivasan.azurewebsites.net\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.4.5"}};
			!function(a,b,c){function d(a){var c,d,e,f=b.createElement("canvas"),g=f.getContext&&f.getContext("2d"),h=String.fromCharCode;return g&&g.fillText?(g.textBaseline="top",g.font="600 32px Arial","flag"===a?(g.fillText(h(55356,56806,55356,56826),0,0),f.toDataURL().length>3e3):"diversity"===a?(g.fillText(h(55356,57221),0,0),c=g.getImageData(16,16,1,1).data,g.fillText(h(55356,57221,55356,57343),0,0),c=g.getImageData(16,16,1,1).data,e=c[0]+","+c[1]+","+c[2]+","+c[3],d!==e):("simple"===a?g.fillText(h(55357,56835),0,0):g.fillText(h(55356,57135),0,0),0!==g.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g;c.supports={simple:d("simple"),flag:d("flag"),unicode8:d("unicode8"),diversity:d("diversity")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simple&&c.supports.flag&&c.supports.unicode8&&c.supports.diversity||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
		</script>
		<style type="text/css">
img.wp-smiley,
img.emoji {
	display: inline !important;
	border: none !important;
	box-shadow: none !important;
	height: 1em !important;
	width: 1em !important;
	margin: 0 .07em !important;
	vertical-align: -0.1em !important;
	background: none !important;
	padding: 0 !important;
}
</style>
<link rel='stylesheet' id='github-embed-css'  href='http://naveensrinivasan.azurewebsites.net/wp-content/plugins/github-embed/css/github-embed.css?ver=4.4.5' type='text/css' media='all' />
<link rel='stylesheet' id='casper-google-fonts-css'  href='//fonts.googleapis.com/css?family=Noto+Serif%3A400%2C700%2C400italic%7COpen+Sans%3A700%2C400&#038;ver=4.4.5' type='text/css' media='all' />
<link rel='stylesheet' id='casper-style-css'  href='http://naveensrinivasan.azurewebsites.net/wp-content/themes/casper/style.css?ver=4.4.5' type='text/css' media='all' />
<link rel='stylesheet' id='wp-github-css'  href='http://naveensrinivasan.azurewebsites.net/wp-content/plugins/wp-github/wp-github.css?ver=4.4.5' type='text/css' media='all' />
<script type='text/javascript' src='http://naveensrinivasan.azurewebsites.net/wp-includes/js/jquery/jquery.js?ver=1.11.3'></script>
<script type='text/javascript' src='http://naveensrinivasan.azurewebsites.net/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
<link rel='https://api.w.org/' href='http://naveensrinivasan.azurewebsites.net/wp-json/' />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://naveensrinivasan.azurewebsites.net/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://naveensrinivasan.azurewebsites.net/wp-includes/wlwmanifest.xml" /> 
<meta name="generator" content="WordPress 4.4.5" />
<script data-cfasync="false" src="//load.sumome.com/" data-sumo-site-id="735c562e8d4eb406adf31f8fc4de2da8893506185009bd6c725e0e3656b691a4" async></script>
   	<style type="text/css">
					.blog-title a, .blog-description, .social-icons a { color: #ffffff; }
		
						                
		
							.main-navigation a { color: ; }
		                                            </style>
    		<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
		<style type="text/css" id="syntaxhighlighteranchor"></style>
</head>

<body class="home blog">

<header id="masthead" role="banner" class="site-head site-header" >
    <nav id="site-navigation" class="main-navigation" role="navigation">
        <div>
            <h1 class="menu-toggle">
                <a class="icon-bars" href="#">
                    <span class="hidden">Menu</span>
                </a>
            </h1>
            <a class="skip-link screen-reader-text" href="#content">Skip to content</a>
            <div class="menu"><ul><li class="current_page_item"><a href="http://naveensrinivasan.azurewebsites.net/">Home</a></li><li class="page_item page-item-2"><a href="http://naveensrinivasan.azurewebsites.net/index.php/about/">About</a></li><li class="page_item page-item-291"><a href="http://naveensrinivasan.azurewebsites.net/index.php/etw/">ETW Series</a></li><li class="page_item page-item-2871"><a href="http://naveensrinivasan.azurewebsites.net/index.php/what-am-i-doing-now/">What Am I Doing Now</a></li><li class="page_item page-item-212"><a href="http://naveensrinivasan.azurewebsites.net/index.php/windbg/">Windbg Series</a></li></ul></div>
        </div>
    </nav><!-- #site-navigation -->

    <div class="vertical-row">
        <div class="vertical">
            <div class="site-head-content inner">
                
                <div class="social-icons">
                                                                                                                                                                                                                                                                                                                                                                                                                                                    </div>
                <h1 class="blog-title"><a class="blog-logo" href='http://naveensrinivasan.azurewebsites.net/' rel='home'>Naveen&#039;s Blog</a></h1>
                <h2 class="blog-description">Husband,dad and write code</h2>
            </div>
        </div>
    </div>
</header><!-- #masthead -->

<main id="content" class="content" role="main">


		
						
				
<article id="post-3163" class="post-3163 post type-post status-publish format-standard hentry category-kubernetes">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/05/26/how-to-debug-the-crashloopbackoff-in-kubernetes-when-pod-is-not-starting/" rel="bookmark"><time class="entry-date published" datetime="2016-05-26T02:01:16+00:00">May 26, 2016</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/kubernetes/" rel="category tag">kubernetes</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/05/26/how-to-debug-the-crashloopbackoff-in-kubernetes-when-pod-is-not-starting/" rel="bookmark">How to debug the CrashLoopBackOff in Kubernetes when pod is not starting</a></h1>
         
    </header>
	<section class="post-content">

		<p>Here is my learning of how I debugged the CrashLoopBackOff in kubernetes when the pod wasn&#8217;t starting.</p>
<p>I wanted to deploy the <a href="https://hub.docker.com/_/jenkins/" target="_blank">jenkins docker</a> image in the cluster. As mentioned in the jenkins docker  repo I wanted to mount an external drive which is an AWS EBS volume.  Here is my deployment yaml.</p>
<style> #wrap_githubgist98aa6da98ebb9b7e3d7f996c8ef2cb38 .gist-data {max-height: 100%;} </style><div id="wrap_githubgist98aa6da98ebb9b7e3d7f996c8ef2cb38" style="width:100%"><script>document.write('<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist-embed-16647224f984fc8586ae94a1d644a995dc2a063cdd93962a270f733d68ae2efb.css">')
document.write('<div id=\"gist36137261\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-jenkins-yml\" class=\"file\">\n    \n\n  <div itemprop=\"text\" class=\"blob-wrapper data type-yaml\">\n      <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n      <tr>\n        <td id=\"file-jenkins-yml-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n        <td id=\"file-jenkins-yml-LC1\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">apiVersion:<\/span> <span class=\"pl-s\">extensions/v1beta1<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"><\/td>\n        <td id=\"file-jenkins-yml-LC2\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">kind:<\/span> <span class=\"pl-s\">Deployment<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"><\/td>\n        <td id=\"file-jenkins-yml-LC3\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">metadata:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\"><\/td>\n        <td id=\"file-jenkins-yml-LC4\" class=\"blob-code blob-code-inner js-file-line\">  <span class=\"pl-ent\">name:<\/span> <span class=\"pl-s\">jenkins<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\"><\/td>\n        <td id=\"file-jenkins-yml-LC5\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">spec:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\"><\/td>\n        <td id=\"file-jenkins-yml-LC6\" class=\"blob-code blob-code-inner js-file-line\">  <span class=\"pl-ent\">replicas:<\/span> <span class=\"pl-c1\">1<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L7\" class=\"blob-num js-line-number\" data-line-number=\"7\"><\/td>\n        <td id=\"file-jenkins-yml-LC7\" class=\"blob-code blob-code-inner js-file-line\">  <span class=\"pl-ent\">template:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L8\" class=\"blob-num js-line-number\" data-line-number=\"8\"><\/td>\n        <td id=\"file-jenkins-yml-LC8\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-ent\">metadata:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L9\" class=\"blob-num js-line-number\" data-line-number=\"9\"><\/td>\n        <td id=\"file-jenkins-yml-LC9\" class=\"blob-code blob-code-inner js-file-line\">      <span class=\"pl-ent\">labels:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L10\" class=\"blob-num js-line-number\" data-line-number=\"10\"><\/td>\n        <td id=\"file-jenkins-yml-LC10\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-ent\">app:<\/span> <span class=\"pl-s\">jenkins<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L11\" class=\"blob-num js-line-number\" data-line-number=\"11\"><\/td>\n        <td id=\"file-jenkins-yml-LC11\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-ent\">spec:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L12\" class=\"blob-num js-line-number\" data-line-number=\"12\"><\/td>\n        <td id=\"file-jenkins-yml-LC12\" class=\"blob-code blob-code-inner js-file-line\">      <span class=\"pl-ent\">containers:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L13\" class=\"blob-num js-line-number\" data-line-number=\"13\"><\/td>\n        <td id=\"file-jenkins-yml-LC13\" class=\"blob-code blob-code-inner js-file-line\">        - <span class=\"pl-ent\">name:<\/span> <span class=\"pl-s\">jenkins<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L14\" class=\"blob-num js-line-number\" data-line-number=\"14\"><\/td>\n        <td id=\"file-jenkins-yml-LC14\" class=\"blob-code blob-code-inner js-file-line\">          <span class=\"pl-ent\">image:<\/span> <span class=\"pl-s\">quay.io/naveensrinivasan/jenkins:0.1<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L15\" class=\"blob-num js-line-number\" data-line-number=\"15\"><\/td>\n        <td id=\"file-jenkins-yml-LC15\" class=\"blob-code blob-code-inner js-file-line\">          <span class=\"pl-ent\">ports:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L16\" class=\"blob-num js-line-number\" data-line-number=\"16\"><\/td>\n        <td id=\"file-jenkins-yml-LC16\" class=\"blob-code blob-code-inner js-file-line\">            - <span class=\"pl-ent\">containerPort:<\/span> <span class=\"pl-c1\">8080<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L17\" class=\"blob-num js-line-number\" data-line-number=\"17\"><\/td>\n        <td id=\"file-jenkins-yml-LC17\" class=\"blob-code blob-code-inner js-file-line\">          <span class=\"pl-ent\">volumeMounts:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L18\" class=\"blob-num js-line-number\" data-line-number=\"18\"><\/td>\n        <td id=\"file-jenkins-yml-LC18\" class=\"blob-code blob-code-inner js-file-line\">            - <span class=\"pl-ent\">mountPath:<\/span> <span class=\"pl-s\">/var/jenkins_home<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L19\" class=\"blob-num js-line-number\" data-line-number=\"19\"><\/td>\n        <td id=\"file-jenkins-yml-LC19\" class=\"blob-code blob-code-inner js-file-line\">              <span class=\"pl-ent\">name:<\/span> <span class=\"pl-s\">jenkins-volume<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L20\" class=\"blob-num js-line-number\" data-line-number=\"20\"><\/td>\n        <td id=\"file-jenkins-yml-LC20\" class=\"blob-code blob-code-inner js-file-line\">      <span class=\"pl-ent\">volumes:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L21\" class=\"blob-num js-line-number\" data-line-number=\"21\"><\/td>\n        <td id=\"file-jenkins-yml-LC21\" class=\"blob-code blob-code-inner js-file-line\">         - <span class=\"pl-ent\">name:<\/span> <span class=\"pl-s\">jenkins-volume<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L22\" class=\"blob-num js-line-number\" data-line-number=\"22\"><\/td>\n        <td id=\"file-jenkins-yml-LC22\" class=\"blob-code blob-code-inner js-file-line\">           <span class=\"pl-ent\">awsElasticBlockStore:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L23\" class=\"blob-num js-line-number\" data-line-number=\"23\"><\/td>\n        <td id=\"file-jenkins-yml-LC23\" class=\"blob-code blob-code-inner js-file-line\">            <span class=\"pl-ent\">volumeID:<\/span> <span class=\"pl-s\">vol-29c4b99f<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L24\" class=\"blob-num js-line-number\" data-line-number=\"24\"><\/td>\n        <td id=\"file-jenkins-yml-LC24\" class=\"blob-code blob-code-inner js-file-line\">            <span class=\"pl-ent\">fsType:<\/span> <span class=\"pl-s\">ext4<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L25\" class=\"blob-num js-line-number\" data-line-number=\"25\"><\/td>\n        <td id=\"file-jenkins-yml-LC25\" class=\"blob-code blob-code-inner js-file-line\">      <span class=\"pl-ent\">imagePullSecrets:<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-jenkins-yml-L26\" class=\"blob-num js-line-number\" data-line-number=\"26\"><\/td>\n        <td id=\"file-jenkins-yml-LC26\" class=\"blob-code blob-code-inner js-file-line\">         - <span class=\"pl-ent\">name:<\/span> <span class=\"pl-s\">registrypullsecret<\/span><\/td>\n      <\/tr>\n<\/table>\n\n  <\/div>\n\n  <\/div>\n  \n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/naveensrinivasan/98aa6da98ebb9b7e3d7f996c8ef2cb38/raw/4da683036f84c332cca1ec7a4f82590f0768d163/jenkins.yml\" style=\"float:right\">view raw<\/a>\n        <a href=\"https://gist.github.com/naveensrinivasan/98aa6da98ebb9b7e3d7f996c8ef2cb38#file-jenkins-yml\">jenkins.yml<\/a>\n        hosted with &#10084; by <a href=\"https://github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>404: Not Found
</pre></code></noscript></div></div>
<p>After starting the deployment the pod never came up and this the output of  <em>kubectl get pod</em></p>
<p><em>NAME                                      READY      STATUS                  RESTARTS  AGE</em><br />
<em> jenkins-3317895845-x84u3  0/1       CrashLoopBackOff      10                 27m</em></p>
<p>The next step was to issue the <em>kubectl describe pod jenkins-3317895845-x84u3</em></p>
<style> #wrap_githubgist7a79af84b53fc923aa609997fdb4fcfd .gist-data {max-height: 100%;} </style><div id="wrap_githubgist7a79af84b53fc923aa609997fdb4fcfd" style="width:100%"><script>document.write('<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist-embed-16647224f984fc8586ae94a1d644a995dc2a063cdd93962a270f733d68ae2efb.css">')
document.write('<div id=\"gist36137458\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-crashloop-describepod-txt\" class=\"file\">\n    \n\n  <div itemprop=\"text\" class=\"blob-wrapper data type-text\">\n      <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC1\" class=\"blob-code blob-code-inner js-file-line\">~ aws_kubernetes  naveen@GuessWho  ~ k describe pod jenkins-3317895845-x84u3<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC2\" class=\"blob-code blob-code-inner js-file-line\">Name:		jenkins-3317895845-x84u3<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC3\" class=\"blob-code blob-code-inner js-file-line\">Namespace:	default<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC4\" class=\"blob-code blob-code-inner js-file-line\">Node:		ip-172-20-0-29.us-west-2.compute.internal/172.20.0.29<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC5\" class=\"blob-code blob-code-inner js-file-line\">Start Time:	Wed, 25 May 2016 20:30:56 -0400<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC6\" class=\"blob-code blob-code-inner js-file-line\">Labels:		app=jenkins,pod-template-hash=3317895845<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L7\" class=\"blob-num js-line-number\" data-line-number=\"7\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC7\" class=\"blob-code blob-code-inner js-file-line\">Status:		Running<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L8\" class=\"blob-num js-line-number\" data-line-number=\"8\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC8\" class=\"blob-code blob-code-inner js-file-line\">IP:		10.244.3.3<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L9\" class=\"blob-num js-line-number\" data-line-number=\"9\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC9\" class=\"blob-code blob-code-inner js-file-line\">Controllers:	ReplicaSet/jenkins-3317895845<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L10\" class=\"blob-num js-line-number\" data-line-number=\"10\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC10\" class=\"blob-code blob-code-inner js-file-line\">Containers:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L11\" class=\"blob-num js-line-number\" data-line-number=\"11\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC11\" class=\"blob-code blob-code-inner js-file-line\">  jenkins:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L12\" class=\"blob-num js-line-number\" data-line-number=\"12\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC12\" class=\"blob-code blob-code-inner js-file-line\">    Container ID:	docker://32c0aff42beccd5a24d5cc84942ce174809b85cbe198573ea2aab4af82c9e50e<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L13\" class=\"blob-num js-line-number\" data-line-number=\"13\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC13\" class=\"blob-code blob-code-inner js-file-line\">    Image:		quay.io/naveensrinivasan/jenkins:0.1<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L14\" class=\"blob-num js-line-number\" data-line-number=\"14\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC14\" class=\"blob-code blob-code-inner js-file-line\">    Image ID:		docker://d79f87aa51271c03b332cd9889c6c4ba77ada72cda881c3501364ebd26bf8d59<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L15\" class=\"blob-num js-line-number\" data-line-number=\"15\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC15\" class=\"blob-code blob-code-inner js-file-line\">    Port:		8080/TCP<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L16\" class=\"blob-num js-line-number\" data-line-number=\"16\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC16\" class=\"blob-code blob-code-inner js-file-line\">    QoS Tier:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L17\" class=\"blob-num js-line-number\" data-line-number=\"17\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC17\" class=\"blob-code blob-code-inner js-file-line\">      cpu:	Burstable<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L18\" class=\"blob-num js-line-number\" data-line-number=\"18\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC18\" class=\"blob-code blob-code-inner js-file-line\">      memory:	BestEffort<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L19\" class=\"blob-num js-line-number\" data-line-number=\"19\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC19\" class=\"blob-code blob-code-inner js-file-line\">    Requests:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L20\" class=\"blob-num js-line-number\" data-line-number=\"20\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC20\" class=\"blob-code blob-code-inner js-file-line\">      cpu:		100m<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L21\" class=\"blob-num js-line-number\" data-line-number=\"21\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC21\" class=\"blob-code blob-code-inner js-file-line\">    State:		Waiting<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L22\" class=\"blob-num js-line-number\" data-line-number=\"22\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC22\" class=\"blob-code blob-code-inner js-file-line\">      Reason:		CrashLoopBackOff<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L23\" class=\"blob-num js-line-number\" data-line-number=\"23\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC23\" class=\"blob-code blob-code-inner js-file-line\">    Last State:		Terminated<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L24\" class=\"blob-num js-line-number\" data-line-number=\"24\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC24\" class=\"blob-code blob-code-inner js-file-line\">      Reason:		Error<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L25\" class=\"blob-num js-line-number\" data-line-number=\"25\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC25\" class=\"blob-code blob-code-inner js-file-line\">      Exit Code:	1<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L26\" class=\"blob-num js-line-number\" data-line-number=\"26\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC26\" class=\"blob-code blob-code-inner js-file-line\">      Started:		Wed, 25 May 2016 20:57:23 -0400<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L27\" class=\"blob-num js-line-number\" data-line-number=\"27\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC27\" class=\"blob-code blob-code-inner js-file-line\">      Finished:		Wed, 25 May 2016 20:57:23 -0400<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L28\" class=\"blob-num js-line-number\" data-line-number=\"28\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC28\" class=\"blob-code blob-code-inner js-file-line\">    Ready:		False<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L29\" class=\"blob-num js-line-number\" data-line-number=\"29\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC29\" class=\"blob-code blob-code-inner js-file-line\">    Restart Count:	10<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L30\" class=\"blob-num js-line-number\" data-line-number=\"30\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC30\" class=\"blob-code blob-code-inner js-file-line\">    Environment Variables:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L31\" class=\"blob-num js-line-number\" data-line-number=\"31\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC31\" class=\"blob-code blob-code-inner js-file-line\">Conditions:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L32\" class=\"blob-num js-line-number\" data-line-number=\"32\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC32\" class=\"blob-code blob-code-inner js-file-line\">  Type		Status<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L33\" class=\"blob-num js-line-number\" data-line-number=\"33\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC33\" class=\"blob-code blob-code-inner js-file-line\">  Ready 	False<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L34\" class=\"blob-num js-line-number\" data-line-number=\"34\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC34\" class=\"blob-code blob-code-inner js-file-line\">Volumes:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L35\" class=\"blob-num js-line-number\" data-line-number=\"35\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC35\" class=\"blob-code blob-code-inner js-file-line\">  jenkins-volume:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L36\" class=\"blob-num js-line-number\" data-line-number=\"36\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC36\" class=\"blob-code blob-code-inner js-file-line\">    Type:	AWSElasticBlockStore (a Persistent Disk resource in AWS)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L37\" class=\"blob-num js-line-number\" data-line-number=\"37\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC37\" class=\"blob-code blob-code-inner js-file-line\">    VolumeID:	vol-29c4b99f<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L38\" class=\"blob-num js-line-number\" data-line-number=\"38\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC38\" class=\"blob-code blob-code-inner js-file-line\">    FSType:	ext4<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L39\" class=\"blob-num js-line-number\" data-line-number=\"39\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC39\" class=\"blob-code blob-code-inner js-file-line\">    Partition:	0<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L40\" class=\"blob-num js-line-number\" data-line-number=\"40\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC40\" class=\"blob-code blob-code-inner js-file-line\">    ReadOnly:	false<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L41\" class=\"blob-num js-line-number\" data-line-number=\"41\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC41\" class=\"blob-code blob-code-inner js-file-line\">  default-token-tcpfi:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L42\" class=\"blob-num js-line-number\" data-line-number=\"42\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC42\" class=\"blob-code blob-code-inner js-file-line\">    Type:	Secret (a volume populated by a Secret)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L43\" class=\"blob-num js-line-number\" data-line-number=\"43\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC43\" class=\"blob-code blob-code-inner js-file-line\">    SecretName:	default-token-tcpfi<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L44\" class=\"blob-num js-line-number\" data-line-number=\"44\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC44\" class=\"blob-code blob-code-inner js-file-line\">Events:<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L45\" class=\"blob-num js-line-number\" data-line-number=\"45\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC45\" class=\"blob-code blob-code-inner js-file-line\">  FirstSeen	LastSeen	Count	From							SubobjectPath			Type		Reason		Message<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L46\" class=\"blob-num js-line-number\" data-line-number=\"46\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC46\" class=\"blob-code blob-code-inner js-file-line\">  ---------	--------	-----	----							-------------			--------	------		-------<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L47\" class=\"blob-num js-line-number\" data-line-number=\"47\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC47\" class=\"blob-code blob-code-inner js-file-line\">  31m		31m		1	{default-scheduler }									Normal		Scheduled	Successfully assigned jenkins-3317895845-x84u3 to ip-172-20-0-29.us-west-2.compute.internal<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L48\" class=\"blob-num js-line-number\" data-line-number=\"48\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC48\" class=\"blob-code blob-code-inner js-file-line\">  30m		30m		1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal		Created		Created container with docker id 79bc387e8bf0<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L49\" class=\"blob-num js-line-number\" data-line-number=\"49\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC49\" class=\"blob-code blob-code-inner js-file-line\">  30m		30m		1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal		Started		Started container with docker id 79bc387e8bf0<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L50\" class=\"blob-num js-line-number\" data-line-number=\"50\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC50\" class=\"blob-code blob-code-inner js-file-line\">  30m		30m		1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal		Created		Created container with docker id e19338eba9ae<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L51\" class=\"blob-num js-line-number\" data-line-number=\"51\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC51\" class=\"blob-code blob-code-inner js-file-line\">  30m		30m		1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal		Started		Started container with docker id e19338eba9ae<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L52\" class=\"blob-num js-line-number\" data-line-number=\"52\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC52\" class=\"blob-code blob-code-inner js-file-line\">  30m		30m		2	{kubelet ip-172-20-0-29.us-west-2.compute.internal}					Warning		FailedSync	Error syncing pod, skipping: failed to &quot;StartContainer&quot; for &quot;jenkins&quot; with CrashLoopBackOff: &quot;Back-off 10s restarting failed container=jenkins pod=jenkins-3317895845-x84u3_default(1cd2b6aa-22d9-11e6-8d05-0252473453e5)&quot;<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L53\" class=\"blob-num js-line-number\" data-line-number=\"53\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC53\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L54\" class=\"blob-num js-line-number\" data-line-number=\"54\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC54\" class=\"blob-code blob-code-inner js-file-line\">  30m	30m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Started		Started container with docker id c04945b329b4<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L55\" class=\"blob-num js-line-number\" data-line-number=\"55\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC55\" class=\"blob-code blob-code-inner js-file-line\">  30m	30m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Created		Created container with docker id c04945b329b4<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L56\" class=\"blob-num js-line-number\" data-line-number=\"56\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC56\" class=\"blob-code blob-code-inner js-file-line\">  30m	30m	2	{kubelet ip-172-20-0-29.us-west-2.compute.internal}					Warning	FailedSync	Error syncing pod, skipping: failed to &quot;StartContainer&quot; for &quot;jenkins&quot; with CrashLoopBackOff: &quot;Back-off 20s restarting failed container=jenkins pod=jenkins-3317895845-x84u3_default(1cd2b6aa-22d9-11e6-8d05-0252473453e5)&quot;<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L57\" class=\"blob-num js-line-number\" data-line-number=\"57\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC57\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L58\" class=\"blob-num js-line-number\" data-line-number=\"58\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC58\" class=\"blob-code blob-code-inner js-file-line\">  30m	30m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Started		Started container with docker id da33e09c6c53<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L59\" class=\"blob-num js-line-number\" data-line-number=\"59\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC59\" class=\"blob-code blob-code-inner js-file-line\">  30m	30m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Created		Created container with docker id da33e09c6c53<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L60\" class=\"blob-num js-line-number\" data-line-number=\"60\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC60\" class=\"blob-code blob-code-inner js-file-line\">  30m	29m	4	{kubelet ip-172-20-0-29.us-west-2.compute.internal}					Warning	FailedSync	Error syncing pod, skipping: failed to &quot;StartContainer&quot; for &quot;jenkins&quot; with CrashLoopBackOff: &quot;Back-off 40s restarting failed container=jenkins pod=jenkins-3317895845-x84u3_default(1cd2b6aa-22d9-11e6-8d05-0252473453e5)&quot;<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L61\" class=\"blob-num js-line-number\" data-line-number=\"61\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC61\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L62\" class=\"blob-num js-line-number\" data-line-number=\"62\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC62\" class=\"blob-code blob-code-inner js-file-line\">  29m	29m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Started		Started container with docker id 6161c138057f<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L63\" class=\"blob-num js-line-number\" data-line-number=\"63\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC63\" class=\"blob-code blob-code-inner js-file-line\">  29m	29m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Created		Created container with docker id 6161c138057f<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L64\" class=\"blob-num js-line-number\" data-line-number=\"64\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC64\" class=\"blob-code blob-code-inner js-file-line\">  29m	28m	6	{kubelet ip-172-20-0-29.us-west-2.compute.internal}					Warning	FailedSync	Error syncing pod, skipping: failed to &quot;StartContainer&quot; for &quot;jenkins&quot; with CrashLoopBackOff: &quot;Back-off 1m20s restarting failed container=jenkins pod=jenkins-3317895845-x84u3_default(1cd2b6aa-22d9-11e6-8d05-0252473453e5)&quot;<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L65\" class=\"blob-num js-line-number\" data-line-number=\"65\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC65\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L66\" class=\"blob-num js-line-number\" data-line-number=\"66\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC66\" class=\"blob-code blob-code-inner js-file-line\">  27m	27m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Created		Created container with docker id 92e5bf1d8fca<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L67\" class=\"blob-num js-line-number\" data-line-number=\"67\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC67\" class=\"blob-code blob-code-inner js-file-line\">  27m	27m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Started		Started container with docker id 92e5bf1d8fca<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L68\" class=\"blob-num js-line-number\" data-line-number=\"68\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC68\" class=\"blob-code blob-code-inner js-file-line\">  27m	25m	13	{kubelet ip-172-20-0-29.us-west-2.compute.internal}					Warning	FailedSync	Error syncing pod, skipping: failed to &quot;StartContainer&quot; for &quot;jenkins&quot; with CrashLoopBackOff: &quot;Back-off 2m40s restarting failed container=jenkins pod=jenkins-3317895845-x84u3_default(1cd2b6aa-22d9-11e6-8d05-0252473453e5)&quot;<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L69\" class=\"blob-num js-line-number\" data-line-number=\"69\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC69\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L70\" class=\"blob-num js-line-number\" data-line-number=\"70\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC70\" class=\"blob-code blob-code-inner js-file-line\">  25m	25m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Created		Created container with docker id 17b08a4d6dca<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L71\" class=\"blob-num js-line-number\" data-line-number=\"71\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC71\" class=\"blob-code blob-code-inner js-file-line\">  25m	25m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Started		Started container with docker id 17b08a4d6dca<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L72\" class=\"blob-num js-line-number\" data-line-number=\"72\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC72\" class=\"blob-code blob-code-inner js-file-line\">  20m	20m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Started		Started container with docker id aa46b164518d<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L73\" class=\"blob-num js-line-number\" data-line-number=\"73\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC73\" class=\"blob-code blob-code-inner js-file-line\">  20m	20m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Created		Created container with docker id aa46b164518d<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L74\" class=\"blob-num js-line-number\" data-line-number=\"74\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC74\" class=\"blob-code blob-code-inner js-file-line\">  14m	14m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Started		Started container with docker id 5971a1978658<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L75\" class=\"blob-num js-line-number\" data-line-number=\"75\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC75\" class=\"blob-code blob-code-inner js-file-line\">  14m	14m	1	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Created		Created container with docker id 5971a1978658<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L76\" class=\"blob-num js-line-number\" data-line-number=\"76\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC76\" class=\"blob-code blob-code-inner js-file-line\">  9m	4m	2	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Started		(events with common reason combined)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L77\" class=\"blob-num js-line-number\" data-line-number=\"77\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC77\" class=\"blob-code blob-code-inner js-file-line\">  9m	4m	2	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Created		(events with common reason combined)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L78\" class=\"blob-num js-line-number\" data-line-number=\"78\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC78\" class=\"blob-code blob-code-inner js-file-line\">  30m	4m	11	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Normal	Pulled		Container image &quot;quay.io/naveensrinivasan/jenkins:0.1&quot; already present on machine<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L79\" class=\"blob-num js-line-number\" data-line-number=\"79\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC79\" class=\"blob-code blob-code-inner js-file-line\">  25m	17s	115	{kubelet ip-172-20-0-29.us-west-2.compute.internal}					Warning	FailedSync	Error syncing pod, skipping: failed to &quot;StartContainer&quot; for &quot;jenkins&quot; with CrashLoopBackOff: &quot;Back-off 5m0s restarting failed container=jenkins pod=jenkins-3317895845-x84u3_default(1cd2b6aa-22d9-11e6-8d05-0252473453e5)&quot;<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L80\" class=\"blob-num js-line-number\" data-line-number=\"80\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC80\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-crashloop-describepod-txt-L81\" class=\"blob-num js-line-number\" data-line-number=\"81\"><\/td>\n        <td id=\"file-crashloop-describepod-txt-LC81\" class=\"blob-code blob-code-inner js-file-line\">  30m	17s	142	{kubelet ip-172-20-0-29.us-west-2.compute.internal}	spec.containers{jenkins}	Warning	BackOff	Back-off restarting failed docker container<\/td>\n      <\/tr>\n<\/table>\n\n  <\/div>\n\n  <\/div>\n  \n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/naveensrinivasan/7a79af84b53fc923aa609997fdb4fcfd/raw/d79ba888987911cf60acbe7c431cc1574250a609/crashloop-describepod.txt\" style=\"float:right\">view raw<\/a>\n        <a href=\"https://gist.github.com/naveensrinivasan/7a79af84b53fc923aa609997fdb4fcfd#file-crashloop-describepod-txt\">crashloop-describepod.txt<\/a>\n        hosted with &#10084; by <a href=\"https://github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>404: Not Found
</pre></code></noscript></div></div>
<p>So from the logs I could make out the container is being pulled correctly but it is failing on <strong>StartContainer</strong>.  Now based on this information the next step was to get the docker logs. But the docker logs aren&#8217;t accessible from my box because it is managed by kubernetes. The only way to get the docker logs was to actually ssh into the box.</p>
<p>But which box should I ssh? The describe output has the node information which is <em>Node: ip-172-20-0-29.us-west-2.compute.internal/172.20.0.29 </em>. This<em> </em>is the private ip of the box in aws but with that information you should be able to figure out the public ip to ssh.</p>
<p>Now I know I have to ssh but where is the key for this server. If you have used the <a href="http://releases.k8s.io/release-1.2/cluster/kube-up.sh" target="_blank">kube-up.sh</a> then the keys would be stored  in this location <em>~/.ssh/kube_aws_rsa. ssh -i ~/.ssh/kube_aws_rsa admin@public-ip-oftheabovenode.</em></p>
<p>After<em> </em>sshing into the box I issued the command <em>sudo docker ps -a | grep naveen </em>because the container could have been stopped and looked for naveen because that was my container name. This gave me container id which was stopped with exit status as 1.</p>
<p>And this was the output of docker logs command</p>
<p><em>admin@ip-172-20-0-29:~$ sudo docker logs c98a338268a1</em><br />
<em>touch: cannot touch ‘/var/jenkins_home/copy_reference_file.log’: Permission denied</em><br />
<em>Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?</em></p>
<p>which identified the <em>/var/jenkins_home  </em>which was mounted with aws ebs voulme  didn&#8217;t have permission to write by the jenkins user <a href="https://github.com/kubernetes/kubernetes/issues/2630" target="_blank">https://github.com/kubernetes/kubernetes/issues/2630</a>.</p>
<p>And after doing all of this I realized I could have done <em>kubectl logs jenkins-3317895845-x84u3</em> which would have given the same output without having to ssh into the box. But knowing this handy because when things go wrong we really need to debug the root cause.</p>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				
<article id="post-3141" class="post-3141 post type-post status-publish format-standard hentry category-osx">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/04/25/enable-shortcat-app-in-osx/" rel="bookmark"><time class="entry-date published" datetime="2016-04-25T14:13:47+00:00">April 25, 2016</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/osx/" rel="category tag">OSX</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/04/25/enable-shortcat-app-in-osx/" rel="bookmark">Enable Shortcat app in OSX</a></h1>
         
    </header>
	<section class="post-content">

		<p><a href="https://shortcatapp.com/" target="_blank">Shortcat</a> app is a software that I use everyday to keep me productive and reduce my dependency on mouse.</p>
<p>But if you have OSX El Captain you get a message to enable the assistive devices,. But it has been changed from the previous versions of OSX.</p>
<p>To enable the assistive devices navigate to  <strong>System Preferences &gt; Security &amp; Privacy &gt; Privacy &gt; Accessibility </strong>and enable for shortcat app.</p>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				
<article id="post-3061" class="post-3061 post type-post status-publish format-standard has-post-thumbnail hentry category-tips tag-docker tag-shell">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/04/23/my-docker-aliases/" rel="bookmark"><time class="entry-date published" datetime="2016-04-23T14:35:57+00:00">April 23, 2016</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/tips/" rel="category tag">tips</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/04/23/my-docker-aliases/" rel="bookmark">My Docker aliases</a></h1>
        
        	<div class="post-image">
        		<img data-src='<480:http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/04/docker-logo-e1446595115555-150x150.png, <768:http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/04/docker-logo-e1446595115555-300x81.png, >768:http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/04/docker-logo-e1446595115555.png' />
			</div>
			<noscript><img width="150" height="150" src="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/04/docker-logo-e1446595115555-150x150.png" class="attachment-thumbnail size-thumbnail wp-post-image" alt="docker-logo-e1446595115555" /></noscript>
	     
    </header>
	<section class="post-content">

		<p>I  have been using docker very often now and because I have been spending most of time in the terminal it made sense to use alias to reduce the typing.</p>
<style> #wrap_githubgistd6b41d000b93f3ecc3e7a1b900c7382c .gist-data {max-height: 100%;} </style><div id="wrap_githubgistd6b41d000b93f3ecc3e7a1b900c7382c" style="width:100%"><script>document.write('<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist-embed-16647224f984fc8586ae94a1d644a995dc2a063cdd93962a270f733d68ae2efb.css">')
document.write('<div id=\"gist34737010\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-docker-alias-sh\" class=\"file\">\n    \n\n  <div itemprop=\"text\" class=\"blob-wrapper data type-shell\">\n      <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n      <tr>\n        <td id=\"file-docker-alias-sh-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n        <td id=\"file-docker-alias-sh-LC1\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># ------------------------------------<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"><\/td>\n        <td id=\"file-docker-alias-sh-LC2\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Docker alias and function<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"><\/td>\n        <td id=\"file-docker-alias-sh-LC3\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># ------------------------------------<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\"><\/td>\n        <td id=\"file-docker-alias-sh-LC4\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\"><\/td>\n        <td id=\"file-docker-alias-sh-LC5\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">eval<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span><span class=\"pl-s\"><span class=\"pl-pds\">$(<\/span>docker-machine env default<span class=\"pl-pds\">)<\/span><\/span><span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\"><\/td>\n        <td id=\"file-docker-alias-sh-LC6\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L7\" class=\"blob-num js-line-number\" data-line-number=\"7\"><\/td>\n        <td id=\"file-docker-alias-sh-LC7\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Get latest container ID<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L8\" class=\"blob-num js-line-number\" data-line-number=\"8\"><\/td>\n        <td id=\"file-docker-alias-sh-LC8\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">alias<\/span> dl=<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>docker ps -l -q<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L9\" class=\"blob-num js-line-number\" data-line-number=\"9\"><\/td>\n        <td id=\"file-docker-alias-sh-LC9\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L10\" class=\"blob-num js-line-number\" data-line-number=\"10\"><\/td>\n        <td id=\"file-docker-alias-sh-LC10\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Get process included stop container<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L11\" class=\"blob-num js-line-number\" data-line-number=\"11\"><\/td>\n        <td id=\"file-docker-alias-sh-LC11\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">alias<\/span> dpa=<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>docker ps -a<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L12\" class=\"blob-num js-line-number\" data-line-number=\"12\"><\/td>\n        <td id=\"file-docker-alias-sh-LC12\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L13\" class=\"blob-num js-line-number\" data-line-number=\"13\"><\/td>\n        <td id=\"file-docker-alias-sh-LC13\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Get images<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L14\" class=\"blob-num js-line-number\" data-line-number=\"14\"><\/td>\n        <td id=\"file-docker-alias-sh-LC14\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">alias<\/span> di=<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>docker images<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L15\" class=\"blob-num js-line-number\" data-line-number=\"15\"><\/td>\n        <td id=\"file-docker-alias-sh-LC15\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L16\" class=\"blob-num js-line-number\" data-line-number=\"16\"><\/td>\n        <td id=\"file-docker-alias-sh-LC16\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">alias<\/span> dip=<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>docker inspect --format &#39;{{ .NetworkSettings.IPAddress }}&#39;<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L17\" class=\"blob-num js-line-number\" data-line-number=\"17\"><\/td>\n        <td id=\"file-docker-alias-sh-LC17\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L18\" class=\"blob-num js-line-number\" data-line-number=\"18\"><\/td>\n        <td id=\"file-docker-alias-sh-LC18\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Run deamonized container, e.g., $dkd base /bin/echo hello<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L19\" class=\"blob-num js-line-number\" data-line-number=\"19\"><\/td>\n        <td id=\"file-docker-alias-sh-LC19\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">alias<\/span> dkd=<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>docker run -d -P<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L20\" class=\"blob-num js-line-number\" data-line-number=\"20\"><\/td>\n        <td id=\"file-docker-alias-sh-LC20\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L21\" class=\"blob-num js-line-number\" data-line-number=\"21\"><\/td>\n        <td id=\"file-docker-alias-sh-LC21\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Run interactive container, e.g., $dki base /bin/bash<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L22\" class=\"blob-num js-line-number\" data-line-number=\"22\"><\/td>\n        <td id=\"file-docker-alias-sh-LC22\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">alias<\/span> dki=<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>docker run -i -t -P<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L23\" class=\"blob-num js-line-number\" data-line-number=\"23\"><\/td>\n        <td id=\"file-docker-alias-sh-LC23\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L24\" class=\"blob-num js-line-number\" data-line-number=\"24\"><\/td>\n        <td id=\"file-docker-alias-sh-LC24\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Execute interactive container, e.g., $dex base /bin/bash<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L25\" class=\"blob-num js-line-number\" data-line-number=\"25\"><\/td>\n        <td id=\"file-docker-alias-sh-LC25\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">alias<\/span> dex=<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>docker exec -i -t<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L26\" class=\"blob-num js-line-number\" data-line-number=\"26\"><\/td>\n        <td id=\"file-docker-alias-sh-LC26\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L27\" class=\"blob-num js-line-number\" data-line-number=\"27\"><\/td>\n        <td id=\"file-docker-alias-sh-LC27\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Stop all containers<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L28\" class=\"blob-num js-line-number\" data-line-number=\"28\"><\/td>\n        <td id=\"file-docker-alias-sh-LC28\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-en\">dstop<\/span>() { docker stop <span class=\"pl-s\"><span class=\"pl-pds\">$(<\/span>docker ps -a -q<span class=\"pl-pds\">)<\/span><\/span><span class=\"pl-k\">;<\/span> }<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L29\" class=\"blob-num js-line-number\" data-line-number=\"29\"><\/td>\n        <td id=\"file-docker-alias-sh-LC29\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L30\" class=\"blob-num js-line-number\" data-line-number=\"30\"><\/td>\n        <td id=\"file-docker-alias-sh-LC30\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Stop and Remove all containers<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L31\" class=\"blob-num js-line-number\" data-line-number=\"31\"><\/td>\n        <td id=\"file-docker-alias-sh-LC31\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">alias<\/span> drmf=<span class=\"pl-s\"><span class=\"pl-pds\">&#39;<\/span>docker stop $(docker ps -a -q) &amp;&amp; docker rm $(docker ps -a -q)<span class=\"pl-pds\">&#39;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L32\" class=\"blob-num js-line-number\" data-line-number=\"32\"><\/td>\n        <td id=\"file-docker-alias-sh-LC32\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L33\" class=\"blob-num js-line-number\" data-line-number=\"33\"><\/td>\n        <td id=\"file-docker-alias-sh-LC33\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Remove all images<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L34\" class=\"blob-num js-line-number\" data-line-number=\"34\"><\/td>\n        <td id=\"file-docker-alias-sh-LC34\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-en\">dri<\/span>() { docker rmi <span class=\"pl-s\"><span class=\"pl-pds\">$(<\/span>docker images -q<span class=\"pl-pds\">)<\/span><\/span><span class=\"pl-k\">;<\/span> }<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L35\" class=\"blob-num js-line-number\" data-line-number=\"35\"><\/td>\n        <td id=\"file-docker-alias-sh-LC35\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L36\" class=\"blob-num js-line-number\" data-line-number=\"36\"><\/td>\n        <td id=\"file-docker-alias-sh-LC36\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Dockerfile build, e.g., $dbu tcnksm/test <\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L37\" class=\"blob-num js-line-number\" data-line-number=\"37\"><\/td>\n        <td id=\"file-docker-alias-sh-LC37\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-en\">dbu<\/span>() { docker build -t=<span class=\"pl-smi\">$1<\/span> <span class=\"pl-c1\">.<\/span><span class=\"pl-k\">;<\/span> }<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L38\" class=\"blob-num js-line-number\" data-line-number=\"38\"><\/td>\n        <td id=\"file-docker-alias-sh-LC38\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L39\" class=\"blob-num js-line-number\" data-line-number=\"39\"><\/td>\n        <td id=\"file-docker-alias-sh-LC39\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Show all alias related docker<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L40\" class=\"blob-num js-line-number\" data-line-number=\"40\"><\/td>\n        <td id=\"file-docker-alias-sh-LC40\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-en\">dalias<\/span>() { <span class=\"pl-c1\">alias<\/span> <span class=\"pl-k\">|<\/span> grep <span class=\"pl-s\"><span class=\"pl-pds\">&#39;<\/span>docker<span class=\"pl-pds\">&#39;<\/span><\/span> <span class=\"pl-k\">|<\/span> sed <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>s/^\\([^=]*\\)=\\(.*\\)/\\1 =&gt; \\2/<span class=\"pl-pds\">&quot;<\/span><\/span><span class=\"pl-k\">|<\/span> sed <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>s/[&#39;|\\&#39;]//g<span class=\"pl-pds\">&quot;<\/span><\/span> <span class=\"pl-k\">|<\/span> sort<span class=\"pl-k\">;<\/span> }<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L41\" class=\"blob-num js-line-number\" data-line-number=\"41\"><\/td>\n        <td id=\"file-docker-alias-sh-LC41\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L42\" class=\"blob-num js-line-number\" data-line-number=\"42\"><\/td>\n        <td id=\"file-docker-alias-sh-LC42\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\"># Get docker machine ip<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L43\" class=\"blob-num js-line-number\" data-line-number=\"43\"><\/td>\n        <td id=\"file-docker-alias-sh-LC43\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-en\">docker-ip<\/span>() {<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L44\" class=\"blob-num js-line-number\" data-line-number=\"44\"><\/td>\n        <td id=\"file-docker-alias-sh-LC44\" class=\"blob-code blob-code-inner js-file-line\">  docker-machine ip <span class=\"pl-k\">2&gt;<\/span> /dev/null<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L45\" class=\"blob-num js-line-number\" data-line-number=\"45\"><\/td>\n        <td id=\"file-docker-alias-sh-LC45\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L46\" class=\"blob-num js-line-number\" data-line-number=\"46\"><\/td>\n        <td id=\"file-docker-alias-sh-LC46\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L47\" class=\"blob-num js-line-number\" data-line-number=\"47\"><\/td>\n        <td id=\"file-docker-alias-sh-LC47\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\">#grep alias <\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-docker-alias-sh-L48\" class=\"blob-num js-line-number\" data-line-number=\"48\"><\/td>\n        <td id=\"file-docker-alias-sh-LC48\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c1\">alias<\/span> ga=<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>alias | grep<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n<\/table>\n\n  <\/div>\n\n  <\/div>\n  \n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/naveensrinivasan/d6b41d000b93f3ecc3e7a1b900c7382c/raw/8677813ef0e50d322e2e96141897ac1ceee6d7d8/docker-alias.sh\" style=\"float:right\">view raw<\/a>\n        <a href=\"https://gist.github.com/naveensrinivasan/d6b41d000b93f3ecc3e7a1b900c7382c#file-docker-alias-sh\">docker-alias.sh<\/a>\n        hosted with &#10084; by <a href=\"https://github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>404: Not Found
</pre></code></noscript></div></div>
<p>I have curated this from others and have also customized to what I want.</p>
<p>&nbsp;</p>
<p>All my aliases are stored in my github repo <a href="https://github.com/naveensrinivasan/dotvim/blob/master/zshrc" target="_blank">https://github.com/naveensrinivasan/dotvim/blob/master/zshrc</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				
<article id="post-2901" class="post-2901 post type-post status-publish format-standard has-post-thumbnail hentry category-tools">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/03/28/keyboard/" rel="bookmark"><time class="entry-date published" datetime="2016-03-28T00:57:41+00:00">March 28, 2016</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/tools/" rel="category tag">tools</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/03/28/keyboard/" rel="bookmark">How I try avoid using mouse</a></h1>
        
        	<div class="post-image">
        		<img data-src='<480:http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/uhk-with-keycluster-trackball-dark-bg-150x150.jpg, <768:http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/uhk-with-keycluster-trackball-dark-bg-300x119.jpg, >768:http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/uhk-with-keycluster-trackball-dark-bg-1024x405.jpg' />
			</div>
			<noscript><img width="150" height="150" src="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/uhk-with-keycluster-trackball-dark-bg-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="uhk-with-keycluster-trackball-dark-bg" /></noscript>
	     
    </header>
	<section class="post-content">

		<p>Like most of the Dev&#8217;s I love using my Keyboard more than mouse. I am big vim fan and have been using vim for over 7-8 years. I still consider myself novice.</p>
<p>Here are the ways I manage to use keyboard over mouse</p>
<ul>
<li><a href="https://shortcatapp.com/" target="_blank">Shortcat</a> &#8211; Great app get rids of use mouse in OSX &#8211; This is a Paid App , which IMHO is the best investment for me. There is also a trial version.</li>
<li>MacVim &#8211; I have been using MacVim as my primary text editor.</li>
<li><a href="https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh?hl=en" target="_blank">cVim</a> &#8211; Vim features within chrome. The best part is it allows custom vimrc.</li>
<li>IntelliJ Vim Plugin &#8211; <a href="https://github.com/JetBrains/ideavim" target="_blank">https://github.com/JetBrains/ideavim</a> also allow vimrc</li>
<li>Here is a plugin <a href="https://github.com/athiele/key-promoter-fork" target="_blank">https://github.com/athiele/key-promoter-fork</a> for IntelliJ &#8211; show hints when using the mouse for something which could be done with the keyboard.</li>
<li><a href="https://github.com/eczarny/spectacle" target="_blank">Spectacle</a> &#8211; For window management in OSX with keyboard.</li>
</ul>
<p style="padding-left: 30px;"><a href="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/Screen-Shot-2016-03-27-at-10.24.42-PM.png" rel="attachment wp-att-3001"><img class="size-medium wp-image-3001 alignleft" src="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/Screen-Shot-2016-03-27-at-10.24.42-PM-300x208.png" alt="Screen Shot 2016-03-27 at 10.24.42 PM" width="300" height="208" srcset="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/Screen-Shot-2016-03-27-at-10.24.42-PM-300x208.png 300w, http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/Screen-Shot-2016-03-27-at-10.24.42-PM-768x533.png 768w, http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/Screen-Shot-2016-03-27-at-10.24.42-PM.png 844w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><em>Remapped caps lock &#8211; ^ Control Key</em></p>
<p>&nbsp;</p>
<p>Here is my vimrc  <a href="https://github.com/naveensrinivasan/dotvim/blob/master/vimrc" target="_blank">https://github.com/naveensrinivasan/dotvim/blob/master/vimrc</a>. One of the things I do  is , set no-op for arrow keys makes me a better vim user.  I have tried vim hard mode <a href="https://github.com/wikitopian/hardmode" target="_blank">https://github.com/wikitopian/hardmode</a> and have failed few times. That is something I want to enable to get rid of bad habits.</p>
<p>Still have to try <a href="https://neovim.io/" target="_blank">Neovim</a>. I especially like the neovim engine can be plugged into existing editor which is great.</p>
<p>And  I have ordered myself <a href="https://ultimatehackingkeyboard.com/" target="_blank">Ultimate hacking Keyboard</a> . The one of the reasons I am excited about this is ,you could use home row keys as mouse which would really replace mouse with this keyboard.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				
<article id="post-2781" class="post-2781 post type-post status-publish format-standard hentry category-uncategorized tag-health">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/03/11/taking-it-up-a-notch-with-my-standing-desk-with-fluidstance/" rel="bookmark"><time class="entry-date published" datetime="2016-03-11T01:09:50+00:00">March 11, 2016</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/uncategorized/" rel="category tag">Uncategorized</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/03/11/taking-it-up-a-notch-with-my-standing-desk-with-fluidstance/" rel="bookmark">Taking it up a notch with my standing desk with fluidstance</a></h1>
         
    </header>
	<section class="post-content">

		<p>I have been standing at work for the past 2  years. And I have seen significant improvement with respect to my productivity and non-drowsiness with standing desk. The one draw back with that I have seen was standing in a position where I put a lot of stress on one of the legs. And I wanted ti try something different.</p>
<p>That&#8217;s when I saw <a href="http://www.fluidstance.com" target="_blank">fluidstance</a>. Bought myself one which brings in a new challenge. I have been using it for a week and it is great  has made me sore in the places which I didn&#8217;t when I was standing without it.</p>
<p><a href="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/IMG_0557.jpg" rel="attachment wp-att-2791"><img class="alignnone size-medium wp-image-2791" src="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/IMG_0557-300x225.jpg" alt="IMG_0557" width="300" height="225" srcset="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/IMG_0557-300x225.jpg 300w, http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/IMG_0557-768x576.jpg 768w, http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2016/03/IMG_0557-1024x768.jpg 1024w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>It is also a fun toy!</p>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				
<article id="post-2641" class="post-2641 post type-post status-publish format-standard hentry category-f tag-adventcode tag-fsharp">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/01/12/adventcode-day-7/" rel="bookmark"><time class="entry-date published" datetime="2016-01-12T22:33:14+00:00">January 12, 2016</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/f/" rel="category tag">F#</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/01/12/adventcode-day-7/" rel="bookmark">Solution to Adventcode Day 7 in FSharp</a></h1>
         
    </header>
	<section class="post-content">

		<p>Here is my solution to <a href="http://adventofcode.com/day/7" target="_blank">adventcode problem 7 </a> using F#.</p>
<p>I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer&#8217;s  and these depend on other gates.</p>
<p>The puzzle starts of with simple problem</p>
<ul>
<li><code>123 -&gt; x</code></li>
<li><code>456 -&gt; y</code></li>
<li><code>x AND y -&gt; d </code></li>
<li><code>x OR y -&gt; e </code></li>
<li><code>x LSHIFT 2 -&gt; f </code></li>
<li><code>y RSHIFT 2 -&gt; </code></li>
<li><code>g NOT x -&gt; h </code></li>
<li><code>NOT y -&gt; i</code></li>
</ul>
<p>where the if you solve the above the code should work. But the complexity comes in when the order of the gates are not as expected and so the code would have solve the dependent ones before solving the entire solution.</p>
<p>One of the things that I really love about the FP code is union types and pattern matching.</p>
<p>That is the composite  type that could hold multiple different data types. In a non-functional static language I would have ended up creating nested types for each one of these.</p>
<p>My solutions to the adventofcode is here <a href="https://github.com/naveensrinivasan/adventcode/" target="_blank">https://github.com/naveensrinivasan/adventcode/</a></p>
<p>After finishing I realized that I could have used the Tree structure which could help in traversal of the tree.</p>
<p><style> #wrap_githubgist6d162d9f631cd636d14b .gist-data {max-height: 100%;} </style><div id="wrap_githubgist6d162d9f631cd636d14b" style="width:100%"><script>document.write('<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist-embed-16647224f984fc8586ae94a1d644a995dc2a063cdd93962a270f733d68ae2efb.css">')
document.write('<div id=\"gist29950135\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-tree-fsx\" class=\"file\">\n    \n\n  <div itemprop=\"text\" class=\"blob-wrapper data type-f\">\n      <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n      <tr>\n        <td id=\"file-tree-fsx-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n        <td id=\"file-tree-fsx-LC1\" class=\"blob-code blob-code-inner js-file-line\"> <span class=\"pl-k\">type<\/span> <span class=\"pl-en\">Node&lt;&#39;a&gt; <\/span><span class=\"pl-k\">=<\/span> <span class=\"pl-k\">{<\/span> value <span class=\"pl-k\">:<\/span> &#39;a<span class=\"pl-k\">;<\/span> left <span class=\"pl-k\">:<\/span> Node<span class=\"pl-k\">&lt;<\/span>&#39;a<span class=\"pl-k\">&gt;<\/span> option<span class=\"pl-k\">;<\/span> right <span class=\"pl-k\">:<\/span> Node<span class=\"pl-k\">&lt;<\/span>&#39;a<span class=\"pl-k\">&gt;<\/span> option <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n<\/table>\n\n  <\/div>\n\n  <\/div>\n  \n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/naveensrinivasan/6d162d9f631cd636d14b/raw/dc69d52973bfe68f7894b1beb3d0f44473e2a8ba/tree.fsx\" style=\"float:right\">view raw<\/a>\n        <a href=\"https://gist.github.com/naveensrinivasan/6d162d9f631cd636d14b#file-tree-fsx\">tree.fsx<\/a>\n        hosted with &#10084; by <a href=\"https://github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>404: Not Found
</pre></code></noscript></div></div> which would have made this problem simpler.</p>
<p>Here is my solution.</p>
<style> #wrap_githubgist6165418036481bae3756 .gist-data {max-height: 100%;} </style><div id="wrap_githubgist6165418036481bae3756" style="width:100%"><script>document.write('<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist-embed-16647224f984fc8586ae94a1d644a995dc2a063cdd93962a270f733d68ae2efb.css">')
document.write('<div id=\"gist29949632\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-7-fsx\" class=\"file\">\n    \n\n  <div itemprop=\"text\" class=\"blob-wrapper data type-f\">\n      <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n      <tr>\n        <td id=\"file-7-fsx-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n        <td id=\"file-7-fsx-LC1\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">open<\/span> <span class=\"pl-en\">System<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"><\/td>\n        <td id=\"file-7-fsx-LC2\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">open<\/span> <span class=\"pl-en\">System.<span class=\"pl-en\">IO<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"><\/td>\n        <td id=\"file-7-fsx-LC3\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">open<\/span> <span class=\"pl-en\">System.<span class=\"pl-en\">Text<\/span>.<span class=\"pl-en\">RegularExpressions<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\"><\/td>\n        <td id=\"file-7-fsx-LC4\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\"><\/td>\n        <td id=\"file-7-fsx-LC5\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">filereadlines<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">=<\/span> File.ReadAllLines(Path.Combine(<span class=\"pl-k\">__<\/span>SOURCE<span class=\"pl-k\">_<\/span>DIRECTORY<span class=\"pl-k\">__<\/span>, f))<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\"><\/td>\n        <td id=\"file-7-fsx-LC6\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L7\" class=\"blob-num js-line-number\" data-line-number=\"7\"><\/td>\n        <td id=\"file-7-fsx-LC7\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">type<\/span> <span class=\"pl-en\">Operations <\/span><span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L8\" class=\"blob-num js-line-number\" data-line-number=\"8\"><\/td>\n        <td id=\"file-7-fsx-LC8\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> ASSIGNVALUE<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L9\" class=\"blob-num js-line-number\" data-line-number=\"9\"><\/td>\n        <td id=\"file-7-fsx-LC9\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> ASSIGN <span class=\"pl-k\">of<\/span> string<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L10\" class=\"blob-num js-line-number\" data-line-number=\"10\"><\/td>\n        <td id=\"file-7-fsx-LC10\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> AND <span class=\"pl-k\">of<\/span> string <span class=\"pl-k\">*<\/span> string<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L11\" class=\"blob-num js-line-number\" data-line-number=\"11\"><\/td>\n        <td id=\"file-7-fsx-LC11\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> INTAND <span class=\"pl-k\">of<\/span> uint16 <span class=\"pl-k\">*<\/span> string<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L12\" class=\"blob-num js-line-number\" data-line-number=\"12\"><\/td>\n        <td id=\"file-7-fsx-LC12\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> OR <span class=\"pl-k\">of<\/span> string <span class=\"pl-k\">*<\/span> string<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L13\" class=\"blob-num js-line-number\" data-line-number=\"13\"><\/td>\n        <td id=\"file-7-fsx-LC13\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> INTOR <span class=\"pl-k\">of<\/span> uint16 <span class=\"pl-k\">*<\/span> string<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L14\" class=\"blob-num js-line-number\" data-line-number=\"14\"><\/td>\n        <td id=\"file-7-fsx-LC14\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> NOT <span class=\"pl-k\">of<\/span> string<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L15\" class=\"blob-num js-line-number\" data-line-number=\"15\"><\/td>\n        <td id=\"file-7-fsx-LC15\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> LSHIFT <span class=\"pl-k\">of<\/span> int <span class=\"pl-k\">*<\/span> string<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L16\" class=\"blob-num js-line-number\" data-line-number=\"16\"><\/td>\n        <td id=\"file-7-fsx-LC16\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> RSHIFT <span class=\"pl-k\">of<\/span> int <span class=\"pl-k\">*<\/span> string<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L17\" class=\"blob-num js-line-number\" data-line-number=\"17\"><\/td>\n        <td id=\"file-7-fsx-LC17\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L18\" class=\"blob-num js-line-number\" data-line-number=\"18\"><\/td>\n        <td id=\"file-7-fsx-LC18\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">type<\/span> <span class=\"pl-en\">Instruction <\/span><span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L19\" class=\"blob-num js-line-number\" data-line-number=\"19\"><\/td>\n        <td id=\"file-7-fsx-LC19\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">:<\/span> string<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L20\" class=\"blob-num js-line-number\" data-line-number=\"20\"><\/td>\n        <td id=\"file-7-fsx-LC20\" class=\"blob-code blob-code-inner js-file-line\">      Value <span class=\"pl-k\">:<\/span> uint16 option<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L21\" class=\"blob-num js-line-number\" data-line-number=\"21\"><\/td>\n        <td id=\"file-7-fsx-LC21\" class=\"blob-code blob-code-inner js-file-line\">      Operation <span class=\"pl-k\">:<\/span> Operations <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L22\" class=\"blob-num js-line-number\" data-line-number=\"22\"><\/td>\n        <td id=\"file-7-fsx-LC22\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L23\" class=\"blob-num js-line-number\" data-line-number=\"23\"><\/td>\n        <td id=\"file-7-fsx-LC23\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">parse<\/span> (<span class=\"pl-v\">line<\/span> : <span class=\"pl-v\">string<\/span>) <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L24\" class=\"blob-num js-line-number\" data-line-number=\"24\"><\/td>\n        <td id=\"file-7-fsx-LC24\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">words<\/span> <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L25\" class=\"blob-num js-line-number\" data-line-number=\"25\"><\/td>\n        <td id=\"file-7-fsx-LC25\" class=\"blob-code blob-code-inner js-file-line\">        Regex.Matches(line, <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>[\\w\\d_]+<span class=\"pl-pds\">&quot;<\/span><\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L26\" class=\"blob-num js-line-number\" data-line-number=\"26\"><\/td>\n        <td id=\"file-7-fsx-LC26\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">|&gt;<\/span> Seq.cast<span class=\"pl-k\">&lt;<\/span>Match<span class=\"pl-k\">&gt;<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L27\" class=\"blob-num js-line-number\" data-line-number=\"27\"><\/td>\n        <td id=\"file-7-fsx-LC27\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">|&gt;<\/span> Seq.filter (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> f.Success)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L28\" class=\"blob-num js-line-number\" data-line-number=\"28\"><\/td>\n        <td id=\"file-7-fsx-LC28\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">|&gt;<\/span> Seq.map (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> f.Value)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L29\" class=\"blob-num js-line-number\" data-line-number=\"29\"><\/td>\n        <td id=\"file-7-fsx-LC29\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">|&gt;<\/span> Seq.toArray<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L30\" class=\"blob-num js-line-number\" data-line-number=\"30\"><\/td>\n        <td id=\"file-7-fsx-LC30\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">match<\/span> words <span class=\"pl-k\">with<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L31\" class=\"blob-num js-line-number\" data-line-number=\"31\"><\/td>\n        <td id=\"file-7-fsx-LC31\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">[|<\/span> a<span class=\"pl-k\">;<\/span> b <span class=\"pl-k\">|]<\/span> <span class=\"pl-k\">when<\/span> Int16.TryParse a <span class=\"pl-k\">|&gt;<\/span> fst <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L32\" class=\"blob-num js-line-number\" data-line-number=\"32\"><\/td>\n        <td id=\"file-7-fsx-LC32\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">=<\/span> b<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L33\" class=\"blob-num js-line-number\" data-line-number=\"33\"><\/td>\n        <td id=\"file-7-fsx-LC33\" class=\"blob-code blob-code-inner js-file-line\">          Value <span class=\"pl-k\">=<\/span> uint16 a <span class=\"pl-k\">|&gt;<\/span> Some<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L34\" class=\"blob-num js-line-number\" data-line-number=\"34\"><\/td>\n        <td id=\"file-7-fsx-LC34\" class=\"blob-code blob-code-inner js-file-line\">          Operation <span class=\"pl-k\">=<\/span> Operations.ASSIGNVALUE <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L35\" class=\"blob-num js-line-number\" data-line-number=\"35\"><\/td>\n        <td id=\"file-7-fsx-LC35\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">[|<\/span> a<span class=\"pl-k\">;<\/span> b <span class=\"pl-k\">|]<\/span> <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L36\" class=\"blob-num js-line-number\" data-line-number=\"36\"><\/td>\n        <td id=\"file-7-fsx-LC36\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">=<\/span> b<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L37\" class=\"blob-num js-line-number\" data-line-number=\"37\"><\/td>\n        <td id=\"file-7-fsx-LC37\" class=\"blob-code blob-code-inner js-file-line\">          Value <span class=\"pl-k\">=<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L38\" class=\"blob-num js-line-number\" data-line-number=\"38\"><\/td>\n        <td id=\"file-7-fsx-LC38\" class=\"blob-code blob-code-inner js-file-line\">          Operation <span class=\"pl-k\">=<\/span> Operations.ASSIGN(a) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L39\" class=\"blob-num js-line-number\" data-line-number=\"39\"><\/td>\n        <td id=\"file-7-fsx-LC39\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">[|<\/span> a<span class=\"pl-k\">;<\/span> b<span class=\"pl-k\">;<\/span> c <span class=\"pl-k\">|]<\/span> <span class=\"pl-k\">when<\/span> a <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>NOT<span class=\"pl-pds\">&quot;<\/span><\/span> <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L40\" class=\"blob-num js-line-number\" data-line-number=\"40\"><\/td>\n        <td id=\"file-7-fsx-LC40\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">=<\/span> c<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L41\" class=\"blob-num js-line-number\" data-line-number=\"41\"><\/td>\n        <td id=\"file-7-fsx-LC41\" class=\"blob-code blob-code-inner js-file-line\">          Value <span class=\"pl-k\">=<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L42\" class=\"blob-num js-line-number\" data-line-number=\"42\"><\/td>\n        <td id=\"file-7-fsx-LC42\" class=\"blob-code blob-code-inner js-file-line\">          Operation <span class=\"pl-k\">=<\/span> Operations.NOT(b) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L43\" class=\"blob-num js-line-number\" data-line-number=\"43\"><\/td>\n        <td id=\"file-7-fsx-LC43\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">[|<\/span> a<span class=\"pl-k\">;<\/span> b<span class=\"pl-k\">;<\/span> c<span class=\"pl-k\">;<\/span> d <span class=\"pl-k\">|]<\/span> <span class=\"pl-k\">when<\/span> b <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>AND<span class=\"pl-pds\">&quot;<\/span><\/span> <span class=\"pl-k\">&amp;&amp;<\/span> Int16.TryParse a <span class=\"pl-k\">|&gt;<\/span> fst <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L44\" class=\"blob-num js-line-number\" data-line-number=\"44\"><\/td>\n        <td id=\"file-7-fsx-LC44\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">=<\/span> d<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L45\" class=\"blob-num js-line-number\" data-line-number=\"45\"><\/td>\n        <td id=\"file-7-fsx-LC45\" class=\"blob-code blob-code-inner js-file-line\">          Value <span class=\"pl-k\">=<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L46\" class=\"blob-num js-line-number\" data-line-number=\"46\"><\/td>\n        <td id=\"file-7-fsx-LC46\" class=\"blob-code blob-code-inner js-file-line\">          Operation <span class=\"pl-k\">=<\/span> Operations.INTAND(uint16 a, c) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L47\" class=\"blob-num js-line-number\" data-line-number=\"47\"><\/td>\n        <td id=\"file-7-fsx-LC47\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">[|<\/span> a<span class=\"pl-k\">;<\/span> b<span class=\"pl-k\">;<\/span> c<span class=\"pl-k\">;<\/span> d <span class=\"pl-k\">|]<\/span> <span class=\"pl-k\">when<\/span> b <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>AND<span class=\"pl-pds\">&quot;<\/span><\/span> <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L48\" class=\"blob-num js-line-number\" data-line-number=\"48\"><\/td>\n        <td id=\"file-7-fsx-LC48\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">=<\/span> d<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L49\" class=\"blob-num js-line-number\" data-line-number=\"49\"><\/td>\n        <td id=\"file-7-fsx-LC49\" class=\"blob-code blob-code-inner js-file-line\">          Value <span class=\"pl-k\">=<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L50\" class=\"blob-num js-line-number\" data-line-number=\"50\"><\/td>\n        <td id=\"file-7-fsx-LC50\" class=\"blob-code blob-code-inner js-file-line\">          Operation <span class=\"pl-k\">=<\/span> Operations.AND(a, c) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L51\" class=\"blob-num js-line-number\" data-line-number=\"51\"><\/td>\n        <td id=\"file-7-fsx-LC51\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">[|<\/span> a<span class=\"pl-k\">;<\/span> b<span class=\"pl-k\">;<\/span> c<span class=\"pl-k\">;<\/span> d <span class=\"pl-k\">|]<\/span> <span class=\"pl-k\">when<\/span> b <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>OR<span class=\"pl-pds\">&quot;<\/span><\/span> <span class=\"pl-k\">&amp;&amp;<\/span> Int16.TryParse a <span class=\"pl-k\">|&gt;<\/span> fst <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L52\" class=\"blob-num js-line-number\" data-line-number=\"52\"><\/td>\n        <td id=\"file-7-fsx-LC52\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">=<\/span> d<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L53\" class=\"blob-num js-line-number\" data-line-number=\"53\"><\/td>\n        <td id=\"file-7-fsx-LC53\" class=\"blob-code blob-code-inner js-file-line\">          Value <span class=\"pl-k\">=<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L54\" class=\"blob-num js-line-number\" data-line-number=\"54\"><\/td>\n        <td id=\"file-7-fsx-LC54\" class=\"blob-code blob-code-inner js-file-line\">          Operation <span class=\"pl-k\">=<\/span> Operations.INTOR(uint16 a, c) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L55\" class=\"blob-num js-line-number\" data-line-number=\"55\"><\/td>\n        <td id=\"file-7-fsx-LC55\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">[|<\/span> a<span class=\"pl-k\">;<\/span> b<span class=\"pl-k\">;<\/span> c<span class=\"pl-k\">;<\/span> d <span class=\"pl-k\">|]<\/span> <span class=\"pl-k\">when<\/span> b <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>OR<span class=\"pl-pds\">&quot;<\/span><\/span> <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L56\" class=\"blob-num js-line-number\" data-line-number=\"56\"><\/td>\n        <td id=\"file-7-fsx-LC56\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">=<\/span> d<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L57\" class=\"blob-num js-line-number\" data-line-number=\"57\"><\/td>\n        <td id=\"file-7-fsx-LC57\" class=\"blob-code blob-code-inner js-file-line\">          Value <span class=\"pl-k\">=<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L58\" class=\"blob-num js-line-number\" data-line-number=\"58\"><\/td>\n        <td id=\"file-7-fsx-LC58\" class=\"blob-code blob-code-inner js-file-line\">          Operation <span class=\"pl-k\">=<\/span> Operations.OR(a, c) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L59\" class=\"blob-num js-line-number\" data-line-number=\"59\"><\/td>\n        <td id=\"file-7-fsx-LC59\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">[|<\/span> a<span class=\"pl-k\">;<\/span> b<span class=\"pl-k\">;<\/span> c<span class=\"pl-k\">;<\/span> d <span class=\"pl-k\">|]<\/span> <span class=\"pl-k\">when<\/span> b <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>LSHIFT<span class=\"pl-pds\">&quot;<\/span><\/span> <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L60\" class=\"blob-num js-line-number\" data-line-number=\"60\"><\/td>\n        <td id=\"file-7-fsx-LC60\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">=<\/span> d<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L61\" class=\"blob-num js-line-number\" data-line-number=\"61\"><\/td>\n        <td id=\"file-7-fsx-LC61\" class=\"blob-code blob-code-inner js-file-line\">          Value <span class=\"pl-k\">=<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L62\" class=\"blob-num js-line-number\" data-line-number=\"62\"><\/td>\n        <td id=\"file-7-fsx-LC62\" class=\"blob-code blob-code-inner js-file-line\">          Operation <span class=\"pl-k\">=<\/span> Operations.LSHIFT(int c, a) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L63\" class=\"blob-num js-line-number\" data-line-number=\"63\"><\/td>\n        <td id=\"file-7-fsx-LC63\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">[|<\/span> a<span class=\"pl-k\">;<\/span> b<span class=\"pl-k\">;<\/span> c<span class=\"pl-k\">;<\/span> d <span class=\"pl-k\">|]<\/span> <span class=\"pl-k\">when<\/span> b <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>RSHIFT<span class=\"pl-pds\">&quot;<\/span><\/span> <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L64\" class=\"blob-num js-line-number\" data-line-number=\"64\"><\/td>\n        <td id=\"file-7-fsx-LC64\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">{<\/span> Key <span class=\"pl-k\">=<\/span> d<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L65\" class=\"blob-num js-line-number\" data-line-number=\"65\"><\/td>\n        <td id=\"file-7-fsx-LC65\" class=\"blob-code blob-code-inner js-file-line\">          Value <span class=\"pl-k\">=<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L66\" class=\"blob-num js-line-number\" data-line-number=\"66\"><\/td>\n        <td id=\"file-7-fsx-LC66\" class=\"blob-code blob-code-inner js-file-line\">          Operation <span class=\"pl-k\">=<\/span> Operations.RSHIFT(int c, a) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L67\" class=\"blob-num js-line-number\" data-line-number=\"67\"><\/td>\n        <td id=\"file-7-fsx-LC67\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|<\/span> <span class=\"pl-k\">_<\/span> <span class=\"pl-k\">-&gt;<\/span> failwith <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>Pattern not found<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L68\" class=\"blob-num js-line-number\" data-line-number=\"68\"><\/td>\n        <td id=\"file-7-fsx-LC68\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L69\" class=\"blob-num js-line-number\" data-line-number=\"69\"><\/td>\n        <td id=\"file-7-fsx-LC69\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">let<\/span><span class=\"pl-k\"> rec<\/span> <span class=\"pl-smi\">inputsWithValues<\/span> (<span class=\"pl-v\">instructions<\/span> : <span class=\"pl-v\">seq<\/span>&lt;<span class=\"pl-v\">Instruction<\/span>&gt;) <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L70\" class=\"blob-num js-line-number\" data-line-number=\"70\"><\/td>\n        <td id=\"file-7-fsx-LC70\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">values<\/span> <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L71\" class=\"blob-num js-line-number\" data-line-number=\"71\"><\/td>\n        <td id=\"file-7-fsx-LC71\" class=\"blob-code blob-code-inner js-file-line\">        instructions<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L72\" class=\"blob-num js-line-number\" data-line-number=\"72\"><\/td>\n        <td id=\"file-7-fsx-LC72\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">|&gt;<\/span> Seq.filter (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> f.Value <span class=\"pl-k\">&lt;&gt;<\/span> None)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L73\" class=\"blob-num js-line-number\" data-line-number=\"73\"><\/td>\n        <td id=\"file-7-fsx-LC73\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">|&gt;<\/span> Seq.map (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> f.Key, f.Value)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L74\" class=\"blob-num js-line-number\" data-line-number=\"74\"><\/td>\n        <td id=\"file-7-fsx-LC74\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">|&gt;<\/span> Map.ofSeq<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L75\" class=\"blob-num js-line-number\" data-line-number=\"75\"><\/td>\n        <td id=\"file-7-fsx-LC75\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L76\" class=\"blob-num js-line-number\" data-line-number=\"76\"><\/td>\n        <td id=\"file-7-fsx-LC76\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">exist<\/span> <span class=\"pl-v\">k<\/span> <span class=\"pl-k\">=<\/span> values.ContainsKey k<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L77\" class=\"blob-num js-line-number\" data-line-number=\"77\"><\/td>\n        <td id=\"file-7-fsx-LC77\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">bothExist<\/span> <span class=\"pl-v\">k<\/span> <span class=\"pl-v\">h<\/span> <span class=\"pl-k\">=<\/span> exist k <span class=\"pl-k\">&amp;&amp;<\/span> exist h<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L78\" class=\"blob-num js-line-number\" data-line-number=\"78\"><\/td>\n        <td id=\"file-7-fsx-LC78\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L79\" class=\"blob-num js-line-number\" data-line-number=\"79\"><\/td>\n        <td id=\"file-7-fsx-LC79\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">getvalue<\/span> <span class=\"pl-v\">k<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L80\" class=\"blob-num js-line-number\" data-line-number=\"80\"><\/td>\n        <td id=\"file-7-fsx-LC80\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">if<\/span> exist k <span class=\"pl-k\">then<\/span> f values.<span class=\"pl-k\">[<\/span>k<span class=\"pl-k\">]<\/span>.Value <span class=\"pl-k\">|&gt;<\/span> Some<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L81\" class=\"blob-num js-line-number\" data-line-number=\"81\"><\/td>\n        <td id=\"file-7-fsx-LC81\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">else<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L82\" class=\"blob-num js-line-number\" data-line-number=\"82\"><\/td>\n        <td id=\"file-7-fsx-LC82\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L83\" class=\"blob-num js-line-number\" data-line-number=\"83\"><\/td>\n        <td id=\"file-7-fsx-LC83\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">binaryOP<\/span> <span class=\"pl-v\">a<\/span> <span class=\"pl-v\">b<\/span> (<span class=\"pl-v\">f<\/span> : <span class=\"pl-v\">uint16<\/span> -&gt; <span class=\"pl-v\">uint16<\/span> -&gt; <span class=\"pl-v\">uint16<\/span>) <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L84\" class=\"blob-num js-line-number\" data-line-number=\"84\"><\/td>\n        <td id=\"file-7-fsx-LC84\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">if<\/span> bothExist a b <span class=\"pl-k\">then<\/span> (f values.<span class=\"pl-k\">[<\/span>a<span class=\"pl-k\">]<\/span>.Value values.<span class=\"pl-k\">[<\/span>b<span class=\"pl-k\">]<\/span>.Value) <span class=\"pl-k\">|&gt;<\/span> Some<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L85\" class=\"blob-num js-line-number\" data-line-number=\"85\"><\/td>\n        <td id=\"file-7-fsx-LC85\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">else<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L86\" class=\"blob-num js-line-number\" data-line-number=\"86\"><\/td>\n        <td id=\"file-7-fsx-LC86\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L87\" class=\"blob-num js-line-number\" data-line-number=\"87\"><\/td>\n        <td id=\"file-7-fsx-LC87\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">shiftOP<\/span> <span class=\"pl-v\">a<\/span> <span class=\"pl-v\">b<\/span> (<span class=\"pl-v\">f<\/span> : <span class=\"pl-v\">uint16<\/span> -&gt; <span class=\"pl-v\">int<\/span> -&gt; <span class=\"pl-v\">uint16<\/span>) <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L88\" class=\"blob-num js-line-number\" data-line-number=\"88\"><\/td>\n        <td id=\"file-7-fsx-LC88\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">if<\/span> exist a <span class=\"pl-k\">then<\/span> f values.<span class=\"pl-k\">[<\/span>a<span class=\"pl-k\">]<\/span>.Value b <span class=\"pl-k\">|&gt;<\/span> Some<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L89\" class=\"blob-num js-line-number\" data-line-number=\"89\"><\/td>\n        <td id=\"file-7-fsx-LC89\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">else<\/span> None<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L90\" class=\"blob-num js-line-number\" data-line-number=\"90\"><\/td>\n        <td id=\"file-7-fsx-LC90\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L91\" class=\"blob-num js-line-number\" data-line-number=\"91\"><\/td>\n        <td id=\"file-7-fsx-LC91\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">result<\/span> <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L92\" class=\"blob-num js-line-number\" data-line-number=\"92\"><\/td>\n        <td id=\"file-7-fsx-LC92\" class=\"blob-code blob-code-inner js-file-line\">        instructions <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L93\" class=\"blob-num js-line-number\" data-line-number=\"93\"><\/td>\n        <td id=\"file-7-fsx-LC93\" class=\"blob-code blob-code-inner js-file-line\">        <span class=\"pl-k\">|&gt;<\/span> Seq.map (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L94\" class=\"blob-num js-line-number\" data-line-number=\"94\"><\/td>\n        <td id=\"file-7-fsx-LC94\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">match<\/span> f.Operation <span class=\"pl-k\">with<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L95\" class=\"blob-num js-line-number\" data-line-number=\"95\"><\/td>\n        <td id=\"file-7-fsx-LC95\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">|<\/span> ASSIGNVALUE <span class=\"pl-k\">-&gt;<\/span> f<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L96\" class=\"blob-num js-line-number\" data-line-number=\"96\"><\/td>\n        <td id=\"file-7-fsx-LC96\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">|<\/span> ASSIGN(a) <span class=\"pl-k\">-&gt;<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L97\" class=\"blob-num js-line-number\" data-line-number=\"97\"><\/td>\n        <td id=\"file-7-fsx-LC97\" class=\"blob-code blob-code-inner js-file-line\">                   <span class=\"pl-k\">{<\/span> f <span class=\"pl-k\">with<\/span> Value <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L98\" class=\"blob-num js-line-number\" data-line-number=\"98\"><\/td>\n        <td id=\"file-7-fsx-LC98\" class=\"blob-code blob-code-inner js-file-line\">                                <span class=\"pl-k\">if<\/span> exist a <span class=\"pl-k\">then<\/span> values.<span class=\"pl-k\">[<\/span>a<span class=\"pl-k\">]<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L99\" class=\"blob-num js-line-number\" data-line-number=\"99\"><\/td>\n        <td id=\"file-7-fsx-LC99\" class=\"blob-code blob-code-inner js-file-line\">                                <span class=\"pl-k\">else<\/span> None <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L100\" class=\"blob-num js-line-number\" data-line-number=\"100\"><\/td>\n        <td id=\"file-7-fsx-LC100\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">|<\/span> NOT(A) <span class=\"pl-k\">-&gt;<\/span> <span class=\"pl-k\">{<\/span> f <span class=\"pl-k\">with<\/span> Value <span class=\"pl-k\">=<\/span> getvalue A (<span class=\"pl-k\">~~~<\/span>)<span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L101\" class=\"blob-num js-line-number\" data-line-number=\"101\"><\/td>\n        <td id=\"file-7-fsx-LC101\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">|<\/span> AND(A, B) <span class=\"pl-k\">-&gt;<\/span> <span class=\"pl-k\">{<\/span> f <span class=\"pl-k\">with<\/span> Value <span class=\"pl-k\">=<\/span> binaryOP A B (<span class=\"pl-k\">&amp;&amp;&amp;<\/span>) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L102\" class=\"blob-num js-line-number\" data-line-number=\"102\"><\/td>\n        <td id=\"file-7-fsx-LC102\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">|<\/span> INTAND(A, B) <span class=\"pl-k\">-&gt;<\/span> <span class=\"pl-k\">{<\/span> f <span class=\"pl-k\">with<\/span> Value <span class=\"pl-k\">=<\/span> getvalue B ((<span class=\"pl-k\">&amp;&amp;&amp;<\/span>) A) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L103\" class=\"blob-num js-line-number\" data-line-number=\"103\"><\/td>\n        <td id=\"file-7-fsx-LC103\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">|<\/span> INTOR(A, B) <span class=\"pl-k\">-&gt;<\/span> <span class=\"pl-k\">{<\/span> f <span class=\"pl-k\">with<\/span> Value <span class=\"pl-k\">=<\/span> getvalue B ((<span class=\"pl-k\">|||<\/span>) A) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L104\" class=\"blob-num js-line-number\" data-line-number=\"104\"><\/td>\n        <td id=\"file-7-fsx-LC104\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">|<\/span> OR(A, B) <span class=\"pl-k\">-&gt;<\/span> <span class=\"pl-k\">{<\/span> f <span class=\"pl-k\">with<\/span> Value <span class=\"pl-k\">=<\/span> binaryOP A B (<span class=\"pl-k\">|||<\/span>) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L105\" class=\"blob-num js-line-number\" data-line-number=\"105\"><\/td>\n        <td id=\"file-7-fsx-LC105\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">|<\/span> LSHIFT(A, B) <span class=\"pl-k\">-&gt;<\/span> <span class=\"pl-k\">{<\/span> f <span class=\"pl-k\">with<\/span> Value <span class=\"pl-k\">=<\/span> shiftOP B A (<span class=\"pl-k\">&lt;&lt;&lt;<\/span>) <span class=\"pl-k\">}<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L106\" class=\"blob-num js-line-number\" data-line-number=\"106\"><\/td>\n        <td id=\"file-7-fsx-LC106\" class=\"blob-code blob-code-inner js-file-line\">               <span class=\"pl-k\">|<\/span> RSHIFT(A, B) <span class=\"pl-k\">-&gt;<\/span> <span class=\"pl-k\">{<\/span> f <span class=\"pl-k\">with<\/span> Value <span class=\"pl-k\">=<\/span> shiftOP B A (<span class=\"pl-k\">&gt;&gt;&gt;<\/span>) <span class=\"pl-k\">}<\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L107\" class=\"blob-num js-line-number\" data-line-number=\"107\"><\/td>\n        <td id=\"file-7-fsx-LC107\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L108\" class=\"blob-num js-line-number\" data-line-number=\"108\"><\/td>\n        <td id=\"file-7-fsx-LC108\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">if<\/span> result <span class=\"pl-k\">|&gt;<\/span> Seq.exists (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> f.Value <span class=\"pl-k\">=<\/span> None) <span class=\"pl-k\">then<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L109\" class=\"blob-num js-line-number\" data-line-number=\"109\"><\/td>\n        <td id=\"file-7-fsx-LC109\" class=\"blob-code blob-code-inner js-file-line\">        inputsWithValues result<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L110\" class=\"blob-num js-line-number\" data-line-number=\"110\"><\/td>\n        <td id=\"file-7-fsx-LC110\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">else<\/span> result<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L111\" class=\"blob-num js-line-number\" data-line-number=\"111\"><\/td>\n        <td id=\"file-7-fsx-LC111\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L112\" class=\"blob-num js-line-number\" data-line-number=\"112\"><\/td>\n        <td id=\"file-7-fsx-LC112\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">parsedValues<\/span> <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L113\" class=\"blob-num js-line-number\" data-line-number=\"113\"><\/td>\n        <td id=\"file-7-fsx-LC113\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>7.txt<span class=\"pl-pds\">&quot;<\/span><\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L114\" class=\"blob-num js-line-number\" data-line-number=\"114\"><\/td>\n        <td id=\"file-7-fsx-LC114\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|&gt;<\/span> filereadlines<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L115\" class=\"blob-num js-line-number\" data-line-number=\"115\"><\/td>\n        <td id=\"file-7-fsx-LC115\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|&gt;<\/span> Seq.map (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> parse f)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L116\" class=\"blob-num js-line-number\" data-line-number=\"116\"><\/td>\n        <td id=\"file-7-fsx-LC116\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L117\" class=\"blob-num js-line-number\" data-line-number=\"117\"><\/td>\n        <td id=\"file-7-fsx-LC117\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">a<\/span> <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L118\" class=\"blob-num js-line-number\" data-line-number=\"118\"><\/td>\n        <td id=\"file-7-fsx-LC118\" class=\"blob-code blob-code-inner js-file-line\">    parsedValues<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L119\" class=\"blob-num js-line-number\" data-line-number=\"119\"><\/td>\n        <td id=\"file-7-fsx-LC119\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|&gt;<\/span> inputsWithValues<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L120\" class=\"blob-num js-line-number\" data-line-number=\"120\"><\/td>\n        <td id=\"file-7-fsx-LC120\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|&gt;<\/span> Seq.find (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> f.Key <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>a<span class=\"pl-pds\">&quot;<\/span><\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L121\" class=\"blob-num js-line-number\" data-line-number=\"121\"><\/td>\n        <td id=\"file-7-fsx-LC121\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L122\" class=\"blob-num js-line-number\" data-line-number=\"122\"><\/td>\n        <td id=\"file-7-fsx-LC122\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">let<\/span> <span class=\"pl-smi\">secondA<\/span> <span class=\"pl-k\">=<\/span> <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L123\" class=\"blob-num js-line-number\" data-line-number=\"123\"><\/td>\n        <td id=\"file-7-fsx-LC123\" class=\"blob-code blob-code-inner js-file-line\">    parsedValues<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L124\" class=\"blob-num js-line-number\" data-line-number=\"124\"><\/td>\n        <td id=\"file-7-fsx-LC124\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|&gt;<\/span> Set.ofSeq<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L125\" class=\"blob-num js-line-number\" data-line-number=\"125\"><\/td>\n        <td id=\"file-7-fsx-LC125\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|&gt;<\/span> Set.remove (parsedValues <span class=\"pl-k\">|&gt;<\/span> Seq.find (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> f.Key <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>b<span class=\"pl-pds\">&quot;<\/span><\/span>))<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L126\" class=\"blob-num js-line-number\" data-line-number=\"126\"><\/td>\n        <td id=\"file-7-fsx-LC126\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|&gt;<\/span> Set.add (<span class=\"pl-k\">{<\/span> b <span class=\"pl-k\">with<\/span> Value <span class=\"pl-k\">=<\/span> a.Value <span class=\"pl-k\">}<\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L127\" class=\"blob-num js-line-number\" data-line-number=\"127\"><\/td>\n        <td id=\"file-7-fsx-LC127\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|&gt;<\/span> inputsWithValues<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L128\" class=\"blob-num js-line-number\" data-line-number=\"128\"><\/td>\n        <td id=\"file-7-fsx-LC128\" class=\"blob-code blob-code-inner js-file-line\">    <span class=\"pl-k\">|&gt;<\/span> Seq.find (<span class=\"pl-k\">fun<\/span> <span class=\"pl-v\">f<\/span> <span class=\"pl-k\">-&gt;<\/span> f.Key <span class=\"pl-k\">=<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>a<span class=\"pl-pds\">&quot;<\/span><\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L129\" class=\"blob-num js-line-number\" data-line-number=\"129\"><\/td>\n        <td id=\"file-7-fsx-LC129\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L130\" class=\"blob-num js-line-number\" data-line-number=\"130\"><\/td>\n        <td id=\"file-7-fsx-LC130\" class=\"blob-code blob-code-inner js-file-line\">printfn <span class=\"pl-pds\">&quot;<\/span><span class=\"pl-s\">a&#39;s value is <span class=\"pl-c1\">%d<\/span><\/span><span class=\"pl-pds\">&quot;<\/span> a.Value.Value<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L131\" class=\"blob-num js-line-number\" data-line-number=\"131\"><\/td>\n        <td id=\"file-7-fsx-LC131\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-7-fsx-L132\" class=\"blob-num js-line-number\" data-line-number=\"132\"><\/td>\n        <td id=\"file-7-fsx-LC132\" class=\"blob-code blob-code-inner js-file-line\">printfn <span class=\"pl-pds\">&quot;<\/span><span class=\"pl-s\">Second a&#39;s value is <span class=\"pl-c1\">%d<\/span><\/span><span class=\"pl-pds\">&quot;<\/span> secondA.Value.Value<\/td>\n      <\/tr>\n<\/table>\n\n  <\/div>\n\n  <\/div>\n  \n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/naveensrinivasan/6165418036481bae3756/raw/f7f1179841dedf563da2cf34003f3c13e8fbcf0b/7.fsx\" style=\"float:right\">view raw<\/a>\n        <a href=\"https://gist.github.com/naveensrinivasan/6165418036481bae3756#file-7-fsx\">7.fsx<\/a>\n        hosted with &#10084; by <a href=\"https://github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>404: Not Found
</pre></code></noscript></div></div>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				
<article id="post-2571" class="post-2571 post type-post status-publish format-standard hentry category-github tag-github">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2015/12/09/parsing-github-api/" rel="bookmark"><time class="entry-date published" datetime="2015-12-09T16:46:57+00:00">December 9, 2015</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/github/" rel="category tag">GitHub</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2015/12/09/parsing-github-api/" rel="bookmark">Parsing GitHub API</a></h1>
         
    </header>
	<section class="post-content">

		<p>I have been contributing to <a href="https://github.com/octokit/octokit.net" target="_blank">https://github.com/octokit/octokit.net</a> project. It is the API for accessing GitHub. One of the recent questions that came up was to get the list of <a href="https://github.com/octokit/octokit.net/issues/968" target="_blank">https://github.com/octokit/octokit.net/issues/968</a>.</p>
<p>The API&#8217;s are published in HTML <a href="https://developer.github.com/v3/" target="_blank">https://developer.github.com/v3/</a></p>
<p>There are about 63 + categories that have API. Wanted to parse all of these with least manual intervention.</p>
<style> #wrap_githubgist58fa8eb57e61535f10db .gist-data {max-height: 100%;} </style><div id="wrap_githubgist58fa8eb57e61535f10db" style="width:100%"><script>document.write('<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist/embed-179f8d7577e3c8a38bde242aa0303acf0cac9244c22c15d77960e83f9dfbf20e.css">')
document.write('<div id=\"gist28756110\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-githubapi-cs\" class=\"file\">\n    \n\n  <div class=\"blob-wrapper data type-c\">\n      <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n      <tr>\n        <td id=\"file-githubapi-cs-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n        <td id=\"file-githubapi-cs-LC1\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">var<\/span> keywords = <span class=\"pl-k\">new<\/span>[] { <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>GET<span class=\"pl-pds\">&quot;<\/span><\/span>, <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>DELETE<span class=\"pl-pds\">&quot;<\/span><\/span>, <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>PATCH<span class=\"pl-pds\">&quot;<\/span><\/span>, <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>POST<span class=\"pl-pds\">&quot;<\/span><\/span> };<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"><\/td>\n        <td id=\"file-githubapi-cs-LC2\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"><\/td>\n        <td id=\"file-githubapi-cs-LC3\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">var<\/span> document =<span class=\"pl-k\">new<\/span> HtmlDocument();<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\"><\/td>\n        <td id=\"file-githubapi-cs-LC4\" class=\"blob-code blob-code-inner js-file-line\">	document .LoadHtml(<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\"><\/td>\n        <td id=\"file-githubapi-cs-LC5\" class=\"blob-code blob-code-inner js-file-line\">	(<span class=\"pl-k\">new<\/span> HtmlWeb()<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\"><\/td>\n        <td id=\"file-githubapi-cs-LC6\" class=\"blob-code blob-code-inner js-file-line\">	.Load(<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>https://developer.github.com/v3/<span class=\"pl-pds\">&quot;<\/span><\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L7\" class=\"blob-num js-line-number\" data-line-number=\"7\"><\/td>\n        <td id=\"file-githubapi-cs-LC7\" class=\"blob-code blob-code-inner js-file-line\">	.DocumentNode.SelectSingleNode(<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>/html[1]/body[1]/div[3]/div[2]/div[1]<span class=\"pl-pds\">&quot;<\/span><\/span>).ChildNodes<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L8\" class=\"blob-num js-line-number\" data-line-number=\"8\"><\/td>\n        <td id=\"file-githubapi-cs-LC8\" class=\"blob-code blob-code-inner js-file-line\">	.Select(cn =&gt; cn.InnerHtml)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L9\" class=\"blob-num js-line-number\" data-line-number=\"9\"><\/td>\n        <td id=\"file-githubapi-cs-LC9\" class=\"blob-code blob-code-inner js-file-line\">	.Where(cn =&gt; !<span class=\"pl-k\">string<\/span>.IsNullOrEmpty(cn.Trim()))<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L10\" class=\"blob-num js-line-number\" data-line-number=\"10\"><\/td>\n        <td id=\"file-githubapi-cs-LC10\" class=\"blob-code blob-code-inner js-file-line\">	.First()));<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L11\" class=\"blob-num js-line-number\" data-line-number=\"11\"><\/td>\n        <td id=\"file-githubapi-cs-LC11\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L12\" class=\"blob-num js-line-number\" data-line-number=\"12\"><\/td>\n        <td id=\"file-githubapi-cs-LC12\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">var<\/span> dictionary  = document.DocumentNode.SelectNodes(<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>//a<span class=\"pl-pds\">&quot;<\/span><\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L13\" class=\"blob-num js-line-number\" data-line-number=\"13\"><\/td>\n        <td id=\"file-githubapi-cs-LC13\" class=\"blob-code blob-code-inner js-file-line\">				  .Select(p =&gt; <span class=\"pl-k\">new<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L14\" class=\"blob-num js-line-number\" data-line-number=\"14\"><\/td>\n        <td id=\"file-githubapi-cs-LC14\" class=\"blob-code blob-code-inner js-file-line\">				  {<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L15\" class=\"blob-num js-line-number\" data-line-number=\"15\"><\/td>\n        <td id=\"file-githubapi-cs-LC15\" class=\"blob-code blob-code-inner js-file-line\">					  Key = p.GetAttributeValue(<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>href<span class=\"pl-pds\">&quot;<\/span><\/span>, <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>not found<span class=\"pl-pds\">&quot;<\/span><\/span>).Replace(<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>/v3<span class=\"pl-pds\">&quot;<\/span><\/span>, <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span><span class=\"pl-pds\">&quot;<\/span><\/span>),<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L16\" class=\"blob-num js-line-number\" data-line-number=\"16\"><\/td>\n        <td id=\"file-githubapi-cs-LC16\" class=\"blob-code blob-code-inner js-file-line\">					  Value = <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>https://developer.github.com<span class=\"pl-pds\">&quot;<\/span><\/span> +  p.GetAttributeValue(<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>href<span class=\"pl-pds\">&quot;<\/span><\/span>, <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>not found<span class=\"pl-pds\">&quot;<\/span><\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L17\" class=\"blob-num js-line-number\" data-line-number=\"17\"><\/td>\n        <td id=\"file-githubapi-cs-LC17\" class=\"blob-code blob-code-inner js-file-line\">				  })<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L18\" class=\"blob-num js-line-number\" data-line-number=\"18\"><\/td>\n        <td id=\"file-githubapi-cs-LC18\" class=\"blob-code blob-code-inner js-file-line\">				  .Where(p =&gt; p.Key.Trim() != <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>#<span class=\"pl-pds\">&quot;<\/span><\/span> &amp; p.Key.Trim() != <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>/<span class=\"pl-pds\">&quot;<\/span><\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L19\" class=\"blob-num js-line-number\" data-line-number=\"19\"><\/td>\n        <td id=\"file-githubapi-cs-LC19\" class=\"blob-code blob-code-inner js-file-line\">			  .ToDictionary(p =&gt; p.Key, p =&gt; p.Value)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L20\" class=\"blob-num js-line-number\" data-line-number=\"20\"><\/td>\n        <td id=\"file-githubapi-cs-LC20\" class=\"blob-code blob-code-inner js-file-line\">			  .OrderBy(p =&gt; p.Key);<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L21\" class=\"blob-num js-line-number\" data-line-number=\"21\"><\/td>\n        <td id=\"file-githubapi-cs-LC21\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L22\" class=\"blob-num js-line-number\" data-line-number=\"22\"><\/td>\n        <td id=\"file-githubapi-cs-LC22\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-k\">var<\/span> newapis = <span class=\"pl-k\">new<\/span> Func&lt;<span class=\"pl-k\">string<\/span>, IEnumerable&lt;<span class=\"pl-k\">string<\/span>&gt;&gt;((url) =&gt;<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L23\" class=\"blob-num js-line-number\" data-line-number=\"23\"><\/td>\n        <td id=\"file-githubapi-cs-LC23\" class=\"blob-code blob-code-inner js-file-line\">{<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L24\" class=\"blob-num js-line-number\" data-line-number=\"24\"><\/td>\n        <td id=\"file-githubapi-cs-LC24\" class=\"blob-code blob-code-inner js-file-line\">	<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L25\" class=\"blob-num js-line-number\" data-line-number=\"25\"><\/td>\n        <td id=\"file-githubapi-cs-LC25\" class=\"blob-code blob-code-inner js-file-line\">	<span class=\"pl-k\">try<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L26\" class=\"blob-num js-line-number\" data-line-number=\"26\"><\/td>\n        <td id=\"file-githubapi-cs-LC26\" class=\"blob-code blob-code-inner js-file-line\">	{<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L27\" class=\"blob-num js-line-number\" data-line-number=\"27\"><\/td>\n        <td id=\"file-githubapi-cs-LC27\" class=\"blob-code blob-code-inner js-file-line\">	<span class=\"pl-k\">return<\/span> <span class=\"pl-k\">new<\/span> HtmlWeb()<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L28\" class=\"blob-num js-line-number\" data-line-number=\"28\"><\/td>\n        <td id=\"file-githubapi-cs-LC28\" class=\"blob-code blob-code-inner js-file-line\">	.Load(url)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L29\" class=\"blob-num js-line-number\" data-line-number=\"29\"><\/td>\n        <td id=\"file-githubapi-cs-LC29\" class=\"blob-code blob-code-inner js-file-line\">	.DocumentNode.SelectSingleNode(<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>//*[@id=<span class=\"pl-cce\">\\&quot;<\/span>wrapper<span class=\"pl-cce\">\\&quot;<\/span>]/div[1]<span class=\"pl-pds\">&quot;<\/span><\/span>).SelectNodes(<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>//pre<span class=\"pl-pds\">&quot;<\/span><\/span>)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L30\" class=\"blob-num js-line-number\" data-line-number=\"30\"><\/td>\n        <td id=\"file-githubapi-cs-LC30\" class=\"blob-code blob-code-inner js-file-line\">	.Select(dn =&gt; dn.InnerText)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L31\" class=\"blob-num js-line-number\" data-line-number=\"31\"><\/td>\n        <td id=\"file-githubapi-cs-LC31\" class=\"blob-code blob-code-inner js-file-line\">	.Where(cn =&gt; keywords<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L32\" class=\"blob-num js-line-number\" data-line-number=\"32\"><\/td>\n        <td id=\"file-githubapi-cs-LC32\" class=\"blob-code blob-code-inner js-file-line\">			.Contains(<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L33\" class=\"blob-num js-line-number\" data-line-number=\"33\"><\/td>\n        <td id=\"file-githubapi-cs-LC33\" class=\"blob-code blob-code-inner js-file-line\">			Regex.Split(cn, <span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span>[^a-zA-Z]+<span class=\"pl-pds\">&quot;<\/span><\/span>).First() <span class=\"pl-c\">/*split first  word*/<\/span>)).ToList();<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L34\" class=\"blob-num js-line-number\" data-line-number=\"34\"><\/td>\n        <td id=\"file-githubapi-cs-LC34\" class=\"blob-code blob-code-inner js-file-line\">	}<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L35\" class=\"blob-num js-line-number\" data-line-number=\"35\"><\/td>\n        <td id=\"file-githubapi-cs-LC35\" class=\"blob-code blob-code-inner js-file-line\">	<span class=\"pl-k\">catch<\/span> (Exception ex)<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L36\" class=\"blob-num js-line-number\" data-line-number=\"36\"><\/td>\n        <td id=\"file-githubapi-cs-LC36\" class=\"blob-code blob-code-inner js-file-line\">	{<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L37\" class=\"blob-num js-line-number\" data-line-number=\"37\"><\/td>\n        <td id=\"file-githubapi-cs-LC37\" class=\"blob-code blob-code-inner js-file-line\">		<span class=\"pl-k\">return<\/span> <span class=\"pl-k\">new<\/span>[] {<span class=\"pl-s\"><span class=\"pl-pds\">&quot;<\/span><span class=\"pl-pds\">&quot;<\/span><\/span>};<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L38\" class=\"blob-num js-line-number\" data-line-number=\"38\"><\/td>\n        <td id=\"file-githubapi-cs-LC38\" class=\"blob-code blob-code-inner js-file-line\">	}<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L39\" class=\"blob-num js-line-number\" data-line-number=\"39\"><\/td>\n        <td id=\"file-githubapi-cs-LC39\" class=\"blob-code blob-code-inner js-file-line\">	<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L40\" class=\"blob-num js-line-number\" data-line-number=\"40\"><\/td>\n        <td id=\"file-githubapi-cs-LC40\" class=\"blob-code blob-code-inner js-file-line\">});<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L41\" class=\"blob-num js-line-number\" data-line-number=\"41\"><\/td>\n        <td id=\"file-githubapi-cs-LC41\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L42\" class=\"blob-num js-line-number\" data-line-number=\"42\"><\/td>\n        <td id=\"file-githubapi-cs-LC42\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-c\">//these things don&#39;t have any API&#39;s - troubleshooting, versions,/activity/events/types/, auth<\/span><\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L43\" class=\"blob-num js-line-number\" data-line-number=\"43\"><\/td>\n        <td id=\"file-githubapi-cs-LC43\" class=\"blob-code blob-code-inner js-file-line\">dictionary.ToObservable()<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L44\" class=\"blob-num js-line-number\" data-line-number=\"44\"><\/td>\n        <td id=\"file-githubapi-cs-LC44\" class=\"blob-code blob-code-inner js-file-line\">.Select(d =&gt; <span class=\"pl-k\">new<\/span> {Key = d.Key, Values = newapis(d.Value) })<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-githubapi-cs-L45\" class=\"blob-num js-line-number\" data-line-number=\"45\"><\/td>\n        <td id=\"file-githubapi-cs-LC45\" class=\"blob-code blob-code-inner js-file-line\">.Dump();<\/td>\n      <\/tr>\n<\/table>\n\n  <\/div>\n\n  <\/div>\n  \n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/naveensrinivasan/58fa8eb57e61535f10db/raw/588949e026da6de5beb2b7967a39f0f3ed1b5811/githubapi.cs\" style=\"float:right\">view raw<\/a>\n        <a href=\"https://gist.github.com/naveensrinivasan/58fa8eb57e61535f10db#file-githubapi-cs\">githubapi.cs<\/a>\n        hosted with &#10084; by <a href=\"https://github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>Not Found</pre></code></noscript></div></div>
<p>The above goes to the main URL looks for all sub-categories and download&#8217;s each of the web pages and extracts <span class="pl-s"><span class="pl-pds">&#8220;</span><em>GET<span class="pl-pds">&#8220;</span></em></span><em>, <span class="pl-s"><span class="pl-pds">&#8220;</span>DELETE<span class="pl-pds">&#8220;</span></span>, <span class="pl-s"><span class="pl-pds">&#8220;</span>PATCH<span class="pl-pds">&#8220;</span></span>, <span class="pl-s"><span class="pl-pds">&#8220;</span>POST<span class="pl-pds">&#8220;</span></span></em></p>
<p>This uses the <a href="https://www.nuget.org/packages/HtmlAgilityPack" target="_blank">HtmlAgility</a> for parsing.</p>
<p>And the output would look something like this.</p>
<p><img src="https://camo.githubusercontent.com/03204325907aae77bb2f865117271bf28136d5ca/68747470733a2f2f7062732e7477696d672e636f6d2f6d656469612f4356766c6b5878564141456d7454332e706e67" alt="" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				
<article id="post-2481" class="post-2481 post type-post status-publish format-standard hentry category-f tag-docker tag-fsharp">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2015/11/11/fsharp-docker-image/" rel="bookmark"><time class="entry-date published" datetime="2015-11-11T02:41:14+00:00">November 11, 2015</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/f/" rel="category tag">F#</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2015/11/11/fsharp-docker-image/" rel="bookmark">fsharp docker image</a></h1>
         
    </header>
	<section class="post-content">

		<p>The fsharp project has a official docker image <a href="https://github.com/fsprojects/docker-fsharp" target="_blank">https://github.com/fsprojects/docker-fsharp</a> . The one issue with that is it is based on mono 4.0.4 which is buggy and fsharp does not work very well. The latest alpha release of the mono with which fsharp works well is 4.2.0. The 4.2.0 isn&#8217;t available in stable channels.</p>
<p>So I created a docker image with the latest mono from their alpha repo and using the latest fsharp from the github.</p>
<p><a href="https://github.com/naveensrinivasan/fsharp-docker" target="_blank">https://github.com/naveensrinivasan/fsharp-docker</a></p>
<style> #wrap_githubgist4a92a17c8ac0753f69bd130baaf990e6 .gist-data {max-height: 100%;} </style><div id="wrap_githubgist4a92a17c8ac0753f69bd130baaf990e6" style="width:100%"><script src = "http://gist-it.sudarmuthu.com/github/naveensrinivasan/fsharp-docker/blob/master/Dockerfile?footer=minimal"></script></div>
<p>It is also available in the docker hub. You could get it by</p>
<p>docker pull naveensrinivasan/fsharp</p>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				
<article id="post-1510" class="post-1510 post type-post status-publish format-standard hentry category-etw-net tag-etw tag-iis">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2015/06/28/view-the-http-redirect-and-response-message-from-an-external-authentication-provider-using-etw/" rel="bookmark"><time class="entry-date published" datetime="2015-06-28T22:57:26+00:00">June 28, 2015</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/net/etw-net/" rel="category tag">ETW</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2015/06/28/view-the-http-redirect-and-response-message-from-an-external-authentication-provider-using-etw/" rel="bookmark">View the http redirect and response message from an external authentication provider using ETW</a></h1>
         
    </header>
	<section class="post-content">

		<p>Recently I had to troubleshoot messages that were being sent from an web application hosted on IIS to an external authentication provider. The logs from the application wasn&#8217;t something closer to the metal and wasn&#8217;t really providing all the details. I really wanted something like fiddler for the webserver. I could have a ran network traces to troubleshoot the issue but the problem was it wasn&#8217;t happening consistently. It was sporadic. I knew there would be ETW traces that would have this information. The IIS web logs don&#8217;t capture this information.</p>
<p>Here is a example of the SAML authentication process</p>
<p><a href="https://naveensrinivasan.files.wordpress.com/2015/06/500px-saml.jpg"><img class=" size-full wp-image-1511 aligncenter" src="https://naveensrinivasan.files.wordpress.com/2015/06/500px-saml.jpg" alt="500px-SAML" width="500" height="469" /></a></p>
<p>In the application I was working with, IIS was the relying party and the user was to be authenticated with Identity Provider.</p>
<p>I wanted to troubleshoot the &#8220;AuthnRequest&#8221; and &#8220;Auth Resp&#8221; from and to the IIS. This can be applied to any external authentication like credit card authentication.</p>
<p>I fired my favorite tool <a href="http://blogs.msdn.com/b/vancem/archive/tags/perfview/" target="_blank">Perfview</a> and captured all the IIS traces along with other defaults. I wasn&#8217;t really interested in the .NET Code.</p>
<p>Here is the command line for Perfview to the IIS Providers<br />
<style> #wrap_githubgist86a6d7daac73484ef504 .gist-data {max-height: 100%;} </style><div id="wrap_githubgist86a6d7daac73484ef504" style="width:100%"><script>document.write('<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist/embed-61fbe32cd3a254e351927a33e609a34939873b5609950e3ff451332c0721fbf1.css">')
document.write('<div id=\"gist23799126\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-perfview-commandline-iis-etw-providers-txt\" class=\"file\">\n    \n\n  <div class=\"blob-wrapper data type-text\">\n      <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n      <tr>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-LC1\" class=\"blob-code blob-code-inner js-file-line\">Perfview commandLine<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"><\/td>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-LC2\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"><\/td>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-LC3\" class=\"blob-code blob-code-inner js-file-line\"> &quot;/DataFile:PerfViewData.etl&quot; /CircularMB:500 /MinSecForTrigger:0 /ClrEvents:GC,Binder,Loader,Jit,StopEnumeration,Security,AppDomainResourceManagement,Contention,Exception,Threading,JittedMethodILToNativeMap,OverrideAndSuppressNGenEvents,Type,GCHeapSurvivalAndMovement,GCHeapAndTypeNames,Stack,ThreadTransfer /Providers:&quot;Microsoft-Windows-IIS&quot; /NoNGenRundown &quot; <\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\"><\/td>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-LC4\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\"><\/td>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-LC5\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\"><\/td>\n        <td id=\"file-perfview-commandline-iis-etw-providers-txt-LC6\" class=\"blob-code blob-code-inner js-file-line\"> <\/td>\n      <\/tr>\n<\/table>\n\n  <\/div>\n\n  <\/div>\n  \n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/naveensrinivasan/86a6d7daac73484ef504/raw/ba1d6018611afcb81b2a18edf86afbcca133a5b6/Perfview-CommandLine-IIS-ETW-Providers.txt\" style=\"float:right\">view raw<\/a>\n        <a href=\"https://gist.github.com/naveensrinivasan/86a6d7daac73484ef504#file-perfview-commandline-iis-etw-providers-txt\">Perfview-CommandLine-IIS-ETW-Providers.txt<\/a>\n        hosted with &#10084; by <a href=\"https://github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>Not Found</pre></code></noscript></div></div></p>
<p>If for some reason that does not work.  You could always use the additional providers in Perfview and add these providers which are IIS and HTTP providers.</p>
<style> #wrap_githubgist5ac34bdd047d2d80cc44 .gist-data {max-height: 100%;} </style><div id="wrap_githubgist5ac34bdd047d2d80cc44" style="width:100%"><script>document.write('<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist/embed-61fbe32cd3a254e351927a33e609a34939873b5609950e3ff451332c0721fbf1.css">')
document.write('<div id=\"gist23799148\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-iis-etw-providers-txt\" class=\"file\">\n    \n\n  <div class=\"blob-wrapper data type-text\">\n      <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC1\" class=\"blob-code blob-code-inner js-file-line\">aff081fe-0247-4275-9c4e-021f3dc1da35<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC2\" class=\"blob-code blob-code-inner js-file-line\"> ee799f41-cfa5-550b-bf2c-344747c1c668<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC3\" class=\"blob-code blob-code-inner js-file-line\"> de4649c9-15e8-4fea-9d85-1cdda520c334<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC4\" class=\"blob-code blob-code-inner js-file-line\"> de4649c9-15e8-4fea-9d85-1cdda520c334<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC5\" class=\"blob-code blob-code-inner js-file-line\"> aff081fe-0247-4275-9c4e-021f3dc1da35<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC6\" class=\"blob-code blob-code-inner js-file-line\"> 06b94d9a-b15e-456e-a4ef-37c984a2cb4b<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L7\" class=\"blob-num js-line-number\" data-line-number=\"7\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC7\" class=\"blob-code blob-code-inner js-file-line\"> d55d3bc9-cba9-44df-827e-132d3a4596c2<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L8\" class=\"blob-num js-line-number\" data-line-number=\"8\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC8\" class=\"blob-code blob-code-inner js-file-line\"> a1c2040e-8840-4c31-ba11-9871031a19ea<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L9\" class=\"blob-num js-line-number\" data-line-number=\"9\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC9\" class=\"blob-code blob-code-inner js-file-line\"> 3a2a4e84-4c21-4981-ae10-3fda0d9b0f83<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L10\" class=\"blob-num js-line-number\" data-line-number=\"10\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC10\" class=\"blob-code blob-code-inner js-file-line\"> 23108b68-1b7e-43fa-94fb-ec3066805744<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L11\" class=\"blob-num js-line-number\" data-line-number=\"11\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC11\" class=\"blob-code blob-code-inner js-file-line\"> 7b6bc78c-898b-4170-bbf8-1a469ea43fc5<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L12\" class=\"blob-num js-line-number\" data-line-number=\"12\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC12\" class=\"blob-code blob-code-inner js-file-line\"> dd5ef90a-6398-47a4-ad34-4dcecdef795f<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L13\" class=\"blob-num js-line-number\" data-line-number=\"13\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC13\" class=\"blob-code blob-code-inner js-file-line\"> cac10856-9223-48fe-96ba-2a772274fb53<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L14\" class=\"blob-num js-line-number\" data-line-number=\"14\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC14\" class=\"blob-code blob-code-inner js-file-line\"> ab29f35c-8531-42ff-810d-b8552d23bc92<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L15\" class=\"blob-num js-line-number\" data-line-number=\"15\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC15\" class=\"blob-code blob-code-inner js-file-line\"> bbb924b8-f415-4f57-aa45-1007f704c9b1<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L16\" class=\"blob-num js-line-number\" data-line-number=\"16\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC16\" class=\"blob-code blob-code-inner js-file-line\"> da9a85bb-563d-40fb-a164-8e982ea6844b<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L17\" class=\"blob-num js-line-number\" data-line-number=\"17\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC17\" class=\"blob-code blob-code-inner js-file-line\"> 05448e22-93de-4a7a-bba5-92e27486a8be<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L18\" class=\"blob-num js-line-number\" data-line-number=\"18\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC18\" class=\"blob-code blob-code-inner js-file-line\"> 90303b54-419d-4081-a683-6dbcb532f261<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L19\" class=\"blob-num js-line-number\" data-line-number=\"19\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC19\" class=\"blob-code blob-code-inner js-file-line\"> 23108b68-1b7e-43fa-94fb-ec3066805744<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L20\" class=\"blob-num js-line-number\" data-line-number=\"20\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC20\" class=\"blob-code blob-code-inner js-file-line\"> 670080d9-742a-4187-8d16-41143d1290bd<\/td>\n      <\/tr>\n      <tr>\n        <td id=\"file-iis-etw-providers-txt-L21\" class=\"blob-num js-line-number\" data-line-number=\"21\"><\/td>\n        <td id=\"file-iis-etw-providers-txt-LC21\" class=\"blob-code blob-code-inner js-file-line\"> de4649c9-15e8-4fea-9d85-1cdda520c334<\/td>\n      <\/tr>\n<\/table>\n\n  <\/div>\n\n  <\/div>\n  \n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/naveensrinivasan/5ac34bdd047d2d80cc44/raw/b9a38402f471a157f9560f9bc9d1d7aaa86b2e22/IIS-ETW-Providers.txt\" style=\"float:right\">view raw<\/a>\n        <a href=\"https://gist.github.com/naveensrinivasan/5ac34bdd047d2d80cc44#file-iis-etw-providers-txt\">IIS-ETW-Providers.txt<\/a>\n        hosted with &#10084; by <a href=\"https://github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n')
</script><div style='margin-bottom:1em;padding:0;'><noscript><code><pre style='overflow:auto;margin:0;padding:0;border:1px solid #DDD;'>Not Found</pre></code></noscript></div></div>
<p>I let perfview do its job and then stopped the trace when there was an issue.</p>
<p>Here are the ETW events that capture the SAML Request that was sent from IIS to the IDP</p>
<p>Event Name</p>
<ol>
<li>IIS_Trace/IISGeneral/GENERAL_RESPONSE_HEADERS</li>
<li>Microsoft-Windows-IIS/EventID(47)</li>
<li>IIS_Trace/IISGeneral/GENERAL_RESPONSE_ENTITY_BUFFER</li>
<li>Microsoft-Windows-IIS/EventID(49)</li>
<li>IIS_Trace/IISGeneral/GENERAL_REQUEST_HEADERS</li>
</ol>
<p><a href="https://naveensrinivasan.files.wordpress.com/2015/06/samlrequest.jpg"><img class="alignleft size-full wp-image-1515" src="https://naveensrinivasan.files.wordpress.com/2015/06/samlrequest.jpg" alt="SamlRequest" width="660" height="231" srcset="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/samlrequest-300x105.jpg 300w, http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/samlrequest-1024x358.jpg 1024w, http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/samlrequest.jpg 1157w" sizes="(max-width: 660px) 100vw, 660px" /></a></p>
<p>Here are the ETW events that capture the SAML Response that was being posted from the IDP to the IIS</p>
<ol>
<li>IIS_Trace/IISGeneral/GENERAL_REQUEST_ENTITY</li>
<li>Microsoft-Windows-IIS/EventID(51)</li>
</ol>
<p><a href="https://naveensrinivasan.files.wordpress.com/2015/06/samlresponse.jpg"><img class="alignleft size-full wp-image-1514" src="https://naveensrinivasan.files.wordpress.com/2015/06/samlresponse.jpg" alt="samlresponse" width="660" height="39" srcset="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/samlresponse-300x18.jpg 300w, http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/samlresponse-1024x61.jpg 1024w, http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/samlresponse.jpg 1177w" sizes="(max-width: 660px) 100vw, 660px" /></a></p>
<p>With this I was able to troubleshoot message that was being sent and received to the IIS.</p>
<p>&nbsp;</p>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				
<article id="post-1499" class="post-1499 post type-post status-publish format-standard has-post-thumbnail hentry category-yoga tag-yoga">
		    <header class="post-header">
        			<span class="post-meta">
				<span class="posted-on"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2015/06/17/getting-my-yoga-stats-from-yogaglo/" rel="bookmark"><time class="entry-date published" datetime="2015-06-17T15:16:33+00:00">June 17, 2015</time></a></span><span class="byline"> by <span class="author vcard"><a class="url fn n" href="http://naveensrinivasan.azurewebsites.net/index.php/author/naveensrinivasan/">naveensrinivasan</a></span></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/category/yoga/" rel="category tag">yoga</a>			</span>
		        <h1 class="post-title"><a href="http://naveensrinivasan.azurewebsites.net/index.php/2015/06/17/getting-my-yoga-stats-from-yogaglo/" rel="bookmark">Getting my Yoga stats from Yogaglo</a></h1>
        
        	<div class="post-image">
        		<img data-src='<480:http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/naveensrinivasan-ardhachandrasana-150x150.jpg, <768:http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/naveensrinivasan-ardhachandrasana-225x300.jpg, >768:http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/naveensrinivasan-ardhachandrasana-768x1024.jpg' />
			</div>
			<noscript><img width="150" height="150" src="http://naveensrinivasan.azurewebsites.net/wp-content/uploads/2015/06/naveensrinivasan-ardhachandrasana-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="NaveenSrinivasan-ardhachandrasana" /></noscript>
	     
    </header>
	<section class="post-content">

		<div>
<h1></h1>
<p>I am Yogi and have practiced some sort physical workout for a while now. IMHO physical strength/ movement have always attributed to better clarity in my life! This post shows how I managed to get my <a title="Yogaglo" href="https://www.yogaglo.com/mypractice" target="_blank">yogaglo</a> stats to track and measure my practice.</p>
<p><a href="https://naveensrinivasan.files.wordpress.com/2015/06/naveensrinivasan-trx.jpg"><img class=" wp-image-1503 size-large alignnone" src="https://naveensrinivasan.files.wordpress.com/2015/06/naveensrinivasan-trx.jpg?w=343" alt="NaveenSrinivasan-TRX" width="343" height="1024" /></a></p>
<p>I am strong believer in habit loops and always have found that has worked a lot for me. One of the good books on this which I recommend to other is<a title="Power Of Habit" href="http://www.amazon.com/The-Power-Habit-What-Business/dp/081298160X" target="_blank">http://www.amazon.com/The-Power-Habit-What-Business/dp/081298160X</a> and also another good resource is <a href="http://getupandcode.com/" target="_blank">http://getupandcode.com/</a> which is a audio podcast fitness and technology.</p>
<p>I have been practicing Yoga for a while now and I would like to track my practice. I usually go to studio twice a week to be part of the <a title="Sangha" href="https://en.wikipedia.org/?title=Sangha" target="_blank">Sangha</a> and the rest 4-5 days I practice twice a day.</p>
<p>I knew yogaglo had my stats information stored in their site because when I logged into the site it did provide me with history. But I wanted the API to query based on the raw data. I wanted to track how often I worked and what kind of classes have I done. My goal was to work on the strengthening my core and I usually like to track that and API would help with this kind of information.</p>
<p>Thanks to tools like <a title="fiddler" href="http://www.telerik.com/fiddler" target="_blank">fiddler</a> or <a href="http://mitmproxy.org/" target="_blank">http://mitmproxy.org/</a> I could look at the http traffic that was sent with the headers. The headers are important because it contained the authentication token information. FYI I have set yogaglo to remember my login information which meant I have cookies that it could send across part of the http request.</p>
<p>Here is the code to download the yogaglo stats</p>
<p>[gist https://gist.github.com/naveensrinivasan/2e40f409bf6c386766c6]</p>
<p>You could take the json and dump into excel and get some amazing stats using <a href="https://support.office.com/en-us/article/Introduction-to-Microsoft-Power-Query-for-Excel-6E92E2F4-2079-4E1F-BAD5-89F6269CD605" target="_blank">powerquery</a>.</p>
<p>I am not a excel whiz to do it. I used the json to convert it to C# objects using<a href="http://json2csharp.com/" target="_blank">http://json2csharp.com/</a> and here is the code it generated.</p>
<p>[gist https://gist.github.com/naveensrinivasan/0cf3cecede742c3587dc]</p>
<p>With that here is a simple query to get total duration by date.</p>
<p>[gist https://gist.github.com/naveensrinivasan/213c2092babc23d7c772]</p>
</div>
	    		<div class="clear">&nbsp;</div>
	</section>
</article><!-- #post-## -->
			
				<nav class="pagination navigation paging-navigation" role="navigation">
		<div class="nav-links">
						<div class="older-posts"><a href="http://naveensrinivasan.azurewebsites.net/index.php/page/2/" >Older Posts <span class="meta-nav">&rarr;</span></a></div>
							<div class="page-number">Page 1 of 6</div>
			
		</div><!-- .nav-links -->
	</nav><!-- .navigation -->
	

		

	<div id="secondary" class="widget-area" role="complementary">
		<aside id="search-2" class="widget widget_search"><form role="search" method="get" class="search-form" action="http://naveensrinivasan.azurewebsites.net/">
				<label>
					<span class="screen-reader-text">Search for:</span>
					<input type="search" class="search-field" placeholder="Search &hellip;" value="" name="s" title="Search for:" />
				</label>
				<input type="submit" class="search-submit" value="Search" />
			</form></aside>		<aside id="recent-posts-2" class="widget widget_recent_entries">		<h1 class="widget-title">Recent Posts</h1>		<ul>
					<li>
				<a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/05/26/how-to-debug-the-crashloopbackoff-in-kubernetes-when-pod-is-not-starting/">How to debug the CrashLoopBackOff in Kubernetes when pod is not starting</a>
						</li>
					<li>
				<a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/04/25/enable-shortcat-app-in-osx/">Enable Shortcat app in OSX</a>
						</li>
					<li>
				<a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/04/23/my-docker-aliases/">My Docker aliases</a>
						</li>
					<li>
				<a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/03/28/keyboard/">How I try avoid using mouse</a>
						</li>
					<li>
				<a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/03/11/taking-it-up-a-notch-with-my-standing-desk-with-fluidstance/">Taking it up a notch with my standing desk with fluidstance</a>
						</li>
				</ul>
		</aside>		<aside id="recent-comments-2" class="widget widget_recent_comments"><h1 class="widget-title">Recent Comments</h1><ul id="recentcomments"><li class="recentcomments"><span class="comment-author-link"><a href='https://sergeytihon.wordpress.com/2016/01/17/f-weekly-2-3-2016/' rel='external nofollow' class='url'>F# Weekly #2-#3, 2016 | Sergey Tihon&#039;s Blog</a></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/2016/01/12/adventcode-day-7/#comment-3611">Solution to Adventcode Day 7 in FSharp</a></li><li class="recentcomments"><span class="comment-author-link">Lavanya</span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/2010/06/29/dumpstring-windbg/#comment-2971">dumpstring &#8211; windbg</a></li><li class="recentcomments"><span class="comment-author-link">Brenda</span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/2010/06/24/custom-dumparray-windbg/#comment-2931">Custom DumpArray – Windbg</a></li><li class="recentcomments"><span class="comment-author-link"><a href='http://rbonini.wordpress.com/' rel='external nofollow' class='url'>rbonini</a></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/2010/11/16/clr20r3/#comment-3241">Decoding clr20r3 .NET exception &#8211; using mono cecil</a></li><li class="recentcomments"><span class="comment-author-link"><a href='http://rbonini.wordpress.com/' rel='external nofollow' class='url'>rbonini</a></span> on <a href="http://naveensrinivasan.azurewebsites.net/index.php/2010/11/16/clr20r3/#comment-3231">Decoding clr20r3 .NET exception &#8211; using mono cecil</a></li></ul></aside><aside id="archives-2" class="widget widget_archive"><h1 class="widget-title">Archives</h1>		<ul>
			<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2016/05/'>May 2016</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2016/04/'>April 2016</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2016/03/'>March 2016</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2016/01/'>January 2016</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2015/12/'>December 2015</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2015/11/'>November 2015</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2015/06/'>June 2015</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2015/05/'>May 2015</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2011/06/'>June 2011</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2011/04/'>April 2011</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2011/01/'>January 2011</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2010/12/'>December 2010</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2010/11/'>November 2010</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2010/10/'>October 2010</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2010/09/'>September 2010</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2010/08/'>August 2010</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2010/07/'>July 2010</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2010/06/'>June 2010</a></li>
	<li><a href='http://naveensrinivasan.azurewebsites.net/index.php/2010/02/'>February 2010</a></li>
		</ul>
		</aside><aside id="categories-2" class="widget widget_categories"><h1 class="widget-title">Categories</h1>		<ul>
	<li class="cat-item cat-item-11"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/net/" >.NET</a>
</li>
	<li class="cat-item cat-item-21"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/net/net-4-0-net/" >.NET 4.0</a>
</li>
	<li class="cat-item cat-item-31"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/net/asp-net/" >ASP.NET</a>
</li>
	<li class="cat-item cat-item-41"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/c/" >C#</a>
</li>
	<li class="cat-item cat-item-51"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/net/etw-net/" >ETW</a>
</li>
	<li class="cat-item cat-item-61"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/f/" >F#</a>
</li>
	<li class="cat-item cat-item-931"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/github/" >GitHub</a>
</li>
	<li class="cat-item cat-item-1011"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/kubernetes/" >kubernetes</a>
</li>
	<li class="cat-item cat-item-81"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/linqpad/" >linqpad</a>
</li>
	<li class="cat-item cat-item-91"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/net/loader-net/" >Loader</a>
</li>
	<li class="cat-item cat-item-101"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/mono/" >Mono</a>
</li>
	<li class="cat-item cat-item-111"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/odata/" >odata</a>
</li>
	<li class="cat-item cat-item-1001"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/osx/" >OSX</a>
</li>
	<li class="cat-item cat-item-121"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/perfview-2/" >perfview</a>
</li>
	<li class="cat-item cat-item-151"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/reactive-extensions/" >Reactive Extensions</a>
</li>
	<li class="cat-item cat-item-161"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/security/" >Security</a>
</li>
	<li class="cat-item cat-item-171"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/silverlight/" >Silverlight</a>
</li>
	<li class="cat-item cat-item-211"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/windbg/sos-windbg/" >SOS</a>
</li>
	<li class="cat-item cat-item-221"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/windbg/sosex/" >SOSEX</a>
</li>
	<li class="cat-item cat-item-981"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/tips/" >tips</a>
</li>
	<li class="cat-item cat-item-971"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/tools/" >tools</a>
</li>
	<li class="cat-item cat-item-1"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/uncategorized/" >Uncategorized</a>
</li>
	<li class="cat-item cat-item-191"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/windbg/" >Windbg</a>
</li>
	<li class="cat-item cat-item-201"><a href="http://naveensrinivasan.azurewebsites.net/index.php/category/yoga/" >yoga</a>
</li>
		</ul>
</aside><aside id="meta-2" class="widget widget_meta"><h1 class="widget-title">Meta</h1>			<ul>
						<li><a href="http://naveensrinivasan.azurewebsites.net/wp-login.php">Log in</a></li>
			<li><a href="http://naveensrinivasan.azurewebsites.net/index.php/feed/">Entries <abbr title="Really Simple Syndication">RSS</abbr></a></li>
			<li><a href="http://naveensrinivasan.azurewebsites.net/index.php/comments/feed/">Comments <abbr title="Really Simple Syndication">RSS</abbr></a></li>
			<li><a href="https://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress.org</a></li>			</ul>
			</aside>		<div class="clear">&nbsp;</div>
	</div><!-- #secondary -->
	<footer id="colophon" class="site-footer" role="contentinfo">
	    <a class="subscribe icon-feed" href="http://naveensrinivasan.azurewebsites.net/index.php/feed/"><span class="tooltip">Subscribe!</span></a>
		<div class="site-info inner">
		    <section class="copyright">
		    			    		<a href="https://github.com/lacymorrow/casper" rel="home">Casper WP</a> by Lacy Morrow		    			    </section>
		</div><!-- .site-info -->
	</footer><!-- #colophon -->
</main><!-- /#content -->

<script type='text/javascript' src='http://naveensrinivasan.azurewebsites.net/wp-content/themes/casper/js/main.js?ver=1.0.0'></script>
<script type='text/javascript' src='http://naveensrinivasan.azurewebsites.net/wp-includes/js/wp-embed.min.js?ver=4.4.5'></script>
</body>
</html>
