Skip to content

Instantly share code, notes, and snippets.

@ruturajv
ruturajv / auto-stick-to-scroll-with-jquery.html
Created August 7, 2011 09:26
Automatic Header stick to scroll with jQuery
<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<title>Auto Scroll Lock Header with jQuery</title>
<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"
@ruturajv
ruturajv / beacon.js
Created April 25, 2012 04:28
node.js web beacon (web bug) serving
http = require('http');
url = require('url');
http.createServer(function(req, res){
var requestURL = url.parse(req.url, true)['pathname'];
if (requestURL == '/log.gif') {
var imgHex = '47494638396101000100800000dbdfef00000021f90401000000002c00000000010001000002024401003b';
var imgBinary = new Buffer(imgHex, 'hex');
res.writeHead(200, {'Content-Type': 'image/gif' });
@ruturajv
ruturajv / todo.html
Created June 28, 2014 11:00
Web Presentation - TODO app
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
html, input {
font-family: sans-serif;
}
#todoList > li {
cursor: pointer;
}
@ruturajv
ruturajv / event-capturing-bubbling-explained.html
Created June 29, 2014 12:05
Event Capturing and Bubbling explained
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#parentDiv {
border: 1px solid red;
width: 400px;
height: 300px;
}
#childDiv {
@ruturajv
ruturajv / todo-bootstrap.html
Created July 4, 2014 10:00
TODO app with bootstrap
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://bootswatch.com/flatly/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<title>TODO App</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
html, input {
font-family: sans-serif;
}
#todoList > li {
cursor: pointer;
}
<?php
header("Content-Type: application/json");
$arr = array(
'name' => 'Foo',
'bar' => 'Yo!'
);
echo json_encode($arr);
@ruturajv
ruturajv / inplace-edit-template.html
Created July 14, 2014 11:42
Inplace Edit template
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<title>Inplace Edit</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->