by xero updated 10.29.24
| local function getOS() | |
| local raw_os_name, raw_arch_name = '', '' | |
| -- LuaJIT shortcut | |
| if jit and jit.os and jit.arch then | |
| raw_os_name = jit.os | |
| raw_arch_name = jit.arch | |
| else | |
| -- is popen supported? | |
| local popen_status, popen_result = pcall(io.popen, "") |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| def hash_djb2(s): | |
| hash = 5381 | |
| for x in s: | |
| hash = (( hash << 5) + hash) + ord(x) | |
| return hash & 0xFFFFFFFF | |
| #!/bin/sh | |
| #/ Usage: btsync-secret [option]... | |
| #/ A Bittorrent Sync Secret Generator | |
| set -e | |
| h_flag=false | |
| v_flag=false | |
| e_flag=false | |
| n_flag=false | |
| c_flag=false |
LAV Splitter is used to fetch network data in some media players (e.g. MPC-HC). The LAV buffer (aka packets queue) is not measured in data volume, but rather in packets (or frames, not sure here). Anyway, since the network throughput is limited by data volume, the number of packets in queue is multiplied by factor variable, which is bigger the higher quality video you are playing. This provides variable length buffer, however you can't really control the size and if you got slow WiFi you might have experienced choppy playback.
The following guide changes the way LAV buffer works by eliminating packet limits and putting the infamous "Maximum Queue Memory" settings in charge (you might have tried to increase this settings from default 256 MB to no avail as many have before you).
###32-bit instructions
- Open the
mpc-hc/LAVFilters/LAVSplitter.axfile in [HEX editor][hxd] of your choice.
| --[[ json.lua | |
| A compact pure-Lua JSON library. | |
| The main functions are: json.stringify, json.parse. | |
| ## json.stringify: | |
| This expects the following to be true of any tables being encoded: | |
| * They only have string or number keys. Number keys must be represented as | |
| strings in json; this is part of the json spec. |
| # useful for running ssl server on localhost | |
| # which in turn is useful for working with WebSocket Secure (wss) | |
| # copied from http://www.piware.de/2011/01/creating-an-https-server-in-python/ |
| // Adapted from: http://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect/1968345#1968345 | |
| function line_intersects(p0_x, p0_y, p1_x, p1_y, p2_x, p2_y, p3_x, p3_y) { | |
| var s1_x, s1_y, s2_x, s2_y; | |
| s1_x = p1_x - p0_x; | |
| s1_y = p1_y - p0_y; | |
| s2_x = p3_x - p2_x; | |
| s2_y = p3_y - p2_y; | |
| var s, t; |
Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.
- Create user
gituservia Diskstation interface (with File Station and WebDAV privilages) - Add new shared folder called
git(located at/volume1/git) with read/write access forgituserandadmin. This folder will hold all the repos. - Install Git Server package via Diskstation