Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View olt's full-sized avatar
🤖
I may be slow to respond.

Oliver Tonnhofer olt

🤖
I may be slow to respond.
  • Omniscale
  • Germany
View GitHub Profile
@pramsey
pramsey / ccog-readinglist.md
Last active September 3, 2021 00:30
Canadian Council on Geomatics Reading List

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

%global commit 9198d6fa2216125b656091dd998e0162deec2595
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%define upname HyperLevelDB
Name: hyperleveldb
Version: 1.0.0
Release: 3%{?dist}
Summary: A fork of LevelDB intended to meet the needs of HyperDex while remaining compatible with LevelDB.
Group: Development/Libraries
@steeve
steeve / _readme.md
Last active March 7, 2024 12:38
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

@m0n5t3r
m0n5t3r / generate_traffic.py
Created November 3, 2010 17:15
stats gathering with gunicorn; gstats.py should be run with one sync worker, gunicorn.conf.py should be in your config
#!/usr/bin/env python
import sys
from random import random
from time import sleep
from threading import Thread, active_count
execfile('gunicorn.conf.py')
@max-mapper
max-mapper / pdxapi-data-preview.html
Created August 19, 2010 03:46
loads geocouch datasets and visualizes them on an openlayers map. see it in action at http://pdxapi.com/preview.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css" />
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg'></script>
<script src="http://openlayers.org/api/OpenLayers.js"></script>
<script src="http://www.google.com/jsapi?key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg"></script>
<script type="text/javascript">
google.load("jquery", '1.4');
google.load("maps", "2.x");
</script>