Skip to content

Instantly share code, notes, and snippets.

View KZhidovinov's full-sized avatar

Konstantin Zhidovinov KZhidovinov

View GitHub Profile
@KZhidovinov
KZhidovinov / win_10_dark_light_switch
Created January 18, 2021 10:27
Windows 10 dark/light switch
# Windows 10 dark/light switch:
## Dark
```powershell
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize /v AppsUseLightTheme /t REG_DWORD /d 0 /f
```
## Light
```powershell
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize /v AppsUseLightTheme /t REG_DWORD /d 1 /f
@KZhidovinov
KZhidovinov / docker-compose.mongo.yml
Created January 16, 2021 07:11
Local MongoDB environment
version: "3.1"
volumes:
mongo_data:
services:
mongo:
image: mongo:latest
restart: always
ports:
@KZhidovinov
KZhidovinov / docker-api-port.md
Created December 30, 2020 06:10 — forked from styblope/docker-api-port.md
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@KZhidovinov
KZhidovinov / bt_car.ino
Created November 9, 2017 19:14
Bluetooth Car
#include <AFMotor.h>
#include <SoftwareSerial.h>
SoftwareSerial btSerial(A5, A4); // RX, TX
AF_DCMotor motor1(3);
AF_DCMotor motor2(4);
void setup() {
// Set max speed
#/system/bin/sh
# Required to install imagemagick and dcraw via Termux.
export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib:$LD_LIBRARY_PATH
export LANG=en_US.UTF-8
export PREFIX=/data/data/com.termux/files/usr
export PATH=/data/data/com.termux/files/usr/bin:$PATH
if [ -z "$1" ]; then exit 0; fi;
#/system/bin/sh
# Required to install imagemagick and dcraw via Termux
export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib:$LD_LIBRARY_PATH
export LANG=en_US.UTF-8
export PREFIX=/data/data/com.termux/files/usr
export PATH=/data/data/com.termux/files/usr/bin:$PATH
if [ -z "$1" ]; then exit 0; fi;
@KZhidovinov
KZhidovinov / pdf_convert_for_e_books.rb
Last active January 18, 2017 08:49
Script for converting PDF books to readable format on small screens.
# Testes on ruby-2.4.0
# With rmagick 2.16.0
# And ImageMagick 6.9.7-4
require 'rmagick'
require 'fileutils'
INPUT_FILE='/Users/kzhidovinov/Downloads/code_complete.pdf'
OUTPUT_FILE = '/Users/kzhidovinov/Downloads/code_complete_1.pdf'
TMP_DIR = File.join(File.dirname(__FILE__), 'temp')