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

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 / 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