Skip to content

Instantly share code, notes, and snippets.

@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 / 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-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 / 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 / .x11vncrc
Last active January 10, 2018 12:49
x11vnc for debian
#~/.x11vncrc
dontdisconnect
notruecolor
noxfixes
shared
forever
bg
ncache 10
no6
noipv6
@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 / 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 / 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 / PortableApps.bat
Last active July 20, 2024 02:57
.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 / 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
(