No, this isn't about render props
I'm going to clean this up and publish it in my newsletter next week!
So react-i18n
(not the npm one... one we made at PayPal internally) has this
<?php | |
class MapPageField extends WireData implements Module{ | |
public static function getModuleInfo(){ | |
return array( | |
'title' => 'MapPageField', | |
'version' => 100, | |
'singular' => true, | |
'autoload' => true |
//scroll to anchor point on page load | |
function scrollOnLoad() { | |
try { | |
//take HREF and split at anchor | |
var $_elem = $('#' + $(location).attr('href').split('#')[1]); | |
//find class of anchor element | |
var $_others = $('.' + $_elem.attr('class')); | |
//measure window height and element height | |
//if the window height is smaller that twice the element height, then use regular offset |
<?php | |
/** | |
* Switch ProcessWire templates directory on $_SERVER['HTTP_HOST']. Type the | |
* Hostname as key and the name of the new templates folder as value. | |
* | |
*/ | |
$config->templates = array( | |
'mobile.domain.dev' => 'templates-mobile', // domain => templates folder name |
No, this isn't about render props
I'm going to clean this up and publish it in my newsletter next week!
So react-i18n
(not the npm one... one we made at PayPal internally) has this
/** | |
* GTM utm_ remover | |
* License: MIT | |
* Author: @CanRau | |
* Version: 0.2.0 | |
* | |
* Removes all query parameters from the url beginning with 'utm_' | |
* Leaves anchors (#) and other query params alone, so | |
* example.com/?session=SESSIONID&utm_source=instagram#content | |
* would become |
main() { | |
var user = 'John Doe'; | |
var message = """ | |
$user! | |
Welcome to Programming Dart! | |
"""; | |
print(message); | |
} |
<?php | |
// front-end form example with multiple images upload | |
// add new page created on the fly and adding images | |
$message = ''; | |
if($input->post->submit){ | |
// tmp upload folder for additional security |
function useIsPendingPathname(to) { | |
let { location } = useTransition(); | |
let { pathname } = useResolvedPath(to); | |
return location?.pathname === pathname; | |
} | |
function useIsSlowTransition(ms = 300) { | |
let transition = useTransition(); | |
let [isSlow, setIsSlow] = useState(false); |
I hereby claim:
To claim this, I am signing this object:
name: serverless-mono | |
description: Serverless mono infrastructure | |
backend: | |
url: s3://my-pulumi-state-bucket | |
runtime: | |
name: nodejs | |
options: | |
typescript: false | |
lock: | |
region: ap-southeast-2 |