Skip to content

Instantly share code, notes, and snippets.

View mrchief's full-sized avatar
🎯
Focusing

Hrusikesh Panda mrchief

🎯
Focusing
View GitHub Profile
@mrchief
mrchief / jsbin.tewitowa.css
Created June 25, 2014 19:27
Glassy Auto Ajax Bootstrap Overlay
#pleaseWaitDialog .modal-body {
text-align: center;
height: 100%;
}
.bar {
text-align: center;
color: #FFF;
text-shadow: 0px 1px 2px rgba(0,0,0,0.25);
line-height: 5em;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrchief
mrchief / .git_ignore
Created May 17, 2012 17:21 — forked from JamieHouston/.git_ignore
git global ignore file for visual studio/windows
#OS junk files
[Tt]humbs.db
*.DS_Store
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
@mrchief
mrchief / UnescapeUrl
Created April 1, 2013 19:23
If you have host level blocking for ad domains, and those deal clicks land you to an "This page can't be displayed Error" because they can't be re-directed as intended, then this bookmarklet extracts the encoded Url and reloads the page with the direct Url.
javascript: (function(){var href=window.location.href;var loc=href.indexOf('url=');if(loc>0){var endLoc=href.indexOf('&',loc+4);endLoc=endLoc>0?endLoc:href.length;window.location.href=unescape(href.substring(loc+4,endLoc));}})()
body {
padding: 0;
margin: 0;
}
.wrapper {
width: 100%;
margin: 0 auto;
body {
padding: 0;
margin: 0;
}
.wrapper {
width: 100%;
margin: 0 auto;
<div id="bloodhound">
<input class="typeahead" type="text" placeholder="States of USA">
</div>
@mrchief
mrchief / array-intersects.js
Created June 2, 2018 23:31
Simple array intersection check in ES6
/* Returns true if a intersects with b
* a is said to intersect with b if at least 1 element of a is present in b.
* e.g.
* intersects(['1', '2'], ['1', '3', '4']) // true
* intersects(['1', '2'], ['3', '4']) // false
*/
export default (a, b) => a.some(k => b.indexOf(k) > -1)
const debounce = (func, wait, immediate) => {
let timeout
return (...args) => {
const later = () => {
timeout = null
if (!immediate) func(...args)
}
const callNow = immediate && !timeout
@mrchief
mrchief / cssLoader.js
Created June 28, 2018 20:27
react-static vendor css chunks
'use strict' // eslint-disable-line
import ExtractCssPlugin from 'extract-text-webpack-plugin'
import path from 'path'
import postcssFlexbugsFixes from 'postcss-flexbugs-fixes'
import postcssPresetEnv from 'postcss-preset-env'
export default ({ config, stage }) => {
let cssLoader = [
{
loader: 'css-loader',