Discover gists
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
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
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
<?xml version="1.0"?> | |
<!-- Add more negative to training. --> | |
<opencv_storage> | |
<cars3 type_id="opencv-haar-classifier"> | |
<size> | |
20 20</size> | |
<stages> | |
<_> | |
<!-- stage 0 --> | |
<trees> |
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
# Serve nextJS app from a port through NGINX reverse proxy (HTTP) | |
# Path: /etc/nginx/sites-available/default | |
# Default server configuration for HTTP | |
server { | |
server_name www.DOMAINNAME.com DOMAINNAME.com; | |
# Serve any static assets with NGINX | |
location /_next/static { | |
alias /home/ubuntu/PROJECT_FOLDER/.next/static; |
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
<? | |
# MIT license, do whatever you want with it | |
# | |
# This is my invoice.php page which I use to make invoices that customers want, | |
# with their address on it and which are easily printable. I love Stripe but | |
# their invoices and receipts were too wild for my customers on Remote OK | |
# | |
require_once(__DIR__.'/../vendor/autoload.php'); |
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'; | |
class CustomProductField extends StatelessWidget { | |
final bool isTopField; // La idea es que tenga bordes redondeados arriba | |
final bool isBottomField; // La idea es que tenga bordes redondeados abajo | |
final String? label; | |
final String? hint; | |
final String? errorMessage; |
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:formz/formz.dart'; | |
// Define input validation errors | |
enum EmailError { empty, format } | |
// Extend FormzInput and provide the input type and error type. | |
class Email extends FormzInput<String, EmailError> { | |
static final RegExp emailRegExp = RegExp( | |
r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$', |
Metod: POST URL: https://fcm.googleapis.com/fcm/send
Body:
{
"to" : "Token del cliente",
"notification" : {
"body" : "Body of Your Notification",
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
from typing import overload, Any, Iterable, TypeVar, Union | |
from _typeshed import SupportsKeysAndGetItem | |
_KT = TypeVar("_KT") | |
_VT = TypeVar("_VT") | |
_T1 = TypeVar("_T1") | |
_T2 = TypeVar("_T2") | |
class MyDict(dict[_KT, _VT]): |
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: Doorbell - Notify Alexa | |
description: "Make an announcement over Amazon Echo devices when the doorbell is pushed." | |
domain: automation | |
input: | |
doorbell: | |
name: Doorbell | |
description: This is the doorbell binary sensor | |
selector: |
NewerOlder