Skip to content

Instantly share code, notes, and snippets.

View tsak's full-sized avatar
💾

tsak

💾
View GitHub Profile
@darkuncle
darkuncle / The_Rules.md
Last active August 19, 2024 00:36
The Rules - guidelines learned through hard experience in operations

NEW! Fan of the list Diego Peinador has done what I've been too lazy to do for years: stand up an easily-remembered domain for The Rules, complete with one-per-page URL schema - e.g., for Rule 42 just visit https://the-rul.es/42/

Thanks Diego! <3

(subject to additions, but rarely changes)

rule 0: It has to work.

rule 1: As simple as possible.

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 November 13, 2024 13:44
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