Skip to content

Instantly share code, notes, and snippets.

View yordanoweb's full-sized avatar
💭
I may be slow to respond.

Yordano Pascual Rivera yordanoweb

💭
I may be slow to respond.
  • Freelancer
  • Las Tunas, Cuba
View GitHub Profile
@yordanoweb
yordanoweb / go-win-from-linux.md
Last active February 23, 2025 16:23
Compile Go for Windows from Linux

Compile to Windows executable from Linux

Install zig

By any means, using default distro package manager, or any other method, install zig. Please, install zig first...

Compile project

CGO_ENABLED=1 \
@sethsandaru
sethsandaru / supervisor.conf
Last active December 20, 2024 14:16
Run supervisor for ubuntu's user without sudo
While many of our readers will get away with running the command again with sudo, and succeeding, there is a better way! The permission error stems from access permissions to supervisord’s socket file, which by default is owned by root, and not writeable by other users. We can make supervisord chown and chmod the file to a particular user or group on startup, granting the user or group permission to stop and start the services we’ve configured without requiring sudo.
Let’s create a group, add ourselves to it by doing the following
groupadd supervisor
usermod -a -G supervisor
After logging-out/logging-in (so that the new group membership takes effect), edit the supervisord configuration file (/etc/supervisor/supervisor.conf) to make the unix_http_server section look as follows
[unix_http_server]
@yordanoweb
yordanoweb / ffmpeg-subs-color-join-and-more.md
Last active March 13, 2025 18:17
Encode with ffmpeg using formatted subtitles

Encode, join, and more, with ffmpeg with subtitles

ffmpeg -i bullet.train.mp4 \
       -f segment -segment_time 00:55:00 -reset_timestamps 1 \
       -c:v mpeg2video -c:a mp2 -b:v 2500k -b:a 128k -s 700x300 -af volume=8.0 \
       -vf "subtitles=filename=bullet.train.srt:force_style='FontSize=26,PrimaryColour=&h00ffff,Bold=1,Shadow=3'" \
       -y bullet.train.%02d.mpg
@marwein
marwein / Microsoft Office 2019 RTM GVLK Keys
Created January 7, 2019 09:30
Microsoft Office 2019 RTM default #GVLK (Generic Volume License Key)
GVLKs for KMS and Active Directory-based activation of Office 2019 and Office 2016
Applies to: Volume licensed versions of Office 2019 and Office 2016, including Project and Visio
By default, volume licensed versions of Office 2019 and Office 2016 are installed with a Generic Volume License Key (GVLK).
The GVLK enables Office to automatically discover and activate against your KMS host computer or Active Directory infrastructure.
Important
These license keys can't be used to activate your personal copy of Office.