Skip to content

Instantly share code, notes, and snippets.

View gitsrc's full-sized avatar
🦄
welcome

GITSRC gitsrc

🦄
welcome
View GitHub Profile
@denji
denji / golang-tls.md
Last active April 29, 2024 03:39 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@tmichel
tmichel / index.html
Created November 9, 2013 22:07
simple websocket example with golang
<html>
<head>
<title>WebSocket demo</title>
</head>
<body>
<div>
<form>
<label for="numberfield">Number</label>
<input type="text" id="numberfield" placeholder="12"/><br />
@paulmach
paulmach / serve.go
Last active March 28, 2024 15:31
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
@deltheil
deltheil / msgpack.c
Last active June 7, 2022 21:03
Pack / unpack some structs with C msgpack - see http://stackoverflow.com/a/15405794/1688185
#include <stdio.h>
#include <assert.h>
#include <msgpack.h>
typedef struct some_struct {
uint32_t a;
uint32_t b;
float c;
} some_struct;