Skip to content

Instantly share code, notes, and snippets.

Mattemagikern / Certificates.go
Created May 9, 2019
Create x509 certificate chain using Golang. Root CA, Designated CA, server CA
View Certificates.go
package main
import (
lmj0011 /
Last active May 19, 2022
Building and Loading the ReJSON v1 Module on Linux Ubuntu 16.04 for Redis

make sure you have at least redis v4.0+

redis-server --version

redis-cli --version

install the build-essential package

apt-get install build-essential

sethvargo /
Created Jun 6, 2018
Use openssl to create an x509 self-signed certificate authority (CA), certificate signing request (CSR), and resulting private key with IP SAN and DNS SAN
# Define where to store the generated certs and metadata.
# Optional: Ensure the target directory exists and is empty.
rm -rf "${DIR}"
mkdir -p "${DIR}"
# Create the openssl configuration file. This is used for both generating
# the certificate as well as for specifying the extensions. It aims in favor
# of automation, so the DN is encoding and not prompted.
malekpour / Startup.cs
Last active May 30, 2020
Iris Go vs .NET Core Kestrel in terms of HTTP performance
View Startup.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Http;
etenzy /
Last active May 17, 2021
MVC View Model Naming Conventions
  • Model: Singular
  • View: Plural
  • Controller:
    • Plural: If your controller contains at least one action method that handles multiple entities at a single transaction. (resourceful)
    • Singular: example the AccountController is singular because it represents actions (action method) pertaining to a single account only.
  • Route: Plural
teknoraver / unixhttpc.go
Last active Apr 3, 2022
HTTP over Unix domain sockets in golang
View unixhttpc.go
package main
import (
vitan / PriorityQueue_Multiple_producers_consumers.go
Last active Jan 23, 2022
PriorityQueue in golang, to support multiple producers and multiple consumers. with example how to use it
View PriorityQueue_Multiple_producers_consumers.go
package main
import (
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active May 12, 2022
webRTC stun / turn server list
View gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
to check if the server works -
higebu / connect_with_specific_source_port.go
Created May 16, 2016
Golang: Connect with specific source port
View connect_with_specific_source_port.go
package main
import (
func main() {
lopspower /
Last active May 24, 2022
Hexadecimal color code for transparency

Hexadecimal color code for transparency


How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store