Skip to content

Instantly share code, notes, and snippets.

View zshipko's full-sized avatar
🐢

zach zshipko

🐢
View GitHub Profile
@antirez
antirez / resp3.md
Last active June 2, 2020 08:41
RESP3 protocol draft

RESP3 specification

Versions history:

  • 1.0, 2 May 2018, Initial draft to get community feedbacks.

Background

The Redis protocol has served us well in the past years, showing that, if carefully designed, a simple human readable protocol is not the bottleneck in the client server communication, and that the simplicity of the design is a major advantage in creating a healthy client libraries ecosystem.

Yet the Redis experience has shown that after about six years from its introduction (when it replaced the initial Redis protocol), the current RESP protocol could be improved, especially in order to make client implementations simpler and to support new features.

/**
* Bresenham Curve Rasterizing Algorithms
* @author Zingl Alois
* @date 17.12.2014
* @version 1.3
* @url http://members.chello.at/easyfilter/bresenham.html
*/
function assert(a) {
if (!a) console.log("Assertion failed in bresenham.js "+a);
@mikoim
mikoim / README.md
Last active April 27, 2024 00:22
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

@tvlooy
tvlooy / vmm_howto.md
Last active February 28, 2024 15:14
OpenBSD VMM howto

OpenBSD VMM howto

Setup

/etc/rc.conf.local

apmd_flags="-A"
dhcpd_flags=vether0
vmd_flags=
ntpd_flags="-s"
@scemama
scemama / eval.ml
Created October 26, 2015 22:40
Evaluate a string in OCaml
(* http://stackoverflow.com/questions/33291754/eval-a-string-in-ocaml *)
#require "compiler-libs" (* Assuming you're using utop, if compiling then this is the package you need *)
let eval code =
let as_buf = Lexing.from_string code in
let parsed = !Toploop.parse_toplevel_phrase as_buf in
ignore (Toploop.execute_phrase true Format.std_formatter parsed)
eval "let () = print_endline \"hello\";;"
@vittorioromeo
vittorioromeo / hello_triangle.cpp
Created October 10, 2015 11:07
SDL2 + OpenGL ES 2.0 - "Hello triangle" example that works both on X11 and Emscripten
#include <exception>
#include <functional>
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_ttf.h>
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 9, 2024 19:52
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@protrolium
protrolium / ffmpeg.md
Last active May 3, 2024 18:58
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@makmanalp
makmanalp / comparison.md
Last active March 14, 2023 14:58
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).

@nolanlawson
nolanlawson / couchdb_changes.md
Last active December 21, 2023 03:22
Anatomy of the CouchDB changes feed

Anatomy of the CouchDB changes feed

I just spent a lot of time finally understanding CouchDB's changes feed, so I thought I'd do a short writeup here.

The mystery

Let's imagine the following changes to the database. There are two documents, A and B:

_id seq rev winner?