Skip to content

Instantly share code, notes, and snippets.

View sandeshdamkondwar's full-sized avatar
🏠
Working from home

Sandesh Damkondwar sandeshdamkondwar

🏠
Working from home
View GitHub Profile
@sandeshdamkondwar
sandeshdamkondwar / custom.css
Last active August 29, 2015 14:10
Custom CSS for google.com (You can use stylebot extension like tool to apply this css rules, here goes a link for chrome extension https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha)
.gbqfif, .gbqfsf,li.g, body, html, .std, h1 {
font-family: "Open Sans";
}
.sbib_b {
padding: 3px 7px 0;
}
#rhs ._za.vk_pl {
padding-left: 0;
@sandeshdamkondwar
sandeshdamkondwar / tricks.js
Last active August 29, 2015 14:17
JavaScript tricks
// Get a random number in a specific range
function randomInRange(max, min) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
// Get a random item from an array
function randomFromArray(items) {
return items[Math.floor(Math.random() * items.length)];
}
@sandeshdamkondwar
sandeshdamkondwar / object.create.js
Created May 10, 2015 20:44
Object.create Polyfill
if (typeof Object.create != 'function') {
Object.create = (function() {
var Temp = function() {};
return function (prototype) {
if (arguments.length > 1) {
throw Error('2nd argument is not supported');
}
if (typeof prototype != 'object') {
throw TypeError('argument should be object');
@sandeshdamkondwar
sandeshdamkondwar / ES6 classes.js
Last active September 11, 2015 17:57
Future of javascript
class Coupon {
constructor(options) {
this.title = options.title;
this.desc = options.desc;
this.code = options.code;
this.link = options.link;
this.expiry = options.expiry;
}
}
array1 = [0,1,2,3,4,5,6]
[0, 1, 2, 3, 4, 5, 6]
array1.splice(2) -> default first argument is 0
[2, 3, 4, 5, 6]
array1
[0, 1]
----------------------------------------------------------------------------------------
@sandeshdamkondwar
sandeshdamkondwar / gist:4557103
Last active December 11, 2015 06:08
Create Element in jQuery
$("<h1/>",{
text: "discription",
id=""
}).appendTo(element);
var newElement = $("<div/>",{id="",class=""}).appendTo(element);
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@sandeshdamkondwar
sandeshdamkondwar / wifiDance.sh
Created December 14, 2015 10:17 — forked from anuragpeshne/wifiDance.sh
bash script to
#!/bin/sh
let sleepTime="15*60";
while [ 1 ]
do
if [ $(( $RANDOM % 2)) == 0 ]
then
echo "switching to NTWRK1";
networksetup -setairportnetwork en1 {NTWRK_NAME} {NTWRK_PSWD}
else
@sandeshdamkondwar
sandeshdamkondwar / content_css_min.css
Created April 16, 2013 18:39
Chrome Extension - Google Dictionary Popup CSS
#gdx-bubble-container {
display:block!important;
z-index:99991!important;
}
#gdx-bubble-container,#gdx-bubble-container * {
//background:#fff!important;
background-repeat:no-repeat!important;
@sandeshdamkondwar
sandeshdamkondwar / GMail Scrollbar.css
Created April 19, 2013 17:07
GMail Webkit Scrollbar
::-webkit-scrollbar {
height:16px;
overflow:visible;
width:16px;
}
::-webkit-scrollbar-button {
height:0;
width:0;