INSERT INTO table1 (column1,column2 ,..)
VALUES
(value1,value2 ,...),
(value1,value2 ,...),
...
(value1,value2 ,...);
I hereby claim:
- I am canrau on github.
- I am canrau (https://keybase.io/canrau) on keybase.
- I have a public key ASDcjXYRMtWtmJKpTow9SS7FahCJbrnILp30C51yJrH_7Ao
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
import { useEffect, useState } from "react"; | |
// @NOTE: It's stringifying as I'm storing the result in a form field and then DB, but you can of course change that to your needs | |
// @NOTE: Also `getHighEntropyValues` might throw as mentioned in https://developer.mozilla.org/en-US/docs/Web/API/NavigatorUAData/getHighEntropyValues#exceptions | |
// @NOTE: so when it errors I'm returning the more "basic" `navigator?.userAgentData` with the error information, which might be unnecessary, but I'm curious 🤷🏻♂️ | |
export const useUserAgentClientHints = () => { | |
const [userAgent, setUserAgent] = useState(""); | |
useEffect(() => { |
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
<?php | |
/* Batch delete all fields containing order_ in name */ | |
foreach($fields->find("name%=order_") as $field) { | |
$fields->delete($field); | |
if (!$fields->get($field)) echo "<p>field {$field->name} was deleted.</p>"; | |
} | |
/* list all templates and provide ability to delete unused ones */ | |
if ($input->post->submit) { |
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
/** | |
* 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 |
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
<?php | |
/** | |
* Add to any textarea field from field settings | |
* or place the following code into any template file | |
* | |
* $modules->TextformatterBlogImages->formatValue($page, new Field(), $page->body); | |
* where $page->body is your textarea | |
* | |
* make sure to review path to simple_html_dom.php | |
* |
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
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
class MyWrapper { | |
return React.Children.only(this.props.children); | |
} | |
class MyLibraryComponent { | |
render() { | |
return <div><span><whatever><MyWrapper ref=...>{this.props.statelessComponentThatIWantToReference}</MyWrapper></whatever></span></div>; | |
} |
###Steps:
- Create your button with button-management tools.
<!-- Sample of code generated -->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="RGQ8NSYPA59FL">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/pt_BR/i/scr/pixel.gif" width="1" height="1">
NewerOlder