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
@leandronsp
leandronsp / Dockerfile
Last active February 27, 2025 11:26
A multi-threaded web server in Assembly x86
FROM --platform=linux/amd64 ubuntu
RUN apt-get update
RUN apt-get install make binutils build-essential -y
RUN apt-get install nasm gdb strace -y
WORKDIR /app
@nmvuong92
nmvuong92 / golang s3 download with progressbar.go
Last active September 26, 2024 12:09
golang s3 download with progressbar
package awss3
import (
"context"
"crypto/tls"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
#!/bin/bash
PROXY=""
RELEASE_API="https://api.github.com/repos/librespeed/speedtest-go/releases/latest"
BIN_DST_DIR=/usr/local/bin
RESOURCE_DST_DIR=/usr/local/etc/speedtest-backend
function getReleaseInfo() {
response=$(curl ${RELEASE_API})
if [ $? == 0 ]; then
echo $response
@AndBondStyle
AndBondStyle / bluetooth-reconnect
Last active April 24, 2023 14:12
Simple linux service for brute-force bluetooth auto-connection
#!/bin/bash
# Miminum delay between iterations, in seconds
delay=10
# Pairs of [bluetooth MAC, test expression]
targets=(
"98:B6:E9:47:F0:4F" "test ! -e /dev/input/js0"
"98:B6:E9:72:6C:31" "test -z \"\$(bluetoothctl info 98:B6:E9:72:6C:31 | grep 'Connected: yes')\""
)
@D4ryl00
D4ryl00 / go.mod
Last active April 4, 2023 12:01
No PeerLeave event received when calling topic.Close()
module pubsub-event
go 1.19
require (
github.com/libp2p/go-libp2p v0.23.2
github.com/libp2p/go-libp2p-pubsub v0.8.1
)
require (
@sts10
sts10 / rust-command-line-utilities.markdown
Last active April 19, 2025 22:06
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
@popsUlfr
popsUlfr / streampubsub.go
Created June 28, 2021 10:38
libp2p minimal streams
package main
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"log"
"os"
@popsUlfr
popsUlfr / pub.go
Created June 28, 2021 10:37
libp2p minimal pubsub
package main
import (
"context"
"errors"
"log"
"os"
"os/signal"
"sync"
"syscall"