Skip to content

Instantly share code, notes, and snippets.

View vovcacik's full-sized avatar

Vlastimil Ovčáčík vovcacik

View GitHub Profile
@vovcacik
vovcacik / README.md
Last active December 27, 2017 13:06
off2polyhedron.sh

This script automates the most laborious part of [STL][] to [OpenSCAD][] script conversion.

Details

[OpenSCAD][] is able to [import][cheatsheet] object from [STL][] files, however this capability [is not preserved][limitations] in [thingiverse.com][] [Customizer][]. As a result of this many [OpenSCAD][] scripts can't be used directly from [thingiverse.com][]. However you are allowed to [inline][limitations] [STL][] model, include it in your [OpenSCAD][] script and then upload it to [thingiverse.com][].

The steps:

  • get your STL file and open it in OpenSCAD
  • select File > Export > Export to OFF...
@vovcacik
vovcacik / LAVSplitter-hack.md
Last active February 18, 2024 14:36
Hacking LAV Splitter to use plain old buffering

Hacking LAV Splitter to use plain old buffering

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

  1. Open the mpc-hc/LAVFilters/LAVSplitter.ax file in [HEX editor][hxd] of your choice.
@vovcacik
vovcacik / idling.bat
Last active January 3, 2016 18:59
Runs a command when a specified process is idle.
@echo off
setlocal enabledelayedexpansion
if "%~1" == "" goto help
if "%~2" == "" goto help
set idle=0
set process=%~1
set command=%*
set command=!command:*%1 =!
@vovcacik
vovcacik / SIMPROCESS.bat
Last active December 14, 2015 22:48
A batch file that makes installing SIMPROCESS a lot easier on Windows 8 and a few more goodies.
@echo off
setlocal
rem Simplifies SIMPROCESS installation, renews trial license and fixes Win8 installation bug.
rem Requires curl executable on PATH. See https://github.com/bmatzelle/gow
rem Variables
for /F "usebackq tokens=2* delims= " %%o in (`reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\SIMPROCESS /v InstallLocation /reg:32 ^| findstr InstallLocation`) do set "SIMPROCESS_HOME=%%p"
rem Main
if exist "%SIMPROCESS_HOME%" (
@vovcacik
vovcacik / mtu.bat
Created March 4, 2013 21:45
A batch file that finds out the maximum MTU between local and specified remote host using plain ping command.
@echo off
rem This batch will find out maximum MTU between local and remote host.
SetLocal EnableDelayedExpansion
set MTU=1473
set LASTGOOD=0
set LASTBAD=65536
set PACKETSIZE=28
set SERVER=
@vovcacik
vovcacik / RDP7.md
Created March 4, 2013 15:32
Portable Microsoft RDP 7 Client.

Portable Microsoft RDP 7 Client

  • Get the RDP 7 update for Windows XP from KB969084 (SHA-1 153587172bf060ddc9d2c966f1eaaf4f47926f28).
  • Rename the .\WindowsXP-KB969084-x86-enu.exe to zip.
  • Extract the .\WindowsXP-KB969084-x86-enu.zip\sp3gdr\ directory.

The unpacked RDP 7 client is sort of portable (the binaries are, settings are not) and will run on Windows XP and latter.

@vovcacik
vovcacik / RDP8.bat
Created March 4, 2013 14:53
Portable Microsoft RDP 8 Client.
@echo off
rem This batch file unpacks the RDP 8 update for Windows 7. The unpacked RDP 8
rem client is sort of portable (the binaries are, settings are not) and will run
rem on Windows 7 and latter.
rem The update file is not part of this Gist and you will be prompted to get it
rem from official sources. English version of the client will be bundled.
rem
rem Windows6.1-KB2592687-x86.msu (SHA-1 4c11d26c8e1824643ce1caf60c30693d6536d0a2)
rem Prerequisites.