I hereby claim:
- I am lstanard on github.
- I am jarls (https://keybase.io/jarls) on keybase.
- I have a public key ASCPwZ-C35DgYlEbbj-7QX9ylqnp_JKxYDghjec4KBuozwo
To claim this, I am signing this object:
// Setup scrollto links | |
$('.scrollto').on('click', function(e) { | |
var targetElement = $('#' + $(this).attr('href').substring(1)); | |
if (targetElement.length >= 1) { | |
var target = targetElement.offset().top, | |
scrollSpeed = function() { return Math.ceil( Math.abs( target - $w.scrollTop() ) / 1.5 ); }; | |
$('html, body').animate({ | |
scrollTop: target | |
}, scrollSpeed() ); | |
} |
(function($){ | |
$.fn.pluginName = function(options) { | |
var settings = $.extend({ | |
'option': 'value' | |
}, options||{} ); | |
} | |
})(jQuery); |
/*! | |
* jQuery lightweight plugin boilerplate | |
* Original author: @ajpiano | |
* Further changes, comments: @addyosmani | |
* Licensed under the MIT license | |
*/ | |
// the semi-colon before the function invocation is a safety | |
// net against concatenated scripts and/or other plugins | |
// that are not closed properly. |
I hereby claim:
To claim this, I am signing this object:
type PickAndRequireAll<T, K extends keyof T> = { | |
[P in K]-?: T[P]; | |
}; |
import React from "react"; | |
import PropTypes from "prop-types"; | |
const MyComponent = ({ prop1, prop2, className }) => { | |
let someMessage = "This is a message, it may change"; | |
// If a value could change use `let` and if/else statements rather | |
// than a function that returns a value. | |
if (prop1) { | |
someMessage = "The message has changed based on some condition"; |
$(document).ready(function() { | |
var mobile, | |
w = $(window), | |
breakpoint = 640, | |
sw = document.documentElement.clientWidth, | |
sh = document.documentElement.clientHeight; | |
w.on('resize orientationchange', function() { | |
sw = document.documentElement.clientWidth; |
// Call window resize function only once finished | |
var waitForFinalEvent = (function () { | |
var timers = {}; | |
return function (callback, ms, uniqueId) { | |
if (!uniqueId) { | |
uniqueId = "Don't call this twice without a uniqueId"; | |
} | |
if (timers[uniqueId]) { | |
clearTimeout (timers[uniqueId]); | |
} |
<?php | |
/* | |
Plugin Name: Simple Debug Log | |
*/ | |
if ( ! function_exists('debug_log')) { | |
function debug_log ( $log ) { | |
if ( is_array( $log ) || is_object( $log ) ) { | |
error_log( print_r( $log, true ) ); | |
} else { |
[ | |
{ | |
"key": "group_5719a52cf2cb2", | |
"title": "Organisms", | |
"fields": [ | |
{ | |
"key": "field_5719a52e1711e", | |
"label": "Organism", | |
"name": "organism", | |
"type": "repeater", |