Site updated at 2012-10-28 13:45:39 UTC

This commit is contained in:
Abhinav Sarkar 2012-10-28 19:15:39 +05:30
parent 0878c75f80
commit 80736c1ecb
62 changed files with 2659 additions and 1 deletions

1
CNAME Normal file
View File

@ -0,0 +1 @@
abhinavsarkar.net

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

View File

@ -0,0 +1,115 @@
<?xml version="1.0"?>
<skin version="1.1" name="Glow" author="LongTail Video">
<settings>
<setting name="backcolor" value="0x000000" />
<setting name="frontcolor" value="0xeeeeee" />
<setting name="lightcolor" value="0xeeeeee" />
<setting name="screencolor" value="0x000000" />
</settings>
<components>
<component name="controlbar">
<settings>
<setting name="margin" value="0" />
<setting name="fontsize" value="11" />
<setting name="fontcolor" value="0xEEEEEE" />
<setting name="buttoncolor" value="0xEEEEEE" />
</settings>
<layout>
<group position="left">
<button name="play" />
<text name="elapsed" />
</group>
<group position="center">
<slider name="time" />
</group>
<group position="right">
<text name="duration" />
<button name="blank" />
<button name="mute" />
<button name="fullscreen" />
</group>
</layout>
<elements>
<element name="background" src="background.png" />
<element name="capLeft" src="divider.png" />
<element name="capRight" src="divider.png" />
<element name="divider" src="divider.png" />
<element name="blankButton" src="blankButton.png" />
<element name="fullscreenButton" src="fullscreenButton.png" />
<element name="fullscreenButtonOver" src="fullscreenButtonOver.png" />
<element name="muteButton" src="muteButton.png" />
<element name="muteButtonOver" src="muteButtonOver.png" />
<element name="pauseButton" src="pauseButton.png" />
<element name="pauseButtonOver" src="pauseButtonOver.png" />
<element name="playButton" src="playButton.png" />
<element name="playButtonOver" src="playButtonOver.png" />
<element name="timeSliderBuffer" src="timeSliderBuffer.png" />
<element name="timeSliderCapLeft" src="timeSliderCapLeft.png" />
<element name="timeSliderCapRight" src="timeSliderCapRight.png" />
<element name="timeSliderProgress" src="timeSliderProgress.png" />
<element name="timeSliderRail" src="timeSliderRail.png" />
<element name="normalscreenButton" src="normalscreenButton.png" />
<element name="normalscreenButtonOver" src="normalscreenButtonOver.png" />
<element name="unmuteButton" src="unmuteButton.png" />
<element name="unmuteButtonOver" src="unmuteButtonOver.png" />
<element name="volumeSliderRail" src="divider.png" />
<element name="volumeSliderProgress" src="divider.png" />
</elements>
</component>
<component name="display">
<settings>
<setting name="bufferinterval" value="250" />
<setting name="bufferrotation" value="90" />
</settings>
<elements>
<element name="background" src="background.png" />
<element name="playIcon" src="playIcon.png" />
<element name="muteIcon" src="muteIcon.png" />
<element name="errorIcon" src="bufferIcon.png" />
<element name="bufferIcon" src="bufferIcon.png" />
</elements>
</component>
<component name="dock">
<settings>
<setting name="fontcolor" value="0xFFFFFF" />
</settings>
<elements>
<element name="button" src="button.png" />
</elements>
</component>
<component name="playlist">
<settings>
<setting name="fontcolor" value="0xEEEEEE" />
<setting name="overcolor" value="0xFFFFFF" />
<setting name="activecolor" value="0xFFFFFF" />
<setting name="backgroundcolor" value="0x333333" />
</settings>
<elements>
<element name="item" src="item.png" />
<element name="itemOver" src="itemOver.png" />
<element name="sliderCapBottom" src="sliderCapBottom.png" />
<element name="sliderCapTop" src="sliderCapTop.png" />
<element name="sliderRail" src="sliderRail.png" />
<element name="sliderThumb" src="sliderThumb.png" />
</elements>
</component>
<component name="sharing">
<elements>
<element name="embedIcon" src="embedIcon.png" />
<element name="embedScreen" src="embedScreen.png" />
<element name="shareIcon" src="shareIcon.png" />
<element name="shareScreen" src="shareScreen.png" />
</elements>
</component>
</components>
</skin>

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
assets/jwplayer/player.swf Normal file

Binary file not shown.

16
atom.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[My Octopress Blog]]></title>
<link href="http://abhin4v.github.com/atom.xml" rel="self"/>
<link href="http://abhin4v.github.com/"/>
<updated>2012-10-28T19:15:21+05:30</updated>
<id>http://abhin4v.github.com/</id>
<author>
<name><![CDATA[Your Name]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
</feed>

131
blog/archives/index.html Normal file
View File

@ -0,0 +1,131 @@
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Blog Archive - My Octopress Blog</title>
<meta name="author" content="Your Name">
<meta name="description" content=" Blog Archive Recent Posts ">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://abhin4v.github.com/blog/archives/">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href="/atom.xml" rel="alternate" title="My Octopress Blog" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
</head>
<body >
<header role="banner"><hgroup>
<h1><a href="/">My Octopress Blog</a></h1>
<h2>A blogging framework for hackers.</h2>
</hgroup>
</header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
</ul>
<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:abhin4v.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div>
<article role="article">
<header>
<h1 class="entry-title">Blog Archive</h1>
</header>
<div id="blog-archives">
</div>
</article>
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
</ul>
</section>
</aside>
</div>
</div>
<footer role="contentinfo"><p>
Copyright &copy; 2012 - Your Name -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
</footer>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>

BIN
favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

BIN
images/bird_32_gray.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

BIN
images/code_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

BIN
images/dotted-border.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

BIN
images/email.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

BIN
images/line-tile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

BIN
images/noise.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
images/rss.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

BIN
images/search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

View File

@ -1 +1,122 @@
My Octopress Page is coming soon &hellip;
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>My Octopress Blog</title>
<meta name="author" content="Your Name">
<meta name="description" content=" Blog Archives Recent Posts ">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://abhin4v.github.com/">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href="/atom.xml" rel="alternate" title="My Octopress Blog" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
</head>
<body >
<header role="banner"><hgroup>
<h1><a href="/">My Octopress Blog</a></h1>
<h2>A blogging framework for hackers.</h2>
</hgroup>
</header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
</ul>
<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:abhin4v.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div class="blog-index">
<div class="pagination">
<a href="/blog/archives">Blog Archives</a>
</div>
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
</ul>
</section>
</aside>
</div>
</div>
<footer role="contentinfo"><p>
Copyright &copy; 2012 - Your Name -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
</footer>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>

45
javascripts/ender.js Normal file

File diff suppressed because one or more lines are too long

37
javascripts/github.js Normal file
View File

@ -0,0 +1,37 @@
var github = (function(){
function render(target, repos){
var i = 0, fragment = '', t = $(target)[0];
for(i = 0; i < repos.length; i++) {
fragment += '<li><a href="'+repos[i].html_url+'">'+repos[i].name+'</a><p>'+(repos[i].description||'')+'</p></li>';
}
t.innerHTML = fragment;
}
return {
showRepos: function(options){
$.ajax({
url: "https://api.github.com/users/"+options.user+"/repos?callback=?"
, type: 'jsonp'
, error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
, success: function(data) {
var repos = [];
if (!data || !data.data) { return; }
for (var i = 0; i < data.data.length; i++) {
if (options.skip_forks && data.data[i].fork) { continue; }
repos.push(data.data[i]);
}
repos.sort(function(a, b) {
var aDate = new Date(a.pushed_at).valueOf(),
bDate = new Date(b.pushed_at).valueOf();
if (aDate === bDate) { return 0; }
return aDate > bDate ? -1 : 1;
});
if (options.count) { repos.splice(options.count); }
render(options.target, repos);
}
});
}
};
})();

1497
javascripts/libs/ender.js Normal file

File diff suppressed because it is too large Load Diff

85
javascripts/libs/jXHR.js Normal file
View File

@ -0,0 +1,85 @@
// jXHR.js (JSON-P XHR)
// v0.1 (c) Kyle Simpson
// MIT License
(function(global){
var SETTIMEOUT = global.setTimeout, // for better compression
doc = global.document,
callback_counter = 0;
global.jXHR = function() {
var script_url,
script_loaded,
jsonp_callback,
scriptElem,
publicAPI = null;
function removeScript() { try { scriptElem.parentNode.removeChild(scriptElem); } catch (err) { } }
function reset() {
script_loaded = false;
script_url = "";
removeScript();
scriptElem = null;
fireReadyStateChange(0);
}
function ThrowError(msg) {
try { publicAPI.onerror.call(publicAPI,msg,script_url); } catch (err) { throw new Error(msg); }
}
function handleScriptLoad() {
if ((this.readyState && this.readyState!=="complete" && this.readyState!=="loaded") || script_loaded) { return; }
this.onload = this.onreadystatechange = null; // prevent memory leak
script_loaded = true;
if (publicAPI.readyState !== 4) ThrowError("Script failed to load ["+script_url+"].");
removeScript();
}
function fireReadyStateChange(rs,args) {
args = args || [];
publicAPI.readyState = rs;
if (typeof publicAPI.onreadystatechange === "function") publicAPI.onreadystatechange.apply(publicAPI,args);
}
publicAPI = {
onerror:null,
onreadystatechange:null,
readyState:0,
open:function(method,url){
reset();
internal_callback = "cb"+(callback_counter++);
(function(icb){
global.jXHR[icb] = function() {
try { fireReadyStateChange.call(publicAPI,4,arguments); }
catch(err) {
publicAPI.readyState = -1;
ThrowError("Script failed to run ["+script_url+"].");
}
global.jXHR[icb] = null;
};
})(internal_callback);
script_url = url.replace(/=\?/,"=jXHR."+internal_callback);
fireReadyStateChange(1);
},
send:function(){
SETTIMEOUT(function(){
scriptElem = doc.createElement("script");
scriptElem.setAttribute("type","text/javascript");
scriptElem.onload = scriptElem.onreadystatechange = function(){handleScriptLoad.call(scriptElem);};
scriptElem.setAttribute("src",script_url);
doc.getElementsByTagName("head")[0].appendChild(scriptElem);
},0);
fireReadyStateChange(2);
},
setRequestHeader:function(){}, // noop
getResponseHeader:function(){return "";}, // basically noop
getAllResponseHeaders:function(){return [];} // ditto
};
reset();
return publicAPI;
};
})(window);

View File

@ -0,0 +1,298 @@
/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject = function() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
FLASH_MIME_TYPE = "application/x-shockwave-flash",
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
win = window,
doc = document,
nav = navigator,
plugin = false,
regObjArr = [],
objIdArr = [],
storedAltContent,
storedAltContentId,
storedCallbackFn,
storedCallbackObj,
autoHideShow = true,
/* Centralized function for browser feature detection
- User agent string detection is only used when no good alternative is possible
- Is executed directly for optimal performance
*/
ua = function() {
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
u = nav.userAgent.toLowerCase(),
p = nav.platform.toLowerCase(),
windows = p ? /win/.test(p) : /win/.test(u),
mac = p ? /mac/.test(p) : /mac/.test(u),
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
playerVersion = [0,0,0],
d = null;
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
plugin = true;
ie = false; // cascaded feature detection for Internet Explorer
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
}
}
else if (typeof win.ActiveXObject != UNDEF) {
try {
var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
if (a) { // a will return null when ActiveX is disabled
d = a.GetVariable("$version");
if (d) {
ie = true; // cascaded feature detection for Internet Explorer
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
}
catch(e) {}
}
return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
}()
/* Main function
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
*/
function main() {
if (plugin) { testPlayerVersion(); }
else { matchVersions(); }
}
/* Detect the Flash Player version for non-Internet Explorer browsers
- Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
a. Both release and build numbers can be detected
b. Avoid wrong descriptions by corrupt installers provided by Adobe
c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
*/
function testPlayerVersion() {
var b = doc.getElementsByTagName("body")[0];
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
var t = b.appendChild(o);
if (t) {
var counter = 0;
(function(){
if (typeof t.GetVariable != UNDEF) {
var d = t.GetVariable("$version");
if (d) {
d = d.split(" ")[1].split(",");
ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
else if (counter < 10) {
counter++;
setTimeout(arguments.callee, 10);
return;
}
b.removeChild(o);
t = null;
matchVersions();
})();
}
else {
matchVersions();
}
}
/* Cross-browser dynamic SWF creation
*/
function createSWF(attObj, parObj, id) {
var r, el = getElementById(id);
if (ua.wk && ua.wk < 312) { return r; }
if (el) {
if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
attObj.id = id;
}
if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
var att = "";
for (var i in attObj) {
if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
if (i.toLowerCase() == "data") {
parObj.movie = attObj[i];
}
else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
att += ' class="' + attObj[i] + '"';
}
else if (i.toLowerCase() != "classid") {
att += ' ' + i + '="' + attObj[i] + '"';
}
}
}
var par = "";
for (var j in parObj) {
if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
par += '<param name="' + j + '" value="' + parObj[j] + '" />';
}
}
el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
r = getElementById(attObj.id);
}
else { // well-behaving browsers
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
for (var m in attObj) {
if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
o.setAttribute("class", attObj[m]);
}
else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
o.setAttribute(m, attObj[m]);
}
}
}
for (var n in parObj) {
if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
createObjParam(o, n, parObj[n]);
}
}
el.parentNode.replaceChild(o, el);
r = o;
}
}
return r;
}
function createObjParam(el, pName, pValue) {
var p = createElement("param");
p.setAttribute("name", pName);
p.setAttribute("value", pValue);
el.appendChild(p);
}
/* Cross-browser SWF removal
- Especially needed to safely and completely remove a SWF in Internet Explorer
*/
/* Functions to optimize JavaScript compression
*/
function getElementById(id) {
var el = null;
try {
el = doc.getElementById(id);
}
catch (e) {}
return el;
}
function createElement(el) {
return doc.createElement(el);
}
/* Flash Player and SWF content version matching
*/
function hasPlayerVersion(rv) {
var pv = ua.pv, v = rv.split(".");
v[0] = parseInt(v[0], 10);
v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
v[2] = parseInt(v[2], 10) || 0;
return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
}
/* Filter to avoid XSS attacks
*/
function urlEncodeIfNecessary(s) {
var regex = /[\\\"<>\.;]/;
var hasBadChars = regex.exec(s) != null;
return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
}
return {
/* Public API
- Reference: http://code.google.com/p/swfobject/wiki/documentation
*/
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, flashvarsObj, parObj, attObj, callbackFn) {
var callbackObj = {success:false, id:replaceElemIdStr};
if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
widthStr += ""; // auto-convert to string
heightStr += "";
var att = {};
if (attObj && typeof attObj === OBJECT) {
for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
att[i] = attObj[i];
}
}
att.data = swfUrlStr;
att.width = widthStr;
att.height = heightStr;
var par = {};
if (parObj && typeof parObj === OBJECT) {
for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
par[j] = parObj[j];
}
}
if (flashvarsObj && typeof flashvarsObj === OBJECT) {
for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
if (typeof par.flashvars != UNDEF) {
par.flashvars += "&" + k + "=" + flashvarsObj[k];
}
else {
par.flashvars = k + "=" + flashvarsObj[k];
}
}
}
if (hasPlayerVersion(swfVersionStr)) { // create SWF
var obj = createSWF(att, par, replaceElemIdStr);
callbackObj.success = true;
callbackObj.ref = obj;
}
if (callbackFn) { callbackFn(callbackObj); }
}
else if (callbackFn) { callbackFn(callbackObj); }
},
ua: ua,
getFlashPlayerVersion: function() {
return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
},
hasFlashPlayerVersion: hasPlayerVersion,
createSWF: function(attObj, parObj, replaceElemIdStr) {
if (ua.w3) {
return createSWF(attObj, parObj, replaceElemIdStr);
}
else {
return undefined;
}
},
getQueryParamValue: function(param) {
var q = doc.location.search || doc.location.hash;
if (q) {
if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
if (param == null) {
return urlEncodeIfNecessary(q);
}
var pairs = q.split("&");
for (var i = 0; i < pairs.length; i++) {
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
}
}
}
return "";
}
};
}();

5
javascripts/modernizr-2.0.js vendored Normal file

File diff suppressed because one or more lines are too long

161
javascripts/octopress.js Normal file
View File

@ -0,0 +1,161 @@
function getNav() {
var mobileNav = $('nav[role=navigation] fieldset[role=search]').after('<fieldset class="mobile-nav"></fieldset>').next().append('<select></select>');
mobileNav.children('select').append('<option value="">Navigate&hellip;</option>');
$('ul[role=main-navigation]').addClass('main-navigation');
$('ul.main-navigation a').each(function(link) {
mobileNav.children('select').append('<option value="'+link.href+'">&raquo; '+link.text+'</option>');
});
$('ul.subscription a').each(function(link) {
mobileNav.children('select').append('<option value="'+link.href+'">&raquo; '+link.text+'</option>');
});
mobileNav.children('select').bind('change', function(event) {
if (event.target.value) { window.location.href = event.target.value; }
});
}
function addSidebarToggler() {
if(!$('body').hasClass('sidebar-footer')) {
$('#content').append('<span class="toggle-sidebar"></span>');
$('.toggle-sidebar').bind('click', function(e) {
e.preventDefault();
if ($('body').hasClass('collapse-sidebar')) {
$('body').removeClass('collapse-sidebar');
} else {
$('body').addClass('collapse-sidebar');
}
});
}
var sections = $('aside.sidebar > section');
if (sections.length > 1) {
sections.each(function(section, index){
if ((sections.length >= 3) && index % 3 === 0) {
$(section).addClass("first");
}
var count = ((index +1) % 2) ? "odd" : "even";
$(section).addClass(count);
});
}
if (sections.length >= 3){ $('aside.sidebar').addClass('thirds'); }
}
function testFeatures() {
var features = ['maskImage'];
$(features).map(function(feature) {
if (Modernizr.testAllProps(feature)) {
$('html').addClass(feature);
} else {
$('html').addClass('no-'+feature);
}
});
if ("placeholder" in document.createElement("input")) {
$('html').addClass('placeholder');
} else {
$('html').addClass('no-placeholder');
}
}
function addCodeLineNumbers() {
if (navigator.appName === 'Microsoft Internet Explorer') { return; }
$('div.gist-highlight').each(function(code) {
var tableStart = '<table><tbody><tr><td class="gutter">',
lineNumbers = '<pre class="line-numbers">',
tableMiddle = '</pre></td><td class="code">',
tableEnd = '</td></tr></tbody></table>',
count = $('.line', code).length;
for (var i=1;i<=count; i++) {
lineNumbers += '<span class="line-number">'+i+'</span>\n';
}
var table = tableStart + lineNumbers + tableMiddle + '<pre>'+$('pre', code).html()+'</pre>' + tableEnd;
$(code).html(table);
});
}
function flashVideoFallback(){
var flashplayerlocation = "/assets/jwplayer/player.swf",
flashplayerskin = "/assets/jwplayer/glow/glow.xml";
$('video').each(function(video){
video = $(video);
if (!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") !== -1){
video.children('source[src$=mp4]').first().map(function(source){
var src = $(source).attr('src'),
id = 'video_'+Math.round(1 + Math.random()*(100000)),
width = video.attr('width'),
height = parseInt(video.attr('height'), 10) + 30;
video.after('<div class="flash-video"><div><div id='+id+'>');
swfobject.embedSWF(flashplayerlocation, id, width, height + 30, "9.0.0",
{ file : src, image : video.attr('poster'), skin : flashplayerskin } ,
{ movie : src, wmode : "opaque", allowfullscreen : "true" }
);
});
video.remove();
}
});
}
function wrapFlashVideos() {
$('object').each(function(object) {
object = $(object);
if ( $('param[name=movie]', object).length ) {
var wrapper = object.before('<div class="flash-video"><div>').previous();
$(wrapper).children().append(object);
}
});
$('iframe[src*=vimeo],iframe[src*=youtube]').each(function(iframe) {
iframe = $(iframe);
var wrapper = iframe.before('<div class="flash-video"><div>').previous();
$(wrapper).children().append(iframe);
});
}
function renderDeliciousLinks(items) {
var output = "<ul>";
for (var i=0,l=items.length; i<l; i++) {
output += '<li><a href="' + items[i].u + '" title="Tags: ' + (items[i].t == "" ? "" : items[i].t.join(', ')) + '">' + items[i].d + '</a></li>';
}
output += "</ul>";
$('#delicious').html(output);
}
$.domReady(function() {
testFeatures();
wrapFlashVideos();
flashVideoFallback();
addCodeLineNumbers();
getNav();
addSidebarToggler();
});
// iOS scaling bug fix
// Rewritten version
// By @mathias, @cheeaun and @jdalton
// Source url: https://gist.github.com/901295
(function(doc) {
var addEvent = 'addEventListener',
type = 'gesturestart',
qsa = 'querySelectorAll',
scales = [1, 1],
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
function fix() {
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
doc.removeEventListener(type, fix, true);
}
if ((meta = meta[meta.length - 1]) && addEvent in doc) {
fix();
scales = [0.25, 1.6];
doc[addEvent](type, fix, true);
}
}(document));
/*! SWFObject v2.2 modified by Brandon Mathis to contain only what is necessary to dynamically embed flash objects
* Uncompressed source in javascripts/libs/swfobject-dynamic.js
* <http://code.google.com/p/swfobject/>
released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){function s(a,b,d){var q,k=n(d);if(g.wk&&g.wk<312)return q;if(k){if(typeof a.id==l)a.id=d;if(g.ie&&g.win){var e="",c;for(c in a)if(a[c]!=Object.prototype[c])c.toLowerCase()=="data"?b.movie=a[c]:c.toLowerCase()=="styleclass"?e+=' class="'+a[c]+'"':c.toLowerCase()!="classid"&&(e+=" "+c+'="'+a[c]+'"');c="";for(var f in b)b[f]!=Object.prototype[f]&&(c+='<param name="'+f+'" value="'+b[f]+'" />');k.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+e+">"+c+
"</object>";q=n(a.id)}else{f=i.createElement(o);f.setAttribute("type",m);for(var h in a)a[h]!=Object.prototype[h]&&(h.toLowerCase()=="styleclass"?f.setAttribute("class",a[h]):h.toLowerCase()!="classid"&&f.setAttribute(h,a[h]));for(e in b)b[e]!=Object.prototype[e]&&e.toLowerCase()!="movie"&&(a=f,c=e,h=b[e],d=i.createElement("param"),d.setAttribute("name",c),d.setAttribute("value",h),a.appendChild(d));k.parentNode.replaceChild(f,k);q=f}}return q}function n(a){var b=null;try{b=i.getElementById(a)}catch(d){}return b}
function t(a){var b=g.pv,a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:!1}function u(a){return/[\\\"<>\.;]/.exec(a)!=null&&typeof encodeURIComponent!=l?encodeURIComponent(a):a}var l="undefined",o="object",m="application/x-shockwave-flash",v=window,i=document,j=navigator,g=function(){var a=typeof i.getElementById!=l&&typeof i.getElementsByTagName!=l&&typeof i.createElement!=l,
b=j.userAgent.toLowerCase(),d=j.platform.toLowerCase(),g=d?/win/.test(d):/win/.test(b),d=d?/mac/.test(d):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,k=!+"\u000b1",e=[0,0,0],c=null;if(typeof j.plugins!=l&&typeof j.plugins["Shockwave Flash"]==o){if((c=j.plugins["Shockwave Flash"].description)&&!(typeof j.mimeTypes!=l&&j.mimeTypes[m]&&!j.mimeTypes[m].enabledPlugin))k=!1,c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),e[0]=parseInt(c.replace(/^(.*)\..*$/,"$1"),
10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&
a&&b&&d&&i&&k){d+="";i+="";var p={};if(f&&typeof f===o)for(var m in f)p[m]=f[m];p.data=a;p.width=d;p.height=i;a={};if(c&&typeof c===o)for(var n in c)a[n]=c[n];if(e&&typeof e===o)for(var r in e)typeof a.flashvars!=l?a.flashvars+="&"+r+"="+e[r]:a.flashvars=r+"="+e[r];if(t(k))b=s(p,a,b),j.success=!0,j.ref=b}h&&h(j)},ua:g,getFlashPlayerVersion:function(){return{major:g.pv[0],minor:g.pv[1],release:g.pv[2]}},hasFlashPlayerVersion:t,createSWF:function(a,b,d){if(g.w3)return s(a,b,d)},getQueryParamValue:function(a){var b=
i.location.search||i.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(a==null)return u(b);for(var b=b.split("&"),d=0;d<b.length;d++)if(b[d].substring(0,b[d].indexOf("="))==a)return u(b[d].substring(b[d].indexOf("=")+1))}return""}}}();

56
javascripts/pinboard.js Normal file
View File

@ -0,0 +1,56 @@
function pinboardNS_fetch_script(url) {
//document.writeln('<s'+'cript type="text/javascript" src="' + url + '"></s'+'cript>');
(function(){
var pinboardLinkroll = document.createElement('script');
pinboardLinkroll.type = 'text/javascript';
pinboardLinkroll.async = true;
pinboardLinkroll.src = url;
document.getElementsByTagName('head')[0].appendChild(pinboardLinkroll);
})();
}
function pinboardNS_show_bmarks(r) {
var lr = new Pinboard_Linkroll();
lr.set_items(r);
lr.show_bmarks();
}
function Pinboard_Linkroll() {
var items;
this.set_items = function(i) {
this.items = i;
}
this.show_bmarks = function() {
var lines = [];
for (var i = 0; i < this.items.length; i++) {
var item = this.items[i];
var str = this.format_item(item);
lines.push(str);
}
document.getElementById(linkroll).innerHTML = lines.join("\n");
}
this.cook = function(v) {
return v.replace('<', '&lt;').replace('>', '&gt>');
}
this.format_item = function(it) {
var str = "<li class=\"pin-item\">";
if (!it.d) { return; }
str += "<p><a class=\"pin-title\" href=\"" + this.cook(it.u) + "\">" + this.cook(it.d) + "</a>";
if (it.n) {
str += "<span class=\"pin-description\">" + this.cook(it.n) + "</span>\n";
}
if (it.t.length > 0) {
for (var i = 0; i < it.t.length; i++) {
var tag = it.t[i];
str += " <a class=\"pin-tag\" href=\"https://pinboard.in/u:"+ this.cook(it.a) + "/t:" + this.cook(tag) + "\">" + this.cook(tag).replace(/^\s+|\s+$/g, '') + "</a> ";
}
}
str += "</p></li>\n";
return str;
}
}
Pinboard_Linkroll.prototype = new Pinboard_Linkroll();
pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count);

78
javascripts/twitter.js Normal file
View File

@ -0,0 +1,78 @@
// JSON-P Twitter fetcher for Octopress
// (c) Brandon Mathis // MIT License
/* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */
function prettyDate(time) {
if (navigator.appName === 'Microsoft Internet Explorer') {
return "<span>&infin;</span>"; // because IE date parsing isn't fun.
}
var say = {
just_now: " now",
minute_ago: "1m",
minutes_ago: "m",
hour_ago: "1h",
hours_ago: "h",
yesterday: "1d",
days_ago: "d",
last_week: "1w",
weeks_ago: "w"
};
var current_date = new Date(),
current_date_time = current_date.getTime(),
current_date_full = current_date_time + (1 * 60000),
date = new Date(time),
diff = ((current_date_full - date.getTime()) / 1000),
day_diff = Math.floor(diff / 86400);
if (isNaN(day_diff) || day_diff < 0) { return "<span>&infin;</span>"; }
return day_diff === 0 && (
diff < 60 && say.just_now ||
diff < 120 && say.minute_ago ||
diff < 3600 && Math.floor(diff / 60) + say.minutes_ago ||
diff < 7200 && say.hour_ago ||
diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) ||
day_diff === 1 && say.yesterday ||
day_diff < 7 && day_diff + say.days_ago ||
day_diff === 7 && say.last_week ||
day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago;
}
function linkifyTweet(text, url) {
// Linkify urls, usernames, hashtags
text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>')
.replace(/(^|\W)@(\w+)/g, '$1<a href="https://twitter.com/$2">@$2</a>')
.replace(/(^|\W)#(\w+)/g, '$1<a href="https://search.twitter.com/search?q=%23$2">#$2</a>');
// Use twitter's api to replace t.co shortened urls with expanded ones.
for (var u in url) {
if(url[u].expanded_url != null){
var shortUrl = new RegExp(url[u].url, 'g');
text = text.replace(shortUrl, url[u].expanded_url);
var shortUrl = new RegExp(">"+(url[u].url.replace(/https?:\/\//, '')), 'g');
text = text.replace(shortUrl, ">"+url[u].display_url);
}
}
return text
}
function showTwitterFeed(tweets, twitter_user) {
var timeline = document.getElementById('tweets'),
content = '';
for (var t in tweets) {
content += '<li>'+'<p>'+'<a href="https://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'), tweets[t].entities.urls)+'</p>'+'</li>';
}
timeline.innerHTML = content;
}
function getTwitterFeed(user, count, replies) {
count = parseInt(count, 10);
$.ajax({
url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?"
, type: 'jsonp'
, error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); }
, success: function(data) { showTwitterFeed(data.slice(0, count), user); }
})
}

11
sitemap.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>
<url>
<loc>http://abhin4v.github.com/</loc>
<lastmod>2012-10-28T19:10:21+05:30</lastmod>
</url>
<url>
<loc>http://abhin4v.github.com/blog/archives/</loc>
<lastmod>2012-10-28T19:10:21+05:30</lastmod>
</url>
</urlset>

1
stylesheets/screen.css Normal file

File diff suppressed because one or more lines are too long