Skip to content

Instantly share code, notes, and snippets.

@hemantajax
hemantajax / fadeSlideToggle.html
Created May 26, 2012 16:08
jquery plugin best practice
<!doctype html>
<html>
<head>
<title>My Info</title>
<meta charset="utf-8" />
<style>
#wrapper{
width:220px;
height:420px;
margin:40px auto;
@hemantajax
hemantajax / promise-with-animation.html
Created May 28, 2012 06:03
promise with animation
<!doctype html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<style>
#wrapper div{
float:left;
width:200px;
height:200px;
@hemantajax
hemantajax / center.html
Created June 9, 2012 04:16
Centering div using pure css
<!doctype html>
<html>
<head>
<title>Centering div using pure css</title>
<meta charset="utf-8" />
<style>
.outer{
position: absolute;
top: 50%;
left: 0px;
@hemantajax
hemantajax / file-manipulation.php
Created September 1, 2012 14:27
using glob to manipulate file
<?php
$images=glob("images/*.{png,jpg,jpeg}",GLOB_BRACE);
foreach ($images as $img) {
$pathinfo=pathinfo($img);
$thumb=$pathinfo['filename']."-thumb.".$pathinfo['extension']."<br />";
echo $thumb;
}
?>
@hemantajax
hemantajax / css-tringle.html
Created September 14, 2012 07:35
css tringles with css
<!doctype html>
<html>
<head>
<title>css tringles</title>
<meta charset="utf-8" />
<style>
.chat-bubble {
background-color:#EDEDED;
border:2px solid #ccc;
font-size:35px;
@hemantajax
hemantajax / web-performance.html
Created October 1, 2012 08:30
web performance tips
Web Performance:
1: Turn on http compression: GZipping:
☐ test here
http://gzipwtf.com/
☐ copy below lines to htaccess in your root folder (get latest from here https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess)
# ----------------------------------------------------------------------
@hemantajax
hemantajax / css-click.html
Created October 7, 2012 05:26
click with css3
<!doctype html>
<html>
<head>
<title>click wit css3</title>
<meta charset="utf-8" />
<style>
#wrapper{
width: 600px;
margin: 20px auto;
@hemantajax
hemantajax / insertNewItem.html
Created December 4, 2012 08:38
Inserting Items in a Sorted List with jQuery
<!doctype html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<style>
ul,li{
margin: 0;
padding: 0;
list-style: none;
@hemantajax
hemantajax / backbone.html
Created January 18, 2013 11:55
Backbone Template
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<style>
</style>
</head>
<body>
@hemantajax
hemantajax / latest-clearfix
Created January 21, 2013 17:55
latest clearfix
/**
* For modern browsers
*/
.cf:before,
.cf:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.cf:after {