Skip to content

Instantly share code, notes, and snippets.

View pzentenoe's full-sized avatar

pzenteno pzentenoe

View GitHub Profile
@pzentenoe
pzentenoe / license-badges.md
Created July 4, 2024 06:01 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@pzentenoe
pzentenoe / email.dart
Last active May 27, 2023 16:43 — forked from Klerith/email.dart
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}$',
package main
import (
"fmt"
"io/ioutil"
"net/http"
"sync"
"time"
"go.uber.org/ratelimit"
@pzentenoe
pzentenoe / flutter_github_ci.yml
Created September 29, 2020 19:39 — forked from rodydavis/flutter_github_ci.yml
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
include: all_lint_rules.yaml
analyzer:
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
# This is generated from the i18n vscode extension
- "**/i18n.dart"
strong-mode:
implicit-casts: false
implicit-dynamic: false
@pzentenoe
pzentenoe / context_cancel.go
Created June 23, 2020 15:15 — forked from fracasula/context_cancel.go
GoLang exiting from multiple go routines with context and wait group
package main
// Here we show how to properly terminate multiple go routines by using a context.
// Thanks to WaitGroup we'll be able to end all go routines gracefully before the main function ends.
import (
"fmt"
"os"
"context"
"sync"
minikube start --vm-driver=xhyve --container-runtime=docker --show-libmachine-logs --v=10 --alsologtostderr --cpus 4 --memory 8192
@pzentenoe
pzentenoe / go-os-arch.md
Created January 10, 2020 14:08 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.8.3 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • android
  • darwin
@pzentenoe
pzentenoe / bulk_elastic_go.go
Created July 23, 2019 13:51
Crear archivo json para bulk en elastic
func CreateElasticIndexData(products []models.Product) error {
file, err := os.Create("archivo.json")
if err != nil {
fmt.Println(err)
return err
}
w := bufio.NewWriter(file)
defer file.Close()
@pzentenoe
pzentenoe / build.gradle
Created July 20, 2019 05:35 — forked from Klerith/build.gradle
Flutter: Build para 32 bit y 64 bits - Curso de Flutter fernando-herrera.com
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {