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
services: | |
homeassistant: | |
container_name: homeassistant | |
image: ghcr.io/home-assistant/home-assistant:stable | |
volumes: | |
- '/Users/morshed/homeassistant:/config' | |
environment: | |
- TZ=Asia/Dhaka # get your Time Zone from - https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | |
# network_mode: host | |
ports: |
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
/** | |
* Return all image size name in rest api | |
* And i also modified to add width and height | |
* | |
* Main idea is taking from here | |
* @link https://stackoverflow.com/a/50853300/3087033 | |
*/ | |
function prepare_product_images($response) { | |
global $_wp_additional_image_sizes; |
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
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] | |
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] | |
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] |
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
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
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
.next | |
out |
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 Counter from './counter'; | |
const App = () => ( | |
<div className='flex flex-wrap justify-between md:justify-center'> | |
<Counter target={150} title='Customer' duration={1} /> | |
<Counter target={20000} title='Rooms' duration={2} /> | |
<Counter target={40000} title='Places' duration={3} /> | |
<Counter target={1200000} title='Users' duration={4} /> | |
</div> | |
); |
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
/** | |
* Create a unique slug from title. | |
* | |
* @link https://stackoverflow.com/questions/38800581/laravel-str-slug-not-working-for-unicode-bangla/38800717 | |
* @link https://laracasts.com/discuss/channels/general-discussion/l5-routing-1 | |
* @param string $title | |
* @return string | |
*/ | |
public function makeSlugFromTitle($title) | |
{ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Odometer</title> | |
<script src="https://raw.github.com/morr/jquery.appear/master/jquery.appear.js"></script> | |
<script src="https://raw.githubusercontent.com/HubSpot/odometer/master/odometer.min.js"></script> | |
</head> | |
<body> | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Style Switcher</title> | |
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> | |
<style type="text/css"> | |
.clear:before, | |
.clear:after { | |
content: " "; |