Skip to content

Instantly share code, notes, and snippets.

@abakum
abakum / MPO2VR.bat
Last active April 27, 2021 11:15
Convert 3D photos from MPO files to VR.JPG files for cardboard and photos.google.com
SetLocal EnableExtensions EnableDelayedExpansion
:forfiles
if "%~1"=="nul" (
call :doit "%~2"
goto :EOF
)
:main
if "%~1"=="" (
if not exist "%UserProfile%\SendTo\%~n0.lnk" (
@abakum
abakum / CHANNEL UPLOADER.bat
Created June 4, 2019 08:53
Download microfilm from youtube
cd /d c:\msys64\mingw64\bin\
call :youtube %~n0
pause
goto :EOF
:youtube
youtube-dl -o "%~dp0\%%(playlist_title)s\%%(title)s.%%(ext)s" --ignore-config -f worstvideo[ext=mp4]+bestaudio[ext=m4a] https://www.youtube.com/channel/%1 --download-archive "%~dp0\%~n0.txt"
@abakum
abakum / UP GATE NS NS2.bat
Last active April 11, 2019 12:15
Via netsh set GATE and list of NS for uplink interface UP
@echo off
echo This script via netsh set GATE and list of NS for uplink interface UP
echo Rename or mklink this script with real value where:
echo UP is name of uplink interface
echo If GATE omitted then IP, GATE and NS will be received from DHCP
echo If NS omitted then GATE is NS
echo After NS2 there may be NS3 and so on
echo This script via setx set global environment values: uplink as UP and gate as GATE
cd /d %~dp0
call :ip %~n0
@abakum
abakum / libmagic.bat
Created March 4, 2019 12:53
Fix error "raise ImportError('failed to find libmagic. Check your installation')" after "pip install python-magic" then "import magic" in python of MINGW
mklink "C:\msys64\usr\bin\magic1.dll" "C:\msys64\usr\bin\msys-magic-1.dll"
@abakum
abakum / mklink.cmd
Last active February 26, 2019 05:49
mklink helper for totalCMD
@abakum
abakum / ctPhoto.sh
Last active March 20, 2018 05:16
curl+telegram
#!/bin/sh
# your data here
chatID=-123456789
botToken=987654321:AABBCCDDEEFFGGHH
# post photo
photo="$1"
shift
(
@abakum
abakum / PortableApps.bat
Last active February 28, 2018 06:09
.lnk for PortableApps
echo set variable %~n0 of global environment as path to this script without slash on the end
cd /d %~dp0
setx %~n0 %cd%
@abakum
abakum / cron.py
Last active February 20, 2018 07:56
syncloud+omv3+fix of letsencrypt
#!/opt/app/platform/python/bin/python
from syncloud_platform.injector import get_injector
injector = get_injector()
injector.device.sync_all()
user_platform_config = injector.user_platform_config
if 0 and user_platform_config.is_https() and user_platform_config.get_external_access():
injector.tls.generate_real_certificate()
@abakum
abakum / resetpassword
Last active January 17, 2018 05:48
reset password of installer after install app nextcloud in syncloud
DATA_DIR=/opt/data/nextcloud /opt/app/nextcloud/bin/occ-runner user:list
DATA_DIR=/opt/data/nextcloud /opt/app/nextcloud/bin/occ-runner user:resetpassword installer
DATA_DIR=/opt/data/nextcloud /opt/app/nextcloud/bin/occ-runner user:info installer
@abakum
abakum / TP@36.xspf
Created January 15, 2018 21:59
dvblast+vlc
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/">
<title>36.0E</title>
<creator>Константин Абакумов</creator>
<annotation>1 0 1 10750</annotation>
<trackList>
<track>
<trackNum>001001</trackNum><title>Pershiy Avtomobilniy</title><album>ЗНАНИЯ</album>
<location>rtp://@224.36.1.1:1234</location>
<annotation>11727 L 27500 Q 3</annotation><extension application="http://www.videolan.org/vlc/playlist/0">