Skip to content

Instantly share code, notes, and snippets.

View olegslavkin's full-sized avatar

Slavkin Oleg olegslavkin

  • Russia, Moscow
View GitHub Profile
@PhilipSchmid
PhilipSchmid / minio-upload.sh
Created November 19, 2020 13:38
Upload data to Minio using CURL
#!/bin/bash
# Usage: ./minio-upload my-bucket my-file.zip
bucket=$1
file=$2
host=minio.example.com
s3_key=svc_example_user
s3_secret=svc_example_user_password
@sorenvonsarvort
sorenvonsarvort / a-infinality-w10-config.sh
Last active June 2, 2023 22:41
windows-10-like-font-rendering-config-for-linux
# make sure You have installed the infinality patches
export INFINALITY_FT_FILTER_PARAMS="8 17 50 17 8"
export INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH="0"
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="55"
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH="0"
export INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH="0"
export INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="20"
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="0"
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0"
@adulau
adulau / ghidra-community.md
Last active November 11, 2023 13:16
Ghidra community - collection
@mpusz
mpusz / alternatives.sh
Last active March 21, 2024 08:34
Ubuntu scripts
#/bin/bash
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo update-alternatives --remove-all clang
sudo update-alternatives --remove-all clang++
sudo update-alternatives --remove-all cc
sudo update-alternatives --remove-all c++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7

Install a 3-Node Kubernetes Cluster on Centos 7

This setup uses 3 machines:

  1. Centos7
  2. 100GB HDD
  3. 32 GB RAM
  4. 8 CPU

All Machines

@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active April 21, 2024 12:50
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@mcastelino
mcastelino / qemu-tracing.md
Last active September 27, 2023 14:47
Tracing QEMU-KVM Interactions

Tracing QEMU-KVM Interactions

But default in linux you can figure out how many times and for what reasons there is a VM Exit from a VM into the kvm kernel module. However given the ubiquity of vhost and the ability of kvm to emulate most device models directly in the kernel, most of those VM exits do not result in a transition from host kernel into the QEMU. The transitions from VM -> kvm -> QEMU are typically the most expensive.

Here we try to figure out how many of the VM Exits result in the invocation of QEMU.

Tracking VM-KVM Interactions

This can be done very simply with perf

@kukrimate
kukrimate / bootstrap.sh
Last active September 13, 2023 21:13
Create a cross gcc toolchain for any target! And it only builds everything once!
#!/bin/bash
# This script builds a (hopefully) working gcc based cross compiler
# Update to latest stable release
BINUTILS_VERSION=2.27
GMP_VERSION=6.1.2
MPFR_VERSION=3.1.5
MPC_VERSION=1.0.3
ISL_VERSION=0.16.1
GCC_VERSION=6.3.0
@hngouveia01
hngouveia01 / debugging_kernel.txt
Last active March 5, 2024 10:40
Debugging kernel code line by line with Qemu and GDB
We are going to use buildroot to download, configure and compile the kernel.
First, download and uncompress buildroot: https://buildroot.org/download.html
Go to the directory and:
make qemu_x86_defconfig
make menuconfig
@RobinCPC
RobinCPC / gdb_in_vim.md
Last active December 12, 2023 20:08
How to use GDB in Vim

How to use ConqueGDB in Vim

Install ConqueGDB in Vim

Debug C/C++: