Skip to content

Instantly share code, notes, and snippets.

View cbaigorri's full-sized avatar

Chris Baigorri cbaigorri

View GitHub Profile
@cbaigorri
cbaigorri / cors-nginx.conf
Created January 31, 2017 22:53 — forked from alexjs/cors-nginx.conf
Slightly tighter CORS config for nginx
#
# Slightly tighter CORS config for nginx
#
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs
#
# Despite the W3C guidance suggesting that a list of origins can be passed as part of
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox)
# don't seem to play nicely with this.
#
@cbaigorri
cbaigorri / easing-equations.scss
Last active November 11, 2016 06:07
Easing equations for css transitions.
$ease-in-sine: cubic-bezier(0.47, 0, 0.745, 0.715);
$ease-out-sine: cubic-bezier(0.39, 0.575, 0.565, 1);
$ease-in-out-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95);
$ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
$ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
$ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
$ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
$ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22);
@cbaigorri
cbaigorri / gist:3963d8c2994a373bf855
Created November 19, 2015 21:52 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@cbaigorri
cbaigorri / gist:16f1bec861e6a175a90f
Created October 6, 2015 04:28
Verticall center anything CSS
.parent-element {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
position: relative;
}
.element {
position: absolute;
top: 50%;
@cbaigorri
cbaigorri / easing-equations.less
Created August 26, 2015 20:06
Easing equations for css transitions.
@ease-in-sine: cubic-bezier(0.47, 0, 0.745, 0.715);
@ease-out-sine: cubic-bezier(0.39, 0.575, 0.565, 1);
@ease-in-out-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95);
@ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
@ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
@ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
@ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
@ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
@ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
@ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22);
@cbaigorri
cbaigorri / gist:677c56c3309477d354a3
Created June 4, 2015 18:36
MongoDB Shell utilities
// kill long running ops
killLongRunningOps = function(maxSecsRunning) {
currOp = db.currentOp();
for (oper in currOp.inprog) {
op = currOp.inprog[oper-0];
if (op.secs_running > maxSecsRunning && op.op == "query" && !op.ns.startsWith("local")) {
print("Killing opId: " + op.opid + " running over for secs: " + op.secs_running);
db.killOp(op.opid);
}
}
@cbaigorri
cbaigorri / gist:7454343
Created November 13, 2013 18:55
LESS focal point loop A loop to generate focal point classes.
@focalPointGridSize: 5;
@focalPointGridColSize: (100/@focalPointGridSize)/100;
.focalPointXLoop (@x) when (@x > 0) {
.focalPointYLoop (@y) when (@y > 0) {
@xPos: floor(percentage((@x) * @focalPointGridColSize));
@yPos: floor(percentage((@y) * @focalPointGridColSize));