Skip to content

Instantly share code, notes, and snippets.

View vinz243's full-sized avatar

vinz243 vinz243

  • France
View GitHub Profile
@vinz243
vinz243 / Specs.md
Last active August 18, 2018 19:33
Fjord Protocol Specifications 1.0

Overview

Fjord Protocol is a TCP based protocol that allows a more flexible and adaptable sharing of pieces between a server that acts as a buffer and a client which will receive all informations about the server state as well as the downloaded pieces as soon as they are available.

Protocol version: 1.0.0

note: big-endian is the norm here

1. Server implementation

15:35 Emulator: coreaudio: Could not initialize record
15:35 Emulator: coreaudio: Could not set samplerate 44100
15:35 Emulator: coreaudio: Reason: kAudioDeviceUnsupportedFormatError
15:35 Emulator: coreaudio: Could not initialize record
15:35 Emulator: coreaudio: Could not set samplerate 44100
@vinz243
vinz243 / lsof
Last active November 27, 2017 15:37
D/CompactdSync: sync: db_9e7c2_tracks
E/UCI4C: u_getDataDirectory()=/data/user/0/io.compactd.player/files/icu
D/CompactdSync: sync: com.couchbase.lite.Database@c2e73e4[/data/user/0/io.compactd.player/files/db_9e7c2_tracks.cblite2]
D/CompactdSync: PULL replication event. Source: Replication{https://myserver/database/tracks, pull} Transition: INITIAL -> RUNNING Total changes: 0 Completed changes: 0
D/CompactdSync: PULL replication event. Source: Replication{https://myserver/database/tracks, pull} Total changes: 1 Completed changes: 0
D/CompactdSync: PULL replication event. Source: Replication{https://myserver/database/tracks, pull} Total changes: 517 Completed changes: 317
D/CompactdSync: PULL replication event. Source: Replication{https://myserver/database/tracks, pull} Total changes: 518 Completed changes: 317
I/zygote: Do full code cache collection, code=491KB, data=341KB
@vinz243
vinz243 / Middleware.js
Created December 24, 2016 17:23 — forked from darrenscerri/Middleware.js
A very minimal Javascript (ES5 & ES6) Middleware Pattern Implementation
var Middleware = function() {};
Middleware.prototype.use = function(fn) {
var self = this;
this.go = (function(stack) {
return function(next) {
stack.call(self, function() {
fn.call(self, next.bind(self));
});
@vinz243
vinz243 / rmap.py
Created December 7, 2016 00:50
rTorrent map from file size and names
#! /usr/bin/env python-pyrocore
from pyrocore import connect
import os
files = {}
verbose = False
test = False
/*
Apicem CSS Theme
By /u/Cereal_Addict
Stock photos via unsplash.com
Icons via icons8.com
==============================================================================*/
:root {
--overlay: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAgMAAADQNkYNAAAADFBMVEWfu8x9lq5idJBIUWs5ew2TAAAABHRSTlMVFRUVlNGiUwAAC4RJREFUaN7t2WmMc1MYB/D/WdqeztzOnM7UXtx2imJwZ6YYDE6nRfGK2hJrUktCrLUvsZxZUBS1REgsfb2IxDbWkBCn06IY1BJLELVEfEDGEsQWtb+cji++zrfJ/NLb25zzPOd5zgPJ5W67E0S/zq04r3nRjzjDIY1DB9h81jsnkFVu1XZMTtUi4x/AqBdbXPO+Pkhj/OW4uw41qjBIn7UdKvGOUHB/0DwYgFMn9Ww03Mejg2uWL0hOS0JsR/SkNN1jam/v5HHn+L00MHDkipBclDuNDjEOKZTtIPPkmFA/9b6qNghodLNh/lASDygJeGtfO0k926FWGhYC0VHyXoIyEln5ItXXqj6AZTDlR9F2cOlBBXYcGNzwlNiTWH8GJ6/F9eJVzgZTL0uR5MR2CDewC198ugEEPO2SzSLewIwCKpikQGHLedtR3ouxck15BTWMxcOpC4p0bU1AegtihWdyXfyZL0vbe7SBEW8WtP9RqEoRC140la7Jdro2coztqHp9ZMc1EHo8T310bkV0QtaJOk7Xw8xQBs+xHc6lHi727Trry5mh9oVZti9IYFoL+K6e4i4XQduBfDgpjmcyd/F+VxrW/JBqrmgFuPxwLI7DSNuxbki1Dwz1GSXMMAGgRaH30nm99QZ8sBnYk3u2gyotgMouD2BibQDOdA4lHlDiIhFfRRSyX
#!/bin/bash
COMMAND='puppet parser validate'
TEMPDIR=`mktemp -d`
echo "### Attempting to validate puppet files... ####"
# See https://www.kernel.org/pub/software/scm/git/docs/githooks.html#pre-receive
oldrev=$1
newrev=$2
@vinz243
vinz243 / README.md
Last active August 29, 2015 14:15 — forked from JoelBesada/README.md

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@vinz243
vinz243 / hiphop.js
Last active August 29, 2015 14:02
Download any track on youtube from cmd
var request = require('request');
var prompt = require('prompt');
var fs = require('fs');
var ytdl = require('ytdl');
var flv = require('flv');
require('colors');
var shortId = require('shortid');
var request = require('request');
var progress = require('request-progress');
var ProgressBar = require('progress');