Skip to content

Instantly share code, notes, and snippets.

View korzhyk's full-sized avatar
🇺🇦
Making code

Andrii Korzh korzhyk

🇺🇦
Making code
View GitHub Profile
@korzhyk
korzhyk / crop.js
Created February 1, 2014 19:48 — forked from arian/crop.js
var spawn = require('child_process').spawn;
var Stream = require('stream');
/**
* crops and resizes images to our desired size
* @param {Stream} streamIn in stream containing the raw image
* @return {Stream}
*/
exports.cropImage = function(streamIn){
@korzhyk
korzhyk / Google Drive Spreadsheet UAH rates PrivatBank
Created February 23, 2014 19:37
Get fresh currency rates from PrivatBank
=VALUE(SUBSTITUTE(IMPORTXML("https://api.privatbank.ua/p24api/pubinfo?exchange&coursid=5"; "//exchangerate[@ccy='USD']/@sale"); "."; ","))
@korzhyk
korzhyk / tl-wr1043nd.md
Last active June 20, 2018 20:56
Unbrick TL-WR1043ND

###1. Connect RS232 serial (USB)

###2. Install OSX drivers NoZAP Drivers

###3. Configure tftp server Ubuntu:

# apt-get install dnsmasq
# /etc/init.d/dnsmasq stop          # Debian automatically starts it as a daemon, so I stop it
@korzhyk
korzhyk / Online Torrent.bat
Created February 9, 2017 16:48
Simple batch file for peerflix
@ECHO off
SET link=%1
if '%link%'=='' (
ECHO Please enter magnet or torrent file link:
set /p link=
)
START /B peerflix %link% -r -f Z:\TEMP --mpchc
@korzhyk
korzhyk / nginx.conf
Last active March 9, 2017 19:18
nginx rtmp config for streamers
user www-data;
group www-data;
worker_processes 1;
events {
worker_connections 512;
}
http {
@korzhyk
korzhyk / bash.sh
Created March 8, 2018 14:04
Allow cap traffic without root previleges
sudo setcap cap_net_raw,cap_net_admin=eip /path/to/execute/binary
@korzhyk
korzhyk / 30-netassist
Last active April 8, 2023 09:28
NetAssist :: IPv6 Tunnel Broker auto update client IPv4 on OpenWRT
#!/bin/sh
update_tunnel_broker() {
local wan_ip
local username
local password
local proto
local tunnelid
config_get proto $1 proto
config_get tunnelid $1 tunnelid
@korzhyk
korzhyk / 50-tun-routes
Last active November 3, 2022 17:21
OpenWRT using WireGuard VPN tunnel for banned networks.
#!/bin/sh
REPO_URL=https://zaborona.help/ips.txt
log() {
logger -t ipset "$1"
}
apply_table() {
local ipset
local target
@korzhyk
korzhyk / README.md
Created August 27, 2018 15:26
Raspberry Pi3 Shutdown button with LED indicator

Installation

  1. Put shutdown_button.py to /usr/local/bin/
  2. Put shutdown_button.service to /etc/systemd/system/
  3. Enable service systemctl enable shutdown_button.service
  4. Start service systemctl start shutdown_button.service
  5. Enjoy!

Misc

@korzhyk
korzhyk / DontShowUI.reg
Last active January 11, 2021 20:33
DayZ Standalone server startup script
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting]
"DontShowUI"=dword:00000001