Skip to content

Instantly share code, notes, and snippets.

View deemru's full-sized avatar
⚙️
Settings

Dmitrii Pichulin deemru

⚙️
Settings
View GitHub Profile
@deemru
deemru / w8io.md
Last active November 1, 2024 15:08
Setup w8io Web Server

Setup w8io Web Server

Never copy and paste commands that you do not understand or that were given to you by unknown people. This can be dangerous for your system, your security and your privacy. You can accidentally delete important files, get infected by a virus, give access to your data or do other unwanted actions. Always check and learn the commands before running them and use reliable sources of information.

Prerequisites

  • Debian (or similar OS)
  • Login as root

Install Software

@deemru
deemru / ED25519_NOSHA512SK.md
Last active November 14, 2023 10:58
libsodium with ED25519_NOSHA512SK
apt update && apt install -y autoconf libtool build-essential
git clone https://github.com/deemru/libsodium
cd libsodium
autoreconf -fvi
CFLAGS="-DED25519_NOSHA512SK" ./configure
make
@deemru
deemru / ton-build-windows-64.bat
Last active March 12, 2023 11:15
ton-build-windows-64
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
set WORKDIR=%~dp0
set WORKDIR=%WORKDIR%ton-support\
if not exist "%WORKDIR%" mkdir %WORKDIR%
set ZLIBPATH=%WORKDIR%zlib-1.2.11
set ZLIBLIBPATH=%ZLIBPATH%\Release\zlibstatic.lib
set ZLIBSOURCE=https://zlib.net/zlib1211.zip
if not exist "%ZLIBLIBPATH%" (
@deemru
deemru / shot.js
Created November 12, 2018 20:43
Waves Platform Mainnet (1 .. 1257702)
// https://github.com/deemru/w8io/tree/15842edd4235bd3eabc127deac61195257e351ba
// https://github.com/GoogleChrome/puppeteer
// ffmpeg -framerate 30 -i "w8io_(%%d).png" -c:v libx264 -preset slow -crf 16 -vf fps=30 _w8io.mp4
// https://www.youtube.com/watch?v=n7A-KQ15ynY
var promises = [];
var maxBrowsers = 8;
var maxPromises = maxBrowsers;
showtime();
@deemru
deemru / gist:a8b54aecd84c73cbe06359dcbca0f054
Created July 13, 2018 08:39
MikroTik script to monitor one interface and turn off another
:local EthMonitor "ether3"
:local EthTurnOff "ether1"
:local EthTurnOffStatus [:interface ethernet get $EthTurnOff disabled]
/interface ethernet monitor $EthMonitor once do={
:if ($status = "link-ok" && $EthTurnOffStatus ) do={ /interface ethernet set $EthTurnOff disabled=yes }
:if ($status != "link-ok" && !$EthTurnOffStatus ) do={ /interface ethernet set $EthTurnOff disabled=no }
}
@deemru
deemru / icmp.c
Created February 27, 2018 07:48
minimal icmp for ios
#include <arpa/inet.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#define PACKETSIZE 64
struct icmp_echo {
u_char icmp_type;
u_char icmp_code;
u_short icmp_cksum;
@deemru
deemru / chr-install.md
Last active March 1, 2024 22:03
Cloud Hosted Router god mode installation

Внимание: опасный скрипт! (warning: dangerous script!)

CHR_VERSION=7.13.5
INSTALLPATH=/dev/vda

apt-get update &&
apt-get install -y unzip wget pv &&
wget https://download.mikrotik.com/routeros/${CHR_VERSION}/chr-${CHR_VERSION}.img.zip &&
unzip chr-${CHR_VERSION}.img.zip &&
echo 1 &gt; /proc/sys/kernel/sysrq &amp;&amp;
@deemru
deemru / cmd_proxy.c
Created May 20, 2016 21:32
I use it to start UniFi Video with mongod without journaling
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#include <string.h>
#define POSTCUT ".exe"
#define POSTFIX ".original.exe"
HANDLE hProcess = INVALID_HANDLE_VALUE;
BOOL WINAPI HandlerRoutine( DWORD dwCtrlType )