Pattern for | Link |
---|---|
Phone numbers | https://regex101.com/r/AyWVis/3 |
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
export const useAsync = ({ asyncFunction }) => { | |
const [loading, setLoading] = useState(false); | |
const [error, setError] = useState(null); | |
const [result, setResult] = useState(null); | |
const execute = useCallback( | |
async (...params) => { | |
try { | |
setLoading(true); | |
const response = await asyncFunction(...params); |
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
# EditorConfig helps keep your project formatting consistent. | |
# See https://EditorConfig.org | |
# | |
# This is a modified version of the WordPress coding standards. | |
# | |
# Author: Sal Ferrarello (@salcode) | |
# https://salferrarello.com/wordpress-editorconfig/ | |
# | |
# You can download this file directly | |
# to your project from the command-line with |
Install.
composer require phpoffice/phpexcel
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 | |
/** | |
* create_thumb | |
* | |
* @author JoseRobinson.com | |
* @link https://gist.github.com/jrobinsonc/b40c99a4d688f8a2d554 | |
* @param string $file_src_path | |
* @param int $width | |
* @param int $height |
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
#!/bin/bash | |
# Copyright © 2015 Bjørn Johansen | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
WP_PATH="/path/to/wp" | |
# Check if WP-CLI is available | |
if ! hash wp 2>/dev/null; then |
So basically FlowType doesn't know about CSS Modules, a really handy way of dealing with the plagues of CSS in codebases (global variables and dependency wackiness mainly).
What WebPack allows us to do is "require" CSS files and use their class names:
import styles from "my_styles.css";
import React from "react";
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 | |
/** | |
* Execute PHP from widgets. | |
*/ | |
add_filter('widget_text', function ($html){ | |
if(strpos($html, "<"."?php") !== false) | |
{ | |
ob_start(); |
NewerOlder