Skip to content

Instantly share code, notes, and snippets.

View sivakumar-kailasam's full-sized avatar
:shipit:

Sivakumar Kailasam sivakumar-kailasam

:shipit:
View GitHub Profile
@sivakumar-kailasam
sivakumar-kailasam / Mozilla-specific-CSS.css
Last active October 4, 2015 06:27
Mozilla specific CSS
/* Default for all browsers */
.fancyDiv {
width: 50px;
}
/*This will work for firefox*/
@-moz-document url-prefix() {
.fancyDiv {
width: 55px;
}
<!--[if lt IE 7 ]> <html class="ie ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
<head>
<style>
/* this is for all browsers*/
div.foo {
color: red;
@sivakumar-kailasam
sivakumar-kailasam / jQuery-noConflict.js
Last active October 5, 2015 17:58
how to use jQuery no conflict
var $jq = jQuery.noConflict(); //from here i can use $jq instead of $ to access jQuery functions
$jq(function() {
$jq('#list').each( .... );
});
@sivakumar-kailasam
sivakumar-kailasam / clearfix.css
Created February 5, 2013 11:39
CSS floats clearfix
/* For modern browsers */
.cf:before, .cf:after {
content:"";
display:table;
}
.cf:after {
clear:both;
}
// This code co-ordinates tabs from the same domain to elect one of them as a
// "master", and allow them to broadcast messages to each other.
function WindowController () {
var now = Date.now(),
ping = 0;
try {
ping = +localStorage.getItem( 'ping' ) || 0;
} catch ( error ) {}
if ( now - ping > 45000 ) {
this.becomeMaster();
/*
/ \
/ _ \
| / \ |
|| || _______
|| || |\ \
|| || ||\ \
|| || || \ |
|| || || \__/
|| || || ||
@sivakumar-kailasam
sivakumar-kailasam / karma.conf.js
Created September 3, 2013 09:00
new grunt-karma configuration sample (>0.6)
// Karma configuration
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
preprocessors: {
'app/scripts/**/*.js': 'coverage'
},
@sivakumar-kailasam
sivakumar-kailasam / SassMeister-input-HTML.html
Created February 4, 2014 09:45
Generated by SassMeister.com.
<div class="container">
<div class="hero-unit">
<h1>Bootstrap jsFiddle Skeleton</h1>
<p>Fork this fiddle to test your Bootstrap stuff.</p>
<p>
<a class="btn btn-primary btn-large" href="http://twitter.github.com/bootstrap/index.html" target="_blank">
Learn more about Bootstrap
</a>
</p>
</div>
/*
Example usage:
import logger from "app/system/logger";
var LOG = logger.loggerFor("topic"');
LOG.log({
event: "data received",
secondary: {
resource: "photo",