Skip to content

Instantly share code, notes, and snippets.

View GusGA's full-sized avatar
🕶️
Reading someone else's code

Gustavo Giménez GusGA

🕶️
Reading someone else's code
  • Santiago, Chile
View GitHub Profile
@GusGA
GusGA / main.go
Created July 7, 2022 18:40 — forked from viktorbenei/main.go
sha1 hmac hexdigest signature
package main
import (
"crypto/hmac"
"crypto/sha1"
"crypto/subtle"
"encoding/hex"
"fmt"
"os"
)
@GusGA
GusGA / memoize.go
Created June 29, 2022 04:44
Memoize function in go
func Memoize(fn func(int) int) func(int) int {
cache := make(map[int]int)
return func(n int) int {
if v, ok := cache[n]; ok {
return v
}
cache[n] = fn(n)
return cache[n]
}
}
@GusGA
GusGA / 99-sysctl.conf
Last active September 28, 2021 21:17
Instalación db oracle
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 5178150
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
@GusGA
GusGA / alacritty.yml
Created June 27, 2021 00:18 — forked from sts10/alacritty.yml
My Alacritty config yml for MacOS (compliant with v 0.4.1-dev)
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
#
# If this property is not set, alacritty will set it to xterm-256color.
#
@GusGA
GusGA / SES_CMD.txt
Last active November 20, 2019 23:30
Nombre de alias DUOC
Comentario
Miembros
-------------------------------------------------------------------------------
Se ha completado el comando correctamente.
Nombre de usuario SES2501
Nombre completo
@GusGA
GusGA / flatten.exs
Last active June 10, 2019 19:51
Flatten implementation written in elixir without language helpers functions
defmodule Flatten do
@moduledoc """
List flatten recursive implementation without language helpers
"""
@doc """
Flat a nested list of list.
Returns list flattend.
@GusGA
GusGA / pt_guide.md
Last active April 16, 2024 22:36
Guía de configuración de equipos en packet tracer

Script de comandos de packet tracer

Equipo Switch

Entrar en modo EXEC privilegiado

Ejecutar el comando enable

Switch> enable
@GusGA
GusGA / erlang_training_concepts.md
Last active April 15, 2019 16:12
Self learning erlang path based on Erlang solutions training topics

Erlang solutions topics per course

Basic Erlang

Objectives:

  • Understanding of the basics of Erlang
  • Read/Write/Design Erlang Programs
  • Provides basics needed to attend the OTP course

Topics:

  • Background
  • Basic Erlang
@GusGA
GusGA / flatten.erl
Created July 31, 2018 03:06
flatten array
-module(flatten).
-export([flat/1]).
flat(List) -> flat(List, []).
flat([], Acc) -> Acc;
flat([H | T], Acc) -> flat(H, flat(T, Acc));
flat(H, Acc) -> [H | Acc].