Skip to content

Instantly share code, notes, and snippets.

Ruslan Zaporojets Ruzzz

Block or report user

Report or block Ruzzz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View openvpn_tips.sh
sudo apt install openvpn
# Download and apply configuration file
sudo cp ~/Download/NNN.ovpn /etc/openvpn/work.conf
rm ~/Download/NNN.ovpn
# Optional
sudo nano /etc/openvpn/work.pass
# Add password of private certificate
sudo chmod 600 /etc/openvpn/work.pass
@Ruzzz
Ruzzz / python_build.sh
Last active Aug 1, 2018
Build Python on Ubuntu
View python_build.sh
sudo apt update
sudo apt upgrade
sudo apt install -y build-essential libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev libffi-dev tcl-dev tk-dev tk openssl
# TODO: The necessary bits to build these optional modules were not found: _uuid
wget https://github.com/python/cpython/archive/v3.7.0.zip
unzip v3.7.0.zip
cd cpython-3.7.0
mkdir build1
cd build1
@Ruzzz
Ruzzz / wsl_ssh.sh
Created Jul 16, 2018
Enable SSH on Windows Subsystem for Linux (WSL)
View wsl_ssh.sh
sudo apt-get update
sudo apt-get upgrade
sudo nano /etc/ssh/sshd_config
# PasswordAuthentication yes
# UsePrivilegeSeparation no
sudo service ssh start
View python_virtualenv.cmd
pip3 install virtualenv
# mkdir project & cd project
virtualenv venv
virtualenv venv -p python3
source venv/bin/activate # linux
venv\Scripts\activate # windows
pip install Flask
pip install Flask==0.9
pip install --upgrade Flask
pip freeze > requirements.txt
View backup_mysql_to_dropbox.sh
# DEPS:
# https://github.com/dropbox/dbxcli
# sudo apt-get install p7zip-full
DB_USER=
DB_PASS=
DB_NAME=
DB_TABLES=
ARC_PASS=
View cmake_gen.cmd
:: Author: Ruslan Zaporojets
:: Email: ruzzzua[]gmail.com
:: Date: 2017-10-12
:: Usage: this.cmd DIR GENERATOR [TOOLSET]
:: Example: this.cmd VS2017x64XP "Visual Studio 15 Win64" v141_xp
if "%1"=="" goto :MY
cd /d "%~dp0"
set BUILD_DIR=build
if not "%3"=="" ( set TOOLSET=-T %3 ) else ( set TOOLSET= )
@Ruzzz
Ruzzz / ffmpeg_video_encode_draft.md
Last active Nov 24, 2017
ffmpeg video encode draft
View ffmpeg_video_encode_draft.md

Initialize

  1. AVCodec* avcodec_find_encoder(AVCodecID)
  2. AVCodecContext* avcodec_alloc_context3(AVCodec*)
    1. av_opt_set(...)
    2. avcodec_open2(AVCodecContext*, AVCodecID)

Initialize additional

  • AVPacket* av_packet_alloc()
View scoop_example.cmd
scoop bucket add extras
:: As Admin
scoop install git -g
:: Restart cmd
scoop bucket add extras
scoop install 7zip vcredist clink processhacker RapidEE SumatraPDF notepadplusplus ccleaner everything sysinternals keepass vscode python nodejs yarn nasm perl cmake ffmpeg sqlite upx wget youtube-dl oraclejdk android-studio foobar2000 kitty pandoc resource-hacker -g
clink autorun -a install
@Ruzzz
Ruzzz / vc++_from_cmd.cmd
Last active Jun 19, 2017
Using different versions of VC++ from the command line
View vc++_from_cmd.cmd
:: Для использования XP TOOLCHAIN с нужным компилятором
:: нужно установить переменные до инициализации компилятора
:: INIT XP x32 TOOLCHAIN
set SDK71PATH=%ProgramFiles%\Microsoft SDKs\Windows\7.1A
path %SDK71PATH%\Bin;%PATH%
set INCLUDE=%SDK71PATH%\Include;%INCLUDE%
set LIB=%SDK71PATH%\Lib;%LIB%
View make_openssl_110f_vs2015_64_xp.cmd
:: Note: rename openssl.exe -> openssl64.exe
:: Edit: \Configurations\10-main.conf
:: Replace: /subsystem:console -> /subsystem:console,5.02
::
:: INIT XP x64 TOOLCHAIN
::
set SDK71PATH=%ProgramFiles%\Microsoft SDKs\Windows\7.1A
path %SDK71PATH%\Bin\x64;%PATH%
set INCLUDE=%SDK71PATH%\Include;%INCLUDE%
You can’t perform that action at this time.