Skip to content

Instantly share code, notes, and snippets.

@abakum
abakum / [email protected]
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">
@abakum
abakum / .x11vncrc
Last active January 10, 2018 12:49
x11vnc for debian
#~/.x11vncrc
dontdisconnect
notruecolor
noxfixes
shared
forever
bg
ncache 10
no6
noipv6
@abakum
abakum / PlayMedia-kodi.sh
Last active December 21, 2017 06:43
Use xbmc-send for kodi@OSMC on raspberry Pi
#!/bin/bash
read -e -p "Enter Media>" media
[ -n "$media" ] && xbmc-send --action="PlayMedia(${media// /%20})"
@abakum
abakum / msys2-proftpd.sh
Created December 16, 2017 22:51
Build from git proftpd on MSYS2 and run it as a Windows service
#!/usr/bin/bash
flog=/var/log/ftpd.log
FTPD=proftpd
FTPDa="-n -q"
kill -sigterm `cat /var/run/${FTPD}.pid`
pacman -Sy
cd ~
if [ "$MSYSTEM" == "MSYS" ] ; then
pacman -S cygrunsrv --needed
@abakum
abakum / msys2-pureftpd.sh
Last active December 16, 2017 22:55
Build from git pure-ftpd on MSYS2 and run it as a Windows service
#!/usr/bin/bash
flog=/var/log/ftpd.log
FTPD=pure-ftpd
ip=192.168.0.1,21
[ ! -z ${ip} ] && ip=-S${ip}
FTPDa="-4 -A -c8 -D -fnone -g/var/run/${FTPD}.pid -H -lpuredb:/etc/pureftpd.pdb -u1 ${ip}"
kill -sigterm `cat /var/run/${FTPD}.pid`
pacman -Sy
cd ~
@abakum
abakum / msys2-sshd-setup.sh
Last active December 7, 2017 11:43 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <[email protected]>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@abakum
abakum / sshd_config
Last active December 3, 2017 14:07
openSSH on Win with RSA authorization for sftp
Protocol 2
StrictModes no
PubkeyAuthentication yes
AuthorizedKeysFile c:\PortableApps\OpenSSH\authorized_keys
PasswordAuthentication no
PermitEmptyPasswords no
UsePAM yes
PidFile sshd.pid
Subsystem sftp sftp-server.exe
@abakum
abakum / Cyrillic.py
Created August 24, 2016 12:08
Bootstrap for ANSI python script
#!/usr/bin/python -i
# coding=cp1251
#
from __future__ import unicode_literals
from __future__ import print_function
import os
import codecs
import sys
reload(sys)
print("if sys.stdout.isatty():")
@abakum
abakum / mingw.py.bat
Last active August 26, 2016 06:52
Helpers for start python
@echo off
set args=
:loop
if "%~1"=="" goto run
call :repl %1
set args=%args% "%s%"
shift
goto loop
:run
@abakum
abakum / st.bat
Last active August 22, 2016 18:45
bat wrapper around st
:dad's style :)
@echo off
set args=
:loop
set s=%~1
set s=%s:\=/%
if not "%s:~1,1%"==":" goto noDrv
set d=%s:~0,1%
set d=%d:A=a%
set d=%d:B=b%