Skip to content

Instantly share code, notes, and snippets.

Eric Cavazos ezos86

View GitHub Profile
View _price-plan.scss
//Grid System Setup
.price-row{
@for $i from 1 through 12 {
.col-#{$i} {
width: 100% / 12 * $i;
float: left;
box-sizing: border-box;
}
}
margin:0 auto;
@ezos86
ezos86 / The Sass Lighten and Darken Scale Helper.markdown
Created Aug 17, 2015
The Sass Lighten and Darken Scale Helper
View The Sass Lighten and Darken Scale Helper.markdown

The Sass Lighten and Darken Scale Helper

Using 5% increments, quickly see the varients of your color choice side by side for lighten and darken Sass functions

A Pen by Smartass.io on CodePen.

License.

View Particle engine tutorial part 2 [a].markdown
@ezos86
ezos86 / smooth-scroll.js
Created Jul 23, 2015
Smooth-Scroll Javascript with Hash
View smooth-scroll.js
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
View Nice, compliant input boxes.markdown

Nice, compliant input boxes

Nice input box with a lot of styling based on sibling selectors and psuedo classes.

CSS only, and WCAG 2.0 AA compliant!

A Pen by Andrew Tunnecliffe on CodePen.

License.

@ezos86
ezos86 / functions.php
Created Jun 16, 2015
Sample Read More to Try on Wordpress
View functions.php
<?php
$args = array(
'meta_key'=>'readmoretext',
'meta_value'=>'Go check this out',
'post_status'=>'publish',
'post_type'=>'post',
'orderby'=>'date',
'order'=>'DESC'
);
@ezos86
ezos86 / gist:68cfdf07c883269a43dd
Created Mar 28, 2015
Percentage Chance on a Random Pick Function
View gist:68cfdf07c883269a43dd
var choices = [
[10, "apples"],
[20, "oranges"],
[70, "bananas"]
];
function pickChoice() {
rand = Math.floor(Math.random() * 100);
choice = -1;
View README.md

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

View tinyxhr.js
// tinyxhr by Shimon Doodkin - licanse: public doamin - https://gist.github.com/4706967
//
// tinyxhr("http://site.com/ajaxaction",function (err,data,xhr){ if (err) console.log("goterr ",err,'status='+xhr.status); console.log(data) });
// tinyxhr("http://site.com/ajaxaction",function (err,data,xhr){ if (err) console.log("goterr ",err,'status='+xhr.status); console.log(data) },'POST','value1=1&value2=2');
// tinyxhr("http://site.com/ajaxaction.json",function (err,data,xhr){ if (err) console.log("goterr ",err,'status='+xhr.status); console.log(data); console.log(JSON.parse(data)) },'POST',JSON.stringify({value:1}),'application/javascript');
// cb - a callback function like: function (err,data,XMLHttpRequestObject){ if (err) throw err; }
//
function tinyxhr(url,cb,method,post,contenttype)
{
You can’t perform that action at this time.