Skip to content

Instantly share code, notes, and snippets.

View avipinto's full-sized avatar

Avi Pinto avipinto

View GitHub Profile
@avipinto
avipinto / SassMeister-input.scss
Created April 30, 2014 20:28
Generated by SassMeister.com.
// ----
// Sass (v3.3.6)
// Compass (v1.0.0.alpha.18)
// ----
$bgEven: #FED;
$bgOdd: #DAD;
.odd{ backgeound-color:$bgOdd;}
.even{ backgeound-color:$bgEven;}
.oddEven .gridItem:nth-child(even){background-color:$bgEven;}
@avipinto
avipinto / c.md
Created July 18, 2012 19:24 — forked from padolsey/c.md
JS challenge

Implement Point so that:

new Point( new Point(10, 20) + new Point(30, 50) ).toString() === '{40,70}'

Must be generic and be able to handle x and y values from 0..999 (integers only)

Minor hint: you'll need to implement valueOf and toString methods.

background-image: linear-gradient(-45deg,
#E5E5E7 25%, #DFDFE1 25%, #DFDFE1 50%,
#E5E5E7 50%, #E5E5E7 75%, #DFDFE1 75%, #DFDFE1);
background-size:6px 6px;
/*NOTE: using prefix-free for readable css*/
body
{
background: linear-gradient(top, rgba(232,232,232,1) 0%,rgba(232,232,232,0.98) 62%,rgba(78,124,167,0.98) 62%,rgba(82,129,172,0.98) 68%,rgba(110,169,215,0.98) 100%);
height: 768px;
}
.ball
{
width: 194px;
/*NOTE: using prefix-free for readable css*/
body
{
background: linear-gradient(top, rgba(232,232,232,1) 0%,rgba(232,232,232,0.98) 62%,rgba(78,124,167,0.98) 62%,rgba(82,129,172,0.98) 68%,rgba(110,169,215,0.98) 100%);
height: 768px;
}
.ball
{
width: 194px;
@avipinto
avipinto / MicrosoftMvcJQueryValidation.js
Created July 4, 2011 12:23
MicrosoftMvcJQueryValidation.js patched so validations will work when moving from MVC2 to MVC3 + added MVC_BindClientValidation to enable rebind when returning a new form via ajax
/// <reference path="jquery-1.6.1.js" />
/// <reference path="jquery.validate.js" />
// register custom jQuery methods
jQuery.validator.addMethod("regex", function(value, element, params) {
if (this.optional(element)) {
return true;
}