Skip to content

Instantly share code, notes, and snippets.


Michael Schuett michaeljs1990

View GitHub Profile
robbwagoner /
Last active Oct 16, 2018

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

ryboe / .travis.yml
Last active Feb 20, 2021
Example .travis.yml for Golang
View .travis.yml
# 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.
- 1.16.x

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

barosl / add.c
Created Jul 26, 2015
Function overloading in C
View add.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);
rendoaw /
Last active Dec 12, 2016
Linux Enable LLDP

#What is a commit?

In the simplest literal terms possible, a commit represents a change to lines of code in a revision control system, along with a description. The mechanics of most VCSes don't prescribe anything beyond that simple model. It's a concept that has been in use (and misuse) for a little over 40 years, and a central concept in every major version control system ever released. Given that, and the fact that you're reading this document, and the fact that this document is in a revision control system, you're probably already familiar with this concept.

You are probably also familiar with people making "bad commits", but what you might not be familiar with is a team that makes only "good commits", and more particularly the organizational implications of doing so. This document aims to explore those implications.

In order to get a good conceptual framework for ho

rygorous / vr_urgh.txt
Last active May 13, 2020
What I mean when I say "I think VR is bad news".
View vr_urgh.txt
This just got linked to by the Y combinator news account, without proper context,
so a brief introduction: A month ago (end of May / early June 2014) I had a
Twitter conversation with a bunch of acquaintances. One tweet in the middle
of that thread, with obligatory hyperbole, was me saying that I think VR is
bad news.
Well, that part of the thread (but not the rest that provides context) recently
got retweeted, and then someone asked me if I could explain what I mean by that,
and because Twitter is a great platform for delivering 140 character slogans and
not so great for lengthy explanations, I wrote this. So, obligatory disclaimer:
# Copyright (c) 2015, Intel Corporation
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
davidandrzej / TrickyMapValues.scala
Last active Jun 7, 2017
Scala Map.mapValues returns a (lazy) view. Hilarity ensues.
View TrickyMapValues.scala
// TIL Scala Map.mapValues returns a lazy view
// This has the horrific consequence that supplying a non-pure function
// can yield a result map with unexpected / undesired behavior (see below)
// Further discussion here: