Skip to content

Instantly share code, notes, and snippets.

View nhuongmh's full-sized avatar

Minh Nhuong nhuongmh

View GitHub Profile
@girorme
girorme / worker-pool.go
Last active May 8, 2024 18:24
worker pool using go channels + waitGroup
package main
import (
"flag"
"fmt"
"net/http"
"sync"
"threadsync/httpclient"
"time"
)
@j-un
j-un / spotify.html
Last active May 8, 2025 16:00
[Hugo] Shortcode for Spotify embed code
<!--
Parameters:
type - (Required) album / track / playlist / artist
id - (Required) Target ID
width - (Optional) width
height - (Optional) height
-->
{{ if .IsNamedParams }}
<iframe src="https://open.spotify.com/embed/{{ .Get "type" }}/{{ .Get "id" }}"
@raghur
raghur / shell.sh
Created September 11, 2017 08:41
QPDF command to remove file restrictions from password protected pdf file.
# remove pdf file restrictions from password protected pdf file.
qpdf.exe --decrypt --password=verysecret input.pdf output.pdf
@alepez
alepez / fix.md
Created November 25, 2016 13:59
Ubuntu 16.04 (EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
sudo apt-get install xserver-xorg-legacy

Edit /etc/X11/Xwrapper.config

allowed_users=anybody
needs_root_rights=yes