Skip to content

Instantly share code, notes, and snippets.

View sayden's full-sized avatar

Mario Castro sayden

View GitHub Profile

The old days

  • An hourly rotated log system
  • Issues:
    • EOF generation and propagation
    • Manual intervention required to continue after errors

First streaming architecture

https://labs.spotify.com/2016/02/25/spotifys-event-delivery-the-road-to-the-cloud-part-i/

  • Key requirement: To deliver complete data with a predictable latency and make it available to our developers via well-defined interface.
  • Event (structured data) as unit of streamed information.
@koistya
koistya / pre-render-critical-css.md
Last active September 10, 2016 16:26
Collecting critical CSS from React.js components for pre-rendering on a server (SSR)

Which one of these two syntaxes do you prefer for pre-rendering critical CSS in ReactJS apps?

Example 1

import styles from './MyComponent.less';
import { withStyles } from '../decorators';

@withStyles(styles)
class MyComponent {
@tejainece
tejainece / StreamToString.go
Created April 2, 2014 18:29
Golang: io.Reader stream to string or byte slice
import "bytes"
func StreamToByte(stream io.Reader) []byte {
buf := new(bytes.Buffer)
buf.ReadFrom(stream)
return buf.Bytes()
}
func StreamToString(stream io.Reader) string {
buf := new(bytes.Buffer)
@fiorix
fiorix / gist:9664255
Created March 20, 2014 13:55
Go multicast example
package main
import (
"encoding/hex"
"log"
"net"
"time"
)
const (