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 | |
# Initialize variables | |
declare -a hostnames | |
api_key="" | |
# Function to display usage | |
usage() { | |
echo "Usage: $0 --hostname domain1.com [--hostname domain2.com ...] [--api-key YOUR_API_KEY]" | |
echo |
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
blueprint: | |
name: IKEA Somrig Controls (Z2M) | |
description: "## Control anything with IKEA Somrig Dimmer remote (v1.0) | |
Only for use with Zigbee2MQTT ([MQTT](https://www.home-assistant.io/integrations/mqtt) | |
+ [Z2M addon](https://www.zigbee2mqtt.io/guide/installation/03_ha_addon.html)). | |
Adapted from https://gist.github.com/damru/b2c1c780ffb0ddc084952eb89db9573a |
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
SELECT table_schema AS `Database`, | |
table_name AS `Table`, | |
FORMAT(table_rows, 'en_US') AS `Rows`, | |
CONCAT(IF(data_size / POWER(1024, 3) < 1, FORMAT(data_size / POWER(1024, 2), 0), | |
FORMAT(data_size / POWER(1024, 3), 2)), IF(data_size / POWER(1024, 3) < 1, 'MB', 'GB')) AS `Data`, | |
CONCAT(IF(index_size / POWER(1024, 3) < 1, FORMAT(index_size / POWER(1024, 2), 0), | |
FORMAT(index_size / POWER(1024, 3), 2)), IF(index_size / POWER(1024, 3) < 1, 'MB', 'GB')) AS `Indexes`, | |
CONCAT(IF(total_size / POWER(1024, 3) < 1, FORMAT(total_size / POWER(1024, 2), 0), | |
FORMAT(total_size / POWER(1024, 3), 2)), IF(total_size / POWER(1024, 3) < 1, 'MB', 'GB')) AS `Total` | |
FROM (SELECT table_schema, |
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
<template> | |
<div v-if="show" class="absolute inset-0 h-screen w-screen bg-white bg-opacity-75 text-black z-500 flex items-center overflow-hidden"> | |
<div class="mx-auto text-5xl uppercase">{{ currentBreakpoint }}</div> | |
</div> | |
</template> | |
<script setup> | |
import { refAutoReset, useMediaQuery } from '@vueuse/core'; | |
import { computed, reactive, watch } from 'vue'; |
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
<!-- Temporary breakpoint debugger --> | |
<span class="sm:hidden">XS</span> | |
<span class="hidden sm:inline md:hidden">SM</span> | |
<span class="hidden md:inline lg:hidden">MD</span> | |
<span class="hidden lg:inline xl:hidden">LG</span> | |
<span class="hidden xl:inline">XL</span> | |
<!-- / Temporary breakpoint debugger --> |
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 | |
declare(strict_types=1); | |
namespace App\Tests; | |
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client; | |
use Symfony\Component\HttpClient\MockHttpClient; | |
use Symfony\Component\Security\Core\User\UserInterface; | |
use Symfony\Contracts\HttpClient\ResponseInterface; |
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
<select id="country" name="country"> | |
<option/> | |
</select> | |
<script> | |
(async () => { | |
const response = await fetch('https://restcountries.eu/rest/v2/all?fields=alpha2Code;name'); | |
const countries = await response.json(); | |
const select = document.getElementById('country'); | |
for (const country of countries) { | |
const option = document.createElement('option'); |
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 | |
# tests/bootstrap.php | |
declare(strict_types=1); | |
namespace App\Test; | |
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client; | |
use App\Entity\User; | |
use App\Kernel; |
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
MERCURE_URL=${MERCURE_URL:=https://github.com/dunglas/mercure/releases/download/v0.10.4/mercure_0.10.4_Linux_x86_64.tar.gz} | |
JWT_KEY=${JWT_KEY:=!ChangeMe!} | |
MERCURE_FILE=${MERCURE_URL##*/} | |
# Settings perms | |
echo "Creating mercure user..." | |
groupadd --system mercure | |
useradd --system \ | |
--gid mercure \ | |
--create-home \ |
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
<div class="d-inline-block d-sm-none">XS</div> | |
<div class="d-none d-sm-inline-block d-md-none">SM</div> | |
<div class="d-none d-md-inline-block d-lg-none">MD</div> | |
<div class="d-none d-lg-inline-block d-xl-none">LG</div> | |
<div class="d-none d-xl-inline-block">XL</div> |
NewerOlder