Skip to content

Instantly share code, notes, and snippets.

Cristián Berríos crisberrios

View GitHub Profile
View gist:842f7c6cacba0509ae13
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);
View gist:b275e506c72b2236cc53
/*-----------------------------------*\
$HEADER
\*-----------------------------------*/
.site__header {
-webkit-animation: bounceInUp 1s;
}
.site__title {
color: #f35626;
View gist:cf413ece442a38f14fa9
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:8eaeedd03399976bcd47
Created Mar 24, 2015
Regex check for phone numbers bonfire
View gist:8eaeedd03399976bcd47
/(^1? ?\(?\d\d\d\)?[ -]?\d\d\d[ -]?\d\d\d\d)$/g;
@crisberrios
crisberrios / gcd-lcm
Created Mar 15, 2015
GCD and lcm routines
View gcd-lcm
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 / VYBbOZ.markdown
Last active May 23, 2018
Projectile physics using jQuery
View VYBbOZ.markdown
@crisberrios
crisberrios / index.jade
Last active Aug 29, 2015
Dynamic jQuery button glow with shadow
View index.jade
div.container
button.glow
a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') #FreeCodeCamp
You can’t perform that action at this time.