Skip to content

Instantly share code, notes, and snippets.

View michaeljs1990's full-sized avatar

Michael Schuett michaeljs1990

View GitHub Profile
@rendoaw
rendoaw / linux_lldp.md
Last active July 11, 2023 17:20
Linux Enable LLDP
@barosl
barosl / add.c
Created July 26, 2015 07:26
Function overloading in C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int addi(int a, int b) {
return a + b;
}
char *adds(char *a, char *b) {
char *res = malloc(strlen(a) + strlen(b) + 1);

Problems & Solutions for Interaction Between C and Go

At Vimeo, on the transcoding team, we work a lot with Go, and a lot with C, for various tasks such as media ingest. This means we use CGO quite extensively, and consequently, have run into bits that are perhaps not very well documented, if at all. Below is my effort to document some of the problems we've run into, and how we fixed or worked around them.

Many of these are obviously wrong in retrospect, but hindsight is 20/20, and these problems do exist in many codebases currently.

Some are definitely ugly, and I much welcome better solutions! Tweet me at @daemon404 if you have any, or have your own CGO story/tips, please! I'd love to learn of them.

Table of Contents

@joelthompson
joelthompson / README.md
Last active May 21, 2024 17:19
Vault Auth
@ryboe
ryboe / .travis.yml
Last active November 23, 2023 05:37
Example .travis.yml for Golang
# use the latest ubuntu environment (18.04) available on travis
dist: bionic
language: go
# You don't need to test on very old versions of the Go compiler. It's the user's
# responsibility to keep their compiler up to date.
go:
- 1.16.x
@robbwagoner
robbwagoner / awscli-pex.md
Last active June 8, 2021 12:49
AWS CLI with PEX

What is PEX?

build with Docker image... e.g. Ubuntu 14.04

$ docker run --rm -it -v $PWD:/src -w /src ubuntu:14.04

Install PEX