Skip to content

Instantly share code, notes, and snippets.

View EricMountain-1A's full-sized avatar

Eric Mountain @ Amadeus EricMountain-1A

  • Amadeus sas
  • France
View GitHub Profile
@EricMountain-1A
EricMountain-1A / golang-tls.md
Created December 29, 2016 11:47 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
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)
openssl ecparam -genkey -name secp384r1 -out server.key
@EricMountain-1A
EricMountain-1A / core.go
Last active September 3, 2015 09:42 — forked from lhuard1A/core.go
How to create a GO program that cores…
package main
import (
"fmt"
)
// #include <stdlib.h>
// #include "signal.h"
import "C"
@EricMountain-1A
EricMountain-1A / gocore.go
Last active October 5, 2015 10:27
Coring in Go
// Produces a core.
// Usage: GOTRACEBACK=crash ./example
// Check ulimit -c beforehand.
// Note the root signal is SEGV, however Go catches this, handles it and raises ABRT.
package main
import (
"fmt"
"sync/atomic"
"unsafe"
@EricMountain-1A
EricMountain-1A / pr.md
Last active August 29, 2015 14:24 — forked from hongymagic/pr.md

Locate the section for your stash remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@stash.internal:private/repository.git

Now add the line fetch = +refs/pull-requests/*:refs/remotes/origin/pull-requests/* to this section. Obviously, change the stash url to match your project's URL. It ends up looking like this:

@EricMountain-1A
EricMountain-1A / pr.md
Last active August 29, 2015 14:24 — forked from hongymagic/pr.md

Locate the section for your stash remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@stash.internal:private/repository.git

Now add the line fetch = +refs/pull-requests/*:refs/remotes/origin/pull-requests/* to this section. Obviously, change the stash url to match your project's URL. It ends up looking like this: