Skip to content

Instantly share code, notes, and snippets.

#!/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)
<?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>
@BiS-9
BiS-9 / comoEmpiezo.md
Last active May 6, 2024 21:41
Lista de recursos de Hack4u para empezar en Ciberseguridad
@iam-hussain
iam-hussain / default HTTP
Last active May 6, 2024 21:37
Serve nextJS app from a port through NGINX reverse proxy HTTP and HTTPS
# 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;
<?
# 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');
@Klerith
Klerith / custom_product_field.dart
Created March 22, 2023 19:35
Pantalla de Producto y Custom Product Field
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;
@Klerith
Klerith / email.dart
Created March 18, 2023 14:15
Flutter - Formz Inputs
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}$',
@Klerith
Klerith / fcm-simple.md
Created March 8, 2023 20:09
FCM - No recomendado - Envío de Push
@mypy-play
mypy-play / main.py
Created April 3, 2024 20:01
Shared via mypy Playground
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]):
@seamus65
seamus65 / doorbell_notify_alexa.yaml
Last active May 6, 2024 21:21
blueprint tutorial
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: