Skip to content

Instantly share code, notes, and snippets.

View ezos86's full-sized avatar

Eric Cavazos ezos86

View GitHub Profile
//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 August 17, 2015 22:30
The Sass Lighten and Darken Scale Helper

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.

@ezos86
ezos86 / Particle engine tutorial part 2 [a].markdown
Created August 4, 2015 05:19
Particle engine tutorial part 2 [a]
@ezos86
ezos86 / smooth-scroll.js
Created July 23, 2015 01:16
Smooth-Scroll Javascript with Hash
$(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;
@ezos86
ezos86 / Nice, compliant input boxes.markdown
Created July 16, 2015 09:57
Nice, compliant input boxes

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 June 16, 2015 17:53
Sample Read More to Try on Wordpress
<?php
$args = array(
'meta_key'=>'readmoretext',
'meta_value'=>'Go check this out',
'post_status'=>'publish',
'post_type'=>'post',
'orderby'=>'date',
'order'=>'DESC'
);
@ezos86
ezos86 / Timeline-example-using-Bootstrap.markdown
Created May 7, 2015 22:15
Timeline example using Bootstrap
@ezos86
ezos86 / gist:68cfdf07c883269a43dd
Created March 28, 2015 21:18
Percentage Chance on a Random Pick Function
var choices = [
[10, "apples"],
[20, "oranges"],
[70, "bananas"]
];
function pickChoice() {
rand = Math.floor(Math.random() * 100);
choice = -1;
@ezos86
ezos86 / README.md
Last active August 29, 2015 14:16 — forked from oodavid/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

// 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)
{