Skip to content

Instantly share code, notes, and snippets.

Avatar
developer developers developers developers

Christopher Geary crgeary

developer developers developers developers
View GitHub Profile
View easings.js
export default {
// no easing, no acceleration
linear(t) { return t },
// accelerating from zero velocity
easeInQuad(t) { return t * t },
// decelerating to zero velocity
easeOutQuad(t) { return t * (2 - t) },
// acceleration until halfway, then deceleration
easeInOutQuad(t) { return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t },
// accelerating from zero velocity
@shortjared
shortjared / list.txt
Last active Aug 5, 2020
List of AWS Service Principals
View list.txt
a4b.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
apigateway.amazonaws.com
application-autoscaling.amazonaws.com
appstream.application-autoscaling.amazonaws.com
appsync.amazonaws.com
View react-dom.js
// Resolve custom components by calling .render() recursively.
const resolveComponents = element => {
// If the "component" is a string, it's static text.
if ( typeof element === 'string' ) {
return element;
}
// If the type is a string, it's already in DOM node form.
if ( typeof element.type === 'string' ) {
return element;
@kingkool68
kingkool68 / filter.php
Last active Sep 21, 2017
Using `wp_debug_backtrace_summary()` to only filter something when called from a particular function or method
View filter.php
/*
Here we're filtering the site_url() and get_site_url() functions which are called dozens and dozens of times during a request.
In this case we only want to modify $url if the filter was called from a particular PHP class (rtCamp\WP\Nginx\Helper)
*/
add_filter( 'site_url', function( $url = '' ) {
$backtrace = wp_debug_backtrace_summary();
if ( stripos( $backtrace, 'rtCamp\WP\Nginx\Helper' ) ) {
$url = str_replace( 'https://', 'http://', $url );
}
return $url;
View Snowfall.markdown

Snowfall

Just trying to create a snowfall effect using SVG and CSS animations. JavaScript is used to simply randomize the location of the snowflakes. Full warning: works in Chrome, Safari, Firefox and later versions of Opera. Internet Explorer (up to and including 11) doesn't seem to like it.

A Pen by Chip Cullen on CodePen.

License.

@bendc
bendc / functional-utils.js
Last active Jul 25, 2020
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
View functional-utils.js
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@msurguy
msurguy / list.md
Last active Jan 26, 2018
List of CMSs built with Laravel (stable and in dev)
@msurguy
msurguy / List.md
Last active Aug 12, 2020
List of open source projects made with Laravel
View List.md

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@jo-snips
jo-snips / events-conditional-wrappers.php
Last active Jun 25, 2020
The Events Calendar: Basic Conditional Wrappers
View events-conditional-wrappers.php
<?php
/*-----------------------------------------------------------------------------------*/
/* Conditional Logic to Detect Various Event Related Views/Pages
/*-----------------------------------------------------------------------------------*/
if( tribe_is_month() && !is_tax() ) { // Month View Page
echo 'were on the month view page';
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page
You can’t perform that action at this time.