Skip to content

Instantly share code, notes, and snippets.

View HudsonAfonso's full-sized avatar
:octocat:
Focusing

Hudson Afonso HudsonAfonso

:octocat:
Focusing
View GitHub Profile
@HudsonAfonso
HudsonAfonso / gsheet-hashfunc.gs
Created April 1, 2024 22:58 — forked from tariqk/gsheet-hashfunc.gs
Hash digest functions for Google Sheets — uses Utilities.computeDigest() from Google App Scripts
/**
* Returns the hash digest of a single cell or an array of cells.
*
* @param {"Sample text"} input - Text to hash.
* @param {"MD5"} algorithm - (optional) Hashing algorithm to use. Choose between MD2, MD5, SHA-1, SHA-256, SHA-384 and SHA-512. Defaults to MD5.
* @customfunction
*/
function HASH(input, algorithm) {
input = input || "" // what, nothing? FINE, you get nothing. Jerks.
if (input.map) { // check if it's an array, and make sure that the same damn algorithm is used.

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@HudsonAfonso
HudsonAfonso / main.dart
Last active January 5, 2022 21:50
demo
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Para receber informações sobre os seus dados pessoais, os propósitos e as partes de informação que são compartilhadas, entre em contato com o Proprietário. Controlador de Dados e Proprietário
Coffeeincode
E-mail de contato do Proprietário: coffeeincode@gmail.com Tipos de Dados coletados
O proprietário não fornece uma lista de tipos de dados pessoais recolhidos.
Outros Dados Pessoais recolhidos podem ser descritos em outras seções desta política de privacidade ou pelo texto explicativo específico apresentado no contexto da coleta de Dados. Os Dados Pessoais podem ser livremente fornecidos pelo Usuário, ou coletados automaticamente quando se utiliza este Aplicativo. Qualquer uso de Cookies - ou de outras ferramentas de rastreamento - pelo este Aplicativo ou pelos proprietários dos serviços terceirizados utilizados por este Aplicativo, salvo indicação em contrário, servem para identificar os Usuários e lembrar as suas preferências, com o único propósito de fornecer os serviços requeridos pelos Usuários. O nã
use_debug false
use_bpm 130
# Our mixer!
master = (ramp *range(0, 1, 0.01))
kick_volume = 1
bass_volume = 1
revbass_volume = 1
snare_volume = 0.5
hats_volume = 0.5
@HudsonAfonso
HudsonAfonso / main.go
Created March 1, 2020 16:56 — forked from miyoyo/main.go
Flutter doc explorer bot (CC-By) (Updated 2019/05/27: Updated domains)
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
"os/signal"
"regexp"
@HudsonAfonso
HudsonAfonso / main.dart
Created January 16, 2020 23:49
Pokémon GO Pokédex
import 'package:flutter/material.dart';
import 'package:hasura_connect/hasura_connect.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
@HudsonAfonso
HudsonAfonso / main.dart
Last active January 8, 2020 18:11
split
void main() {
var numCartao = splitIntoChunks(string: '3991641839424977', size: 4);
print(numCartao);
var numCartao2 = '3991641839424977'.splitIntoChunks(size: 4);
print(numCartao2);
}
String splitIntoChunks({String string, int size, String separator = ' '}) {
return string.splitMapJoin(
@HudsonAfonso
HudsonAfonso / HelloWorld.ts
Created July 28, 2019 13:36 — forked from up1/HelloWorld.ts
TDD with TypeScript
export class HelloWorld {
public sayHi(name: string): string {
return "Hi, " + name;
}
}
@HudsonAfonso
HudsonAfonso / how-to-copy-aws-rds-to-local.md
Created July 20, 2019 13:09 — forked from syafiqfaiz/how-to-copy-aws-rds-to-local.md
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored