Skip to content

Instantly share code, notes, and snippets.

View tsak's full-sized avatar
💾

tsak

💾
View GitHub Profile
@darkuncle
darkuncle / Fairness_and_Generosity.md
Last active February 26, 2026 15:29
The Rules - guidelines learned through hard experience in operations

(taken from Hard Sayings of the Bible)

The Rate for the Job? (Mt 20:14-15)

One of the complaints that right-living and religious people made about Jesus arose from his treatment of the more disreputable members of society. They might have agreed that such persons should not be entirely excluded from the mercy of the all-loving God. Even for them there was hope, if they showed by practical repentance and unquestionable amendment of life that they were not beyond redemption. But not until such evidence had been given could they begin to be accepted as friends and neighbors. Jesus, however, accepted them immediately; he did not wait to see the outcome before he committed himself to them. This was disturbing; it was even more disturbing that he seemed to think more highly of them than of those who had never blotted their public copybook. He gave the impression that he actually preferred the company of the rejects of society; he not only made them feel at home in his company, so that they felt free to take l

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

@brucecoddington
brucecoddington / resources.js
Last active June 27, 2020 14:42
Wrapping $resource with api and data services.
angular.module('app.resources', ['ngResource'])
.factory('api', function ($resource) {
var api = {
defaultConfig : {id: '@id'},
extraMethods: {
'update' : {
method: 'PUT'
}
@willurd
willurd / web-servers.md
Last active March 9, 2026 23:37
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000