Skip to content

Instantly share code, notes, and snippets.

View Acconut's full-sized avatar

Marius Acconut

View GitHub Profile
store := tusd.NewStore()
store.RegisterCore(&s3store)
store.RegisterTerminateExtension(&s3store)
store.RegisterConcatenationExtension(&s3store)
store.RegisterLocker(&consulLocker)
store.RegisterFinisher(&s3store)
[c] func printf(fmt: ^u8, ...) -> int;
func main() -> int {
list := default(LinkedList);
C::printf("list.first = %d\n", list.first);
C::printf("None = %d . Value = %d\n", Entry::None, Entry::Value);
return 0;
}

cedric(1) is a vendoring tools for Go built with simplicity in mind. Its only purpose and functionality is to read dependencies from a packages, download, and add then to the vendor/ directory. This allows authors to use Go's vendoring system for importing external packages.

cedric's functionality includes:

  • No additional configuration file for version locking or similar used
  • No requirement on the Go vendor experiment by itself
  • Scan packages and its subdirectories recursively
  • Automatically add Git repositories as submodules
@Acconut
Acconut / playground.rs
Created November 15, 2015 19:14 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::convert::From;
use std::str;
fn main() {
let packet = ServerInfoPacket{
version: 42,
description: "hello",
};
let mut bytes = encode_packet(packet);
@Acconut
Acconut / todo.md
Last active October 15, 2015 11:29
Operation SDKs
package language
import (
"fmt"
)
type Parser struct {
s *BufferedScanner
}
Database Strict schema Changefeed on client side Hook on server side Row level security Cascades ACID transactions
PostgreSQL x x x x x
RethinkDB
OrientDB x x x x

¹: Excluding JOINs or similar

²: Using conditional updates

Book-o-Mark is not your average bookmarking and sharing application. It allows you to add unlimited links stored in collections. While offering the default features it has extended support to increase your experience:

  • Thumbnail: Book-o-Mark automatically adds a thumbnail of the stored link to your collection allowing faster visual searches. You look faster than reading, get it? Nice!
  • Full text search: For each website stored in your collection not only the title but also the entire main content is automatically indexed for fast full text search.
  • Mobile-ready: Use Book-o-Mark while you're biking, rowing, kick-boxing or simply not at home. The mobile version features exactly all the function supported by the desktop version! No discrimination.
  • Collaboration: The missing authentication is no bug, it's a feature! All your friends, family members, neighbors, pets and enemies including yourself can add links. And if you really want to hide a collection from the scary interwebs just use yo

Checksums

Clients and servers MAY implement and use this extension to verify data integrity. In this case the server MUST add the checksum element to the TUS-Extension header.

A client MAY include the Content-MD5 header and its appropriate value in a PATCH request. Once all the data has been received by the server it MUST verify the uploaded chunk against the provided checksum. If the verification succeeds the server continues with processing the data. In the case of mismatching checksums the server MUST abort handling the request and MUST send the tus-specific 460 Checksum Mismatch status code. In addition the file and its offsets MUST not be updated.

If the hash cannot be calculated at the beginning of the upload it MAY be included as a trailer. If the server can handle trailers, this behavior MUST be promoted by adding the checksum-trailer element to the TUS-Extension header. Trailers, also known as trailing headers, are headers which are sent after the request's body has been transm

package main
import (
"database/sql"
)
type Post struct {
Id string `db:"post_id"`
Title string `db:"title"`
Author User `db:"author"`