Skip to content

Instantly share code, notes, and snippets.

View crisberrios's full-sized avatar

Cristián Berríos crisberrios

View GitHub Profile
@crisberrios
crisberrios / index.jade
Last active August 29, 2015 14:16
Dynamic jQuery button glow with shadow
div.container
button.glow
a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') #FreeCodeCamp
@crisberrios
crisberrios / gcd-lcm
Created March 15, 2015 02:58
GCD and lcm routines
var gcd = function (a,b){
if ( ! b) {
return a;
}
return gcd(b, a % b)
}
var lcm = function (i,j){
return (i*j)/gcd(i,j);
}
@crisberrios
crisberrios / gist:8eaeedd03399976bcd47
Created March 24, 2015 18:36
Regex check for phone numbers bonfire
/(^1? ?\(?\d\d\d\)?[ -]?\d\d\d[ -]?\d\d\d\d)$/g;
@crisberrios
crisberrios / gist:cf413ece442a38f14fa9
Created March 24, 2015 21:13
Cash Register Bonfire
function drawer(price, cash, cid) {
var values = {
'ONE HUNDRED': 100,
'TWENTY': 20,
'TEN': 10,
'FIVE': 5,
'ONE': 1,
'QUARTER': 0.25,
'DIME': 0.1,
@crisberrios
crisberrios / gist:b275e506c72b2236cc53
Created March 30, 2015 18:38
Animate.css header example
/*-----------------------------------*\
$HEADER
\*-----------------------------------*/
.site__header {
-webkit-animation: bounceInUp 1s;
}
.site__title {
color: #f35626;
function pairwise(arr, arg) {
var cloneArr = arr.slice(0);
return pair = cloneArr
.map(function(i) {
return arg-i;
})
.map(function(i,index) {
var pairIndex = cloneArr.indexOf(i);
@crisberrios
crisberrios / esnextbin.md
Last active February 4, 2016 19:16
esnextbin sketch
@crisberrios
crisberrios / esnextbin.md
Created February 4, 2016 20:35
esnextbin sketch
@crisberrios
crisberrios / esnextbin.md
Created May 4, 2016 19:27
esnextbin sketch
@crisberrios
crisberrios / VYBbOZ.markdown
Last active May 23, 2018 19:40
Projectile physics using jQuery