Skip to content

Instantly share code, notes, and snippets.

View logeshpaul's full-sized avatar

Logesh Paul logeshpaul

View GitHub Profile
@logeshpaul
logeshpaul / extractNumbers.js
Last active November 19, 2021 02:16
Js: Extract Numbers from String
var extractNumbers = $(this).val().replace(/[^\d]/g, "");
@logeshpaul
logeshpaul / outdated-browser.html
Created March 11, 2019 05:38
Outdated browser indication
<!--[if lt IE 10]>
<div
style="background: #212121; padding: 10px 0; box-shadow: 3px 3px 5px 0 rgba(0,0,0,.3); clear: both; text-align:center; position: relative; z-index:1;"
>
<a href="http://windows.microsoft.com/en-US/internet-explorer/"
><img
src="images/ie8-panel/warning_bar_0000_us.jpg"
border="0"
height="42"
width="820"
@logeshpaul
logeshpaul / absolute-fluid-container.css
Created November 15, 2017 06:19
Horizontally center aligned fluid absolute container
.flash-notify {
top: 0;
left: 50%;
width: auto;
transform: translateX(-50%);
position: absolute;
padding: 10px;
}
@logeshpaul
logeshpaul / gist:2652267
Created May 10, 2012 10:07
CSS: Base Template
/* -----------------------------------------------
Version: 0.1 [DD MM YY]
SMACSS [Scalable Modular Architecture for CSS]
Reference: http://smacss.com/
CATEGORIES:
1. Master - Default elements style redefinitions
2. Layout - Stacking/Placement of elements
3. Modules - Module wise style definitions
@logeshpaul
logeshpaul / pdf-options.md
Created June 15, 2016 18:58
Hide PDF toolbar, Controls, Etc

URL

http://DOMAIN/FILE_NAME.pdf#toolbar=0

Embed

``

@logeshpaul
logeshpaul / css-browser-selector.js
Created July 30, 2013 01:25
JS: CSS Browser Selector
/*
CSS Browser Selector v0.4.0 (Nov 02, 2010)
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m
@logeshpaul
logeshpaul / slider.js
Created July 23, 2013 07:50
JS - Simple JS Slider
$(document).ready(function() {
//Show the paging and activate its first link
$(".slider-paging").show();
$(".slider-paging a:first").addClass("active");
//Get size of the image, how many images there are, then determin the size of the image reel.
var imageWidth = $(".slide-holder").width();
var imageSum = $(".image-reel img").size();
var imageReelWidth = imageWidth * imageSum;
@logeshpaul
logeshpaul / html5shiv.html
Created July 5, 2013 11:47
HTML: HTML5shiv js
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
@logeshpaul
logeshpaul / clearfix.css
Last active December 19, 2015 08:49
CSS: Clearfix
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
@logeshpaul
logeshpaul / module.css
Created July 3, 2013 11:14
CSS: Module
/*-------------------------------------------------
MODULE :: PAGE :: USER DASHBOARD
-------------------------------------------------*/
/*-------------------------------------------------
MODULE :: PAGE :: FAVORITES
-------------------------------------------------*/