Skip to content

Instantly share code, notes, and snippets.

View mezhgano's full-sized avatar

Dmitry Meshkoff mezhgano

View GitHub Profile
@julianandrews
julianandrews / send-gmail.sh
Created April 22, 2021 16:46
Simple shell script to send email using gmail
# Depends on: msmtp, libsecret-tools
#
# Set password:
# secret-tool store --label="msmtp password for jandrews271@gmail.com" service msmtp username jandrews271@gmail.com
#
# Send mail:
# echo "Message Body" | send-gmail myusername recipient@exmaple.com "My Subject"
send-gmail() {
local user="$1"
local to="$2"
@ChrisG661
ChrisG661 / cf-ddns.rsc
Last active May 8, 2024 05:58
Mikrotik RouterOS Cloudflare Dynamic DNS Script
# Cloudflare Dynamic DNS update script
# Required policy: read, write, test, policy
# Add this script to scheduler
# Install DigiCert root CA or disable check-certificate
# Configuration ---------------------------------------------------------------------
:local TOKEN "__APITOKEN__"
:local ZONEID "__ZONEIDENTIFIER__"
:local RECORDID "__RECORDIDENTIFIER__"
:local RECORDNAME "__DNSRECORD__"
@RomelSan
RomelSan / Set up Powerline in PowerShell.md
Last active March 17, 2024 10:38
Set up Powerline in PowerShell
@kabili207
kabili207 / Rclone systemd service.md
Last active May 6, 2024 03:20
Rclone systemd user service

rclone systemd service

Preparation

This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.

Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.

mkdir ~/mnt/dropbox
@lanfon72
lanfon72 / async_ydl.py
Created March 7, 2020 12:19
integrate youtube_dl with asyncio.
import asyncio
from datetime import datetime
from functools import partial
from concurrent.futures import ProcessPoolExecutor
from youtube_dl import YoutubeDL as YDL
PPE = ProcessPoolExecutor()
@furdarius
furdarius / rkn_unblock.md
Last active January 10, 2024 19:08
Настройка обхода РКН на роутере
@carcheky
carcheky / stopadobe.ps1
Created August 1, 2019 09:39
Stop all adobe shit process
# https://forums.adobe.com/thread/2621275
cd C:\Users\cmartinezv\Documents
# This will Stop the Services, and change the startup from Automatic to Manual - Opening Adobe Applications will start these services, without your interaction. If you have issues, you can manually start them by replacing Get-Service with Start-Service, or open the Services Panel with WindowsKey+R: "services.msc"
# Setting Startup to Manual only needs to be run once. Stopping the services needs to be done each time you exit application, if you don't want background services running. Such as Sync.
Get-Service -DisplayName Adobe* | Stop-Service
Get-Service -DisplayName Adobe* | Set-Service -StartupType Manual
@asuna
asuna / cloudflare_update.script
Last active May 5, 2024 14:33 — forked from viritt/cloudflare_update.script
Automatic script for Mikrotik RouterOS updating record on CloudFlare.
#########################################################################
# ================================================== #
# $ Mikrotik RouterOS update script for CloudFlare $ #
# ================================================== #
# #
# - You need a CloudFlare account & api key (look under settings), #
# a zone and A record in it #
# - All variables in first section are obvious, except CFid, #
# To obtain CFzoneid use following command in any unix shell: #
# curl -X GET "https://api.cloudflare.com/client/v4/zones" -H "X-Auth-Email: YOUR_EMAIL" -H "X-Auth-Key: YOUR_API_KEY" -H "Content-Type: application/json" | python -mjson.tool
@gmag11
gmag11 / rclone-mount@.service
Last active March 27, 2024 04:01
Mount multiple RClone remotes on boot with a single SystemD forking service definition
# Rclone mount on boot
# Copy file to: /etc/systemd/system
# You need to create a remote on RClone and a folder on your disk, both with same name <rclone-remote>
# This example uses /cloud/ folder as origin to mount all remotes, change it to your needs
# This example use a linux user named rclone. Create it or adapt it to your needs. Rclone will get config from that user's home folder
# Register new service by typing:
# sudo systemctl daemon-reload
# Do the next one for every remote you want to load on boot
# sudo systemctl enable rclone-mount@<rclone-remote>.service
# systemctl start rclone-mount@<rclone-remote>.service
@Quick104
Quick104 / readme.md
Last active May 9, 2024 15:07
Expose a server behind CG:NAT via Wireguard