Skip to content

Instantly share code, notes, and snippets.

View gmsotavio's full-sized avatar

Otavio Augusto Gomes gmsotavio

  • Inobram Automações
  • Paraná State, Brazil
View GitHub Profile
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active June 2, 2024 14:36
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 1, 2024 19:36
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Lossless stream rip cheatsheet

This is a short cheatsheet to help you determine whether a release from Amazon, Hulu, or Netflix contains the lossless/untouched (as in no further loss of quality compared to what the streaming services provide) video/audio or not, since tagging is not always consistent and therefore it's an unreliable way to determine this alone.

In most cases, non-lossless rips from these services are screen captures (which, when done by professional releasers, should be high quality and contain little to no glitches – see the history section for details), but in some cases they may be simply reencoded from the untouched stream, for example to crop black bars or reencode from a higher-quality stream to achieve better quality. Also, generally the audio is untouched even when the video is not, but that's not always the case. There is no easy way to differentiate these cases, so I'm only describing what to look for in regards to lossless video streams, and for those, you can be quite certain

@gustavorv86
gustavorv86 / c_priority_queue_threads.c
Last active September 8, 2023 04:42
POSIX message priority queue example written in C/C++
/**
* Compile:
* gcc -std=gnu11 -Wall -Wextra c_priority_queue_threads.c -o priority_queue_threads -lpthread -lrt
*/
#include <errno.h>
#include <mqueue.h>
#include <fcntl.h> /* For O_* constants. */
#include <sys/stat.h> /* For mode constants. */
@Jehops
Jehops / ipfw.sh
Last active October 12, 2022 19:06
ipfw config
#!/bin/sh
# This is an attempt at an ipfw config for a cluster with a master node and many
# compute nodes. The master node is acting as a gateway for the compute nodes
# in the LAN (192.168.0.0/24).
#
# A jail running on one of the compute nodes with address 192.168.0.118 is to be
# accessible from the outside (using redirect_addr 192.168.0.118
# 129.173.118.118). The address 129.173.118.118 is an alias for the WAN
# interface that will only be used to direct traffic to this jail.
@F21
F21 / signing-gpg-keys.md
Last active May 5, 2024 20:59
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
@mwidmann
mwidmann / add_local_trusted_ca_for_valid_https.md
Last active March 22, 2024 10:30
Generating trusted SSL keys for development

Generating SSL keys for development

Installation

Thanks to minica it is very easy to create trusted SSL certificates that have a very long expiration date.

In order to get started you have to have the go tools installed and set up correctly in your environment.

Setup

@gmsotavio
gmsotavio / queue_example_threads.c
Created August 8, 2018 12:56 — forked from gustavorv86/c_priority_queue_threads.c
POSIX message queue example written in C/C++
#include <fcntl.h>
#include <mqueue.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@pautiina
pautiina / sysctl.conf
Created October 16, 2018 11:53 — forked from jahil/sysctl.conf
calomel.org freebsd network tuning
# FreeBSD 10.2 -- /etc/sysctl.conf version 0.47
# https://calomel.org/freebsd_network_tuning.html
#
# low latency is important so we highly recommend that you disable hyper
# threading on Intel CPUs as it has an unpredictable affect on latency, cpu
# cache misses and load.
#
# These settings are specifically tuned for a "low" latency FIOS (300/300) and
# gigabit LAN connections. If you have 10gig or 40gig you will need to increase
# the network buffers as proposed. "man tuning" for more information.
@Quick104
Quick104 / readme.md
Last active May 24, 2024 20:05
Expose a server behind CG:NAT via Wireguard