Skip to content

Instantly share code, notes, and snippets.

View jikkujose's full-sized avatar

Jikku Jose jikkujose

View GitHub Profile
@jikkujose
jikkujose / github.css
Created June 27, 2015 14:38
Github CSS with slight tweaks
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@jikkujose
jikkujose / z_algorithm.rb
Created July 22, 2015 17:35
Implementation of the algorithm described in the lecture: https://www.youtube.com/watch?v=NVJ_ELSbbew
module ZAlgorithm
def z
@z = Array.new(length, 0)
@z[0] = length
left = right = 0
(1...length).each do |k|
if k > right
@z[k] = length_of_longest_prefix(k)
unless @z[k].zero?
javascript:(function()%7Bvar%20el=document.createElement(%22div%22),b=document.getElementsByTagName(%22body%22)%5B0%5D,otherlib=!1,msg=%22%22;el.style.position=%22fixed%22,el.style.height=%2232px%22,el.style.width=%22220px%22,el.style.marginLeft=%22-110px%22,el.style.top=%220%22,el.style.left=%2250%25%22,el.style.padding=%225px%2010px%22,el.style.zIndex=1001,el.style.fontSize=%2212px%22,el.style.color=%22%23222%22,el.style.backgroundColor=%22%23f99%22;function%20showMsg()%7Bvar%20txt=document.createTextNode(msg);el.appendChild(txt),b.appendChild(el),window.setTimeout(function()%7Btxt=null,typeof%20jQuery==%22undefined%22?b.removeChild(el):(jQuery(el).fadeOut(%22slow%22,function()%7BjQuery(this).remove()%7D),otherlib&&(window.$jq=jQuery.noConflict()))%7D,2500)%7Dif(typeof%20jQuery!=%22undefined%22)return%20msg=%22This%20page%20already%20using%20jQuery%20v%22+jQuery.fn.jquery,showMsg();typeof%20$==%22function%22&&(otherlib=!0);function%20getScript(url,success)%7Bvar%20script=document.createElement(%22script%22)
@jikkujose
jikkujose / docker_netstat.markdown
Created November 13, 2015 07:14
Unable to access docker from the host
root@ec077b3b57b7:/app# netstat -ln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:9393            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:2323          0.0.0.0:*               LISTEN
tcp6       0      0 ::1:2323                :::*                    LISTEN
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
@jikkujose
jikkujose / visa_requirements.markdown
Last active January 17, 2016 06:10
Business Visa Requirements

Applicants Documents

  • 3 years ITR Company
  • DS 160 form copy
  • Suggestive Itinerary
  • 6 months bank statement with bank seal and signature: Personal
  • 6 months bank statement with bank seal and signature: Company
  • 3 years ITR Personal
  • Leave letter from company
  • Passport (Old + New)

Keybase proof

I hereby claim:

  • I am JikkuJose on github.
  • I am jikkujose (https://keybase.io/jikkujose) on keybase.
  • I have a public key whose fingerprint is 75AB 326B CE0C DDA6 EF78 FFAA EE45 1E17 256D A461

To claim this, I am signing this object:

@jikkujose
jikkujose / colour_tweak.js
Last active February 18, 2017 19:06
Fix jarring colours for Generals in night mode
/*
Convert to bookmarklet using http://chriszarate.github.io/bookmarkleter/
*/
(function() {
var node = document.createElement('style');
document.body.appendChild(node);
window.addStyleString = function(css) {
node.innerHTML += css;
@jikkujose
jikkujose / .block
Last active January 10, 2017 22:09 — forked from mbostock/.block
Diamonds II
license: gpl-3.0
height: 960
@jikkujose
jikkujose / index.html
Last active January 11, 2017 05:59 — forked from asielen/index.html
Reusable Responsive Multiline Chart
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="multiline.css">
<script src="http://d3js.org/d3.v3.js" charset="utf-8"></script>
<!--<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>-->
</head>
<body>