Skip to content

Instantly share code, notes, and snippets.

#! /bin/sh
#
# virtuoso OpenLink Virtuoso Open-Source Edition
#
# Written by OpenLink Virtuoso Maintainer
# <[email protected]>
#
# Adapted for CentOS 6.0
#
# sources
@miku
miku / thoughts.md
Last active August 29, 2015 14:13 — forked from kevinswiber/thoughts.md

Thoughts on JSON Patch

Introduction

JSON Patch is a media type developed to take advantage of the HTTP PATCH method. It includes operations such as add, remove, replace, copy, move, and test. Below is a first reaction to reading the specification. Note that the author has not attempted a real implementation of JSON Patch, which would certainly provide a more thorough analysis and different perspective.

Benefits

  1. The JSON Patch specification provides an actual media type to use with PATCH. This enables the PATCH method to be usable across client-server implementations. It's a real attempt at solving the partial update problem in Web APIs.
  2. JSON Patch documents allow shallow and nested object updates.
@miku
miku / piping.go
Last active August 29, 2015 14:15 — forked from kylelemons/piping.go
package main
import (
"bytes"
"exec"
"log"
"os"
)
// Pipeline strings together the given exec.Cmd commands in a similar fashion
  1. General Background and Overview
// packageList returns the list of packages in the dag rooted at roots
// as visited in a depth-first post-order traversal.
func packageList(roots []*Package) []*Package {
seen := map[*Package]bool{}
all := []*Package{}
var walk func(*Package)
walk = func(p *Package) {
if seen[p] {
return
@miku
miku / translate.go
Last active August 29, 2015 14:22 — forked from hvoecking/translate.go
// Traverses an arbitrary struct and translates all stings it encounters
//
// I haven't seen an example for reflection traversing an arbitrary struct, so
// I want to share this with you. If you encounter any bugs or want to see
// another example please comment.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Heye Vöcking
//
@miku
miku / trie.go
Last active August 29, 2015 14:22 — forked from jameshfisher/trie.go
package trie
import (
"container/vector"
"sort"
)
// A 'set' structure, that can hold []byte objects.
// For any one []byte instance, it is either in the set or not.
type Trie struct {
@miku
miku / System Design.md
Created April 18, 2016 07:51 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@miku
miku / gist:f5a0c0c6977d9d24e237f1b5ba9afd18
Created May 9, 2016 10:50 — forked from richfitz/gist:2324707
Install MinionPro on OSX
#!/bin/sh
## Information
## http://carlo-hamalainen.net/blog/2007/12/11/installing-minion-pro-fonts/
## http://www.ctan.org/tex-archive/fonts/mnsymbol/
## 0: Install
## http://www.lcdf.org/type/
## I used --without-kpathsea to configure (with MacTeX 2011):
##
## ./configure --without-kpathsea