Skip to content

Instantly share code, notes, and snippets.

View ttytm's full-sized avatar
🏂
On vacation

Turiiya ttytm

🏂
On vacation
View GitHub Profile
@jackhftang
jackhftang / http_client_pool.nim
Last active May 12, 2023 17:58
Nim HttpClientPool
import asyncdispatch
import deques
import options
import httpclient
import strformat
export httpclient # for AsyncResponse
#[
Wrapping AsyncHttpClient for pooling and timeout, also see
@Maxzor
Maxzor / remove-all-from-docker-oneliner.sh
Last active December 21, 2023 19:51 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
echo "Removing containers :" && if [ -n "$(docker container ls -aq)" ]; then docker container stop $(docker container ls -aq); docker container rm $(docker container ls -aq); fi; echo "Removing images :" && if [ -n "$(docker images -aq)" ]; then docker rmi -f $(docker images -aq); fi; echo "Removing volumes :" && if [ -n "$(docker volume ls -q)" ]; then docker volume rm $(docker volume ls -q); fi; echo "Removing networks :" && if [ -n "$(docker network ls | awk '{print $1" "$2}' | grep -v 'ID\|bridge\|host\|none' | awk '{print $1}')" ]; then docker network rm $(docker network ls | awk '{print $1" "$2}' | grep -v 'ID\|bridge\|host\|none' | awk '{print $1}'); fi;
@qoomon
qoomon / conventional_commit_messages.md
Last active May 12, 2024 10:23
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active May 5, 2024 20:02
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@albulescu
albulescu / download.go
Created March 25, 2016 09:44
golang download file with progress
package main
/**
* @website http://albulescu.ro
* @author Cosmin Albulescu <cosmin@albulescu.ro>
*/
import (
"bytes"
"fmt"