Skip to content

Instantly share code, notes, and snippets.

View ezos86's full-sized avatar

Eric Cavazos ezos86

View GitHub Profile

Quick Color Gradients with Sass (Scss)

Make a quick color gradient with scss.

A Pen by ezos86 on CodePen.

License.

public static function DateDiff($d1, $d2) {
if($d1 == $d2) return 0;
$d1 = (int)strtotime($d1);
$d2 = (int)strtotime($d2);
$timz = array(
"year" => (60 * 60 * 24 * 365),
"mth" => (60 * 60 * 24 * 30),
"day" => (60 * 60 * 24),
"hour" => (60 * 60),
"min" => (60)
@ezos86
ezos86 / Shadows-on-Box.markdown
Created June 10, 2014 23:22
A Pen by ezos86.

Shadows on Box

Bending bottom side edges up. You may need to adjust the absolute positioning depending on page placement.

A Pen by ezos86 on CodePen.

License.

@ezos86
ezos86 / LGlvw.markdown
Created June 10, 2014 23:21
A Pen by ezos86.
@ezos86
ezos86 / contnt.html
Created August 26, 2013 07:51
Corner Up Shadow Technique - CSS
<div class="effect3" style="margin:20px;">
<img class="effect3" src="http://0777.ir/img/lndl.png"
original-src="http://pearlsquirrel.com/profilethumbnails/$thumbnail"
width="180" height="180" alt="PearlSquirrel"/>
</div>
@ezos86
ezos86 / country-drop-down.html
Created August 19, 2013 18:44
Country Drop down List (countryCodeAlpha2) for forms.
<select name="countryCodeAlpha2" class="countryCodeAlpha2">
<option value ="null">Choose a Country</option>
<option value ="AF">Afghanistan</option>
<option value ="AX">Åland</option>
<option value ="AL">Albania</option>
<option value ="DZ">Algeria</option>
<option value ="AS">American Samoa</option>
<option value ="AD">Andorra</option>
<option value ="AO">Angola</option>
<option value ="AI">Anguilla</option>
@ezos86
ezos86 / jquery-no-method-error.js
Created August 19, 2013 18:42
jQuery Variable Error - Object has no method '.val()' or any other method. - it normally results from a Global variable error. Example VS below
var country = $('.countryCodeAlpha2');
var x = country.val();
console.log(x);
VS
var country = $('.countryCodeAlpha2').val;
console.log(country);
@ezos86
ezos86 / scroll-fixed-nav.html
Created August 12, 2013 20:19
Nav Bar Mid-page - scroll and then fixed at top of page.
<!DOCTYPE>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<title></title>
</head>
<body>
<div style="height:3000px; position:relative; margin-top:150px; float:left;">
<span id="subnav" style="background-color:#000; height:20px; color:#fff; width:100%; float:left;">hold this</span>
</div>
@ezos86
ezos86 / jquery-ajax-submit.js
Created August 6, 2013 05:47
Jquery Ajax Submit to API Example with Complete PostBack
$.ajax({
type: 'GET',
url: reportsUrl,
beforeSend : function(xhr) {
var base64 = Base64.encode(username + ":" + password);
xhr.setRequestHeader("Authorization", "Basic " + base64);
},
contentType: 'plain/text',
xhrFields: {
withCredentials: true