Skip to content

Instantly share code, notes, and snippets.

View hugosenari's full-sized avatar
🌞

Hugo Sena Ribeiro hugosenari

🌞
View GitHub Profile
type
MySeq*[T] = object
data: ptr UncheckedArray[T]
proc createSeq*[T](elems: varargs[T]): MySeq[T] =
result.data = cast[typeof(result.data)](alloc(elems.len * sizeof(T)))
@hugosenari
hugosenari / deprecated.nix
Last active February 24, 2023 06:50
NixOS depracated options
{
services = [ "beegfs" "bird" "bird6" "beegfsEnable" "buildkite-agent" "cgmanager" "chronos" "couchpotato" "cryptpad" "dd-agent" "deepin"
"dnscrypt-proxy" "flashpolicyd" "fourStore" "fourStoreEndpoint" "fprot" "frab" "geoip-updater" "gogoclient" "kippo"
"mailpile" "marathon" "mathics" "meguca" "mesos" "moinmoin" "mwlib" "openfire" "openvpn" "osquery" "prey" "quagga" "racoon"
"railcar" "redis" "riak" "rmilter" "seeks" "shellinabox" "ssmtp" "venus" "virtuoso" "wakeonlan" "winstone"];
programs = ["bash" "oblogout" "qt5ct" "tilp2" "way-cooler"];
security = ["hideProcessInformation" "klogd" "rngd" "setuidOwners" "setuidPrograms"];
systemd = ["generator-packages"];
}
@hugosenari
hugosenari / じゃんけんぽん.nim
Last active November 26, 2022 00:03
Nim じゃんけんぽん
from std/random import randomize, sample
randomize()
type
✊🤚✌️ = enum
✊, 🤚, ✌️
🏆 = enum
👈, 🤷, 👉
@hugosenari
hugosenari / dumbness.nim
Created April 6, 2022 12:52
command line memoization
# import a lot of things because I'm to lazy (or dumb) to think about what imports
import std/[
algorithm,
asyncdispatch,
asyncfile,
asyncnet,
asyncstreams,
base64,
browsers,
@hugosenari
hugosenari / README.md
Created February 28, 2022 03:29
Englightenment 0Nix Test
{ config, pkgs, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
@hugosenari
hugosenari / README.md
Last active August 31, 2021 05:16
slack message

Send message to slack

usage with github actions:

jobs:
  InformDeploy:
    runs-on: ubuntu-latest
    steps:
 - uses: cachix/install-nix-action@v13
@hugosenari
hugosenari / default.nix
Last active August 18, 2021 05:25
random gif from giphy
{ token, rating ? "pg-13", tag ? "so-excited", timestamp ? "n" }:
let
random_gif_response = builtins.fetchurl {
url = "https://api.giphy.com/v1/gifs/random?api_key=${token}&tag=${tag}&rating=${rating}&t=${timestamp}";
name = "random_gif_json";
};
random_gif_json = builtins.readFile random_gif_response;
in builtins.fromJSON random_gif_json
@hugosenari
hugosenari / BR_Municipios_2020.json.7z
Last active July 21, 2021 04:39
BR_Municipios_2020.json source IBGE
This file has been truncated, but you can view the full file.
@hugosenari
hugosenari / holons_async.md
Created June 3, 2021 18:37
Holons as Async/Await

This idea:

Use concepts of holons to build async/await

Objectives:

  • Use stragne nature of studies of holons to formalize async/await schedule

Also look: