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
type IsId<T extends string = string> = T extends `${infer U}${infer V}` | |
? Includes<IdAlphabet, U> extends true | |
? V extends "" | |
? U | |
: IsId<V> extends never | |
? never | |
: `${U}${IsId<V>}` | |
: never | |
: never; |
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: Zigbee2MQTT - Sonoff SNZB-01 Zigbee Wireless Switch | |
description: Automate your Sonoff SNZB-01 Zigbee Wireless Switch via Zigbee2MQTT. | |
domain: automation | |
input: | |
switch: | |
name: Sonoff SNZB-01 Zigbee Wireless Switch | |
description: Sonoff SNZB-01 Zigbee Wireless Switch to use | |
selector: | |
entity: |
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
git reset $(git merge-base master $(git branch --show-current)) |
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 ECOMM_STEPS = { | |
HOME_DETAILS: 'home-details', | |
LOADER_SERVICE_SCREEN: 'service-loading-screen', | |
NO_SERVICE_SCREEN: 'no-service-screen', | |
FRANCHISE_SCREEN: 'franchise-screen', | |
ORKIN_GREEN: 'orkin-green', | |
SERVICE_SELECTION: 'service-selection', | |
PEST_SELECTION: 'pest-selection', | |
PEST_DETAILS: 'pest-details', | |
LOADER_PEST_RETURN: 'pest-return', |
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
sup, sub { | |
vertical-align: baseline; | |
position: relative; | |
top: -0.4em; | |
} | |
sub { | |
top: 0.4em; | |
} |
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
L.Polyline = L.Polyline.include({ | |
getDistance: function(system) { | |
// distance in meters | |
var mDistanse = 0, | |
length = this._latlngs.length; | |
for (var i = 1; i < length; i++) { | |
mDistanse += this._latlngs[i].distanceTo(this._latlngs[i - 1]); | |
} | |
// optional | |
if (system === 'imperial') { |
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
Future<BitmapDescriptor> getBitmapDescriptorFromSVGAsset( | |
BuildContext context, | |
String svgAssetLink, { | |
Size size = const Size(30, 30), | |
}) async { | |
String svgString = await DefaultAssetBundle.of(context).loadString( | |
svgAssetLink, | |
); | |
final drawableRoot = await svg.fromSvgString( | |
svgString, |
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 'package:flutter/material.dart'; | |
import 'package:flutter_hooks/flutter_hooks.dart'; | |
/// Creates an animation controller. | |
/// | |
/// * [value] is the initial value of the animation. If defaults to the lower | |
/// bound. | |
/// | |
/// * [duration] is the length of time this animation should last. | |
/// |
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 'package:latlong/latlong.dart'; | |
import 'dart:math' as math; | |
LatLng getCenter(LatLng p1, LatLng p2) { | |
double dLon = degToRadian(p2.longitude - p1.longitude); | |
final lat1 = degToRadian(p1.latitude); | |
final lat2 = degToRadian(p2.latitude); | |
final lon1 = degToRadian(p1.longitude); | |
double dx = math.cos(lat2) * math.cos(dLon); | |
double dy = math.cos(lat2) * math.sin(dLon); |
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> | |
<!-- Global site tag (gtag.js) - Google Analytics --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-64554054-15"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} |