Skip to content

Instantly share code, notes, and snippets.

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

Sanjay Rohila crazyrohila

🏠
Working from home
View GitHub Profile
@crazyrohila
crazyrohila / regex-snippet
Created April 22, 2014 07:50
Sublime Regex Snippet
// Find some words with numbers numbers
1) breakpoint\((\d+)\)
@crazyrohila
crazyrohila / SassMeister-input.scss
Created July 22, 2014 07:04
Generated by SassMeister.com.
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// ----
@mixin x-rem($property, $values) {
$base-font-size: 10px;
$px-values: ();
$rem-values: ();
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// ----
@mixin x-rem($property, $values) {
$base-font-size: 10px;
$px-values: ();
$rem-values: ();
@crazyrohila
crazyrohila / SassMeister-input.scss
Created August 4, 2014 09:44
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.0)
// ----
%header {
h2 {
color: yellow;
}
h3 {
@crazyrohila
crazyrohila / SassMeister-input.scss
Created August 4, 2014 09:44
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.0)
// ----
%header {
h2 {
color: yellow;
}
h3 {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function Person(name) {
@crazyrohila
crazyrohila / SassMeister-input.scss
Created September 14, 2014 18:07
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
.block {
foo: bar1;
@at-root {
$ref: &;
:not(#{$ref}--modifier) &__elem {
@crazyrohila
crazyrohila / hasExtension
Created November 13, 2014 20:01
has File Extension
/**
* Helper function to check file extension for <input type="file"> element.
* @param Array exts An array containing extension to check. eg. ['.png', '.zip'].
* @return Boolean returns ture only if all files are matched given extension otherwise returns false.
*/
$.fn.hasExtension = function(exts) {
var file_list = this[0].files;
for (var i = 0, file; file = file_list[i]; i++) {
var fileName = file.name;
@crazyrohila
crazyrohila / SassMeister-input.scss
Last active August 29, 2015 14:12
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
// Demo: @at-root and "&" selector
// Simple example with @at-root and & selector.
ul {
display: flex;
@crazyrohila
crazyrohila / SassMeister-input.scss
Created December 29, 2014 13:43
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
// Demo: Maps and Error handling in sass.
$colors: (
dark-gray: rgb(153, 153, 153),
gray: rgb(204, 204, 204),