This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set Expiration DateTime | |
$expiresDate = new DateTime( $data['expires'], new DateTimeZone( 'UTC' ) ); | |
// Set Current DateTime | |
$now = new DateTime('now', new DateTimeZone( 'UTC' )); | |
// If needed determine difference | |
$dateDiff = $expiresDate->diff( $now ); | |
// Print out for testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am gtwalford on github. | |
* I am gtwalford (https://keybase.io/gtwalford) on keybase. | |
* I have a public key whose fingerprint is 04B1 3D74 418E D94F C20C 9B21 53CB 917E 2524 61F1 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get IP for docker container from hosts file | |
upstream {{upstreamName}} { | |
#container name / corresponding to hosts file | |
server {{containerName}}; | |
} | |
server { | |
listen 80; | |
server_name example.com; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!this._scrollToPositionTimeout) { | |
this._scrollToPositionTimeout = setTimeout( function() { | |
animateScroll(this._componentInstance) | |
this._scrollToPositionTimeout = null | |
}.bind(this), 0) | |
} | |
else { | |
animateStop(this._componentInstance) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { VelocityTransitionGroup, velocityHelpers } from 'velocity-react'; | |
const Animation = {}; | |
if (process.env.BROWSER) { | |
require('velocity-animate/velocity.ui'); | |
Animation.In = velocityHelpers.registerEffect({ | |
calls: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=== px -> rem USE: @include rem('padding',18px 0 20px 5px); | |
//=== Thanks to the tons of posts that I put this together with. | |
@mixin rem($property, $px-values) { | |
// Convert the baseline into rems | |
$baseline-rem: $baseline-px / 1rem * 1; | |
// Print the first line in pixel values | |
#{$property}: $px-values; | |
// If there is only one (numeric) value, return the property/value line for it. | |
@if type-of($px-values) == "number" { | |
#{$property}: $px-values / $baseline-rem; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var q = keystone.list('IconographyPage') | |
.model | |
.find() | |
.lean() | |
.populate({ | |
path: 'iconSections', | |
populate: { path: 'icons' } | |
}); | |
q.exec(function (err, results) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropTypes } from 'react' | |
import { isBrowser } from 'environment' | |
import { partial as _partial } from 'lodash' | |
import { VelocityComponent } from 'velocity-react' | |
if (isBrowser()) { | |
require('./_ScrollTo.scss') | |
} | |
function onRefAnimationComponent (componentInstance, component) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _throttle = (fn, timeout, opts) => { | |
let pid = null; | |
return () => { | |
if(pid) { return } | |
pid = setTimeout(fn, timeout); | |
}; | |
}; | |
const _debounce = (fn, timeout, opts) => { |
OlderNewer