Skip to content

Instantly share code, notes, and snippets.

View thiagozs's full-sized avatar
:octocat:
Have a nice day

Thiago Zilli Sarmento thiagozs

:octocat:
Have a nice day
View GitHub Profile
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 27, 2025 15:04 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@schweigert
schweigert / Embedding GoLang into a Ruby application.md
Last active April 11, 2025 19:24
Embedding GoLang into a Ruby application - Blogpost to Magrathealabs

Go Title

I am passionate about Ruby, but its execution time compared to other languages is extremely high, especially when we want to use more complex algorithms. In general, data structures in interpreted languages become incredibly slow compared to compiled languages. Some algorithms such as ´n-body´ and ´fannkuch-redux´ can be up to 30 times slower in Ruby than Go. This is one of the reasons I was interested in embedding Go code in a Ruby environment.

For those who do not know how shared libraries operate, they work in a similar way as DLLs in Windows. However, they have a native code with a direct interface to the C compiler.

Note Windows uses the DLL system, and in this case, this does not necessarily have to be in native code.

One example is DLLs written in C#, which runs on a virtual machine. Because I do not use windows, I ended up not testing if it is poss

@leocb
leocb / bins.md
Last active May 21, 2024 22:10
Common credit card BINs for Brazil

BIN for most common credit cards in Brazil

⚠️ For anyone using this, please note that this file is from 2015 and may be out of date or may not include all current BINs

BINs (Bank Identification Number) are the first 6 digits of a credit card. these are being distributed around the world all the time, this gist tries to list all possible ranges for the most common brazilian credit cards. Please help me keep it updated 😄

note: All length fields refer to the max length

Sources

@mimoo
mimoo / compress_tar_gzip.go
Last active March 6, 2025 01:49
How to compress a folder in Golang using tar and gzip (works with nested folders)
package main
import (
"archive/tar"
"bytes"
"compress/gzip"
"fmt"
"io"
"os"
"path/filepath"
#!/bin/bash
# WORK IN PROGRESS - NOT FULLY TESTED
# To install aliases
# bash bash_aliases.sh filename1 filename2 filenamex
# bash bash_aliases.sh git npm docker
# Mac Os setup
# https://ss64.com/osx/syntax-bashrc.html
if [[ `uname` == Darwin* ]] && ! grep "bash-aliases" ~/.bash_profile ;then
echo '[ -f ~/.bash-aliases ] && . ~/.bash-aliases' >> ~/.bash_profile
@popsUlfr
popsUlfr / pub.go
Last active April 1, 2023 16:48
ipfs coreapi minimal pubsub
package main
import (
"context"
"log"
"time"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/coreapi"
"github.com/ipfs/go-ipfs/core/node"
@popsUlfr
popsUlfr / pub.go
Created June 28, 2021 10:37
libp2p minimal pubsub
package main
import (
"context"
"errors"
"log"
"os"
"os/signal"
"sync"
"syscall"
@popsUlfr
popsUlfr / streampubsub.go
Created June 28, 2021 10:38
libp2p minimal streams
package main
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"log"
"os"
@sts10
sts10 / rust-command-line-utilities.markdown
Last active April 27, 2025 15:15
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool