Skip to content

Instantly share code, notes, and snippets.

View XVilka's full-sized avatar
💭
Rusting

Anton Kochkov XVilka

💭
Rusting
View GitHub Profile
@XVilka
XVilka / Makefile
Last active July 5, 2021 05:27
Rizin API use with Go/cgo
all:
go build -v
run:
go run rz-api.go
#!/bin/bash
# We use unicode quotes on purpose
# shellcheck disable=SC1112
BASEDIR=${HOME}/rizin/rizin
LOGSDIR=${HOME}/rizin
RZ_PREFIX=${HOME}/bin/prefix/rizin
@XVilka
XVilka / search_includes.py
Last active September 25, 2020 05:23
Simple Python script to search the files by pattern in the active GCC include paths.
#!/usr/bin/env python3
# pylint: disable=missing-docstring
# pylint: disable=invalid-name
"""GCC Includes Search Script
This script allows to search the files among all paths that GCC currently set in the includes.
It is helpful for debugging problems with the old files and finding conflicts between multiple headers
of different versions of the same library.
"""
@XVilka
XVilka / sync.py
Created April 9, 2020 10:17
Dotfiles Syncronization Script
#!/usr/bin/env python3
# pylint: disable=missing-docstring
# pylint: disable=invalid-name
# pylint: disable=wrong-import-position
# pylint: disable=import-outside-toplevel
# pylint: disable=logging-format-interpolation
"""Dotfiles Syncronization Script
This script allows to syncronize your dotfiles among different computers with
@XVilka
XVilka / FontShapingSupport.md
Created October 26, 2019 03:09
Font shaping e.g. ligatures support in terminal emulators and applications

This gist will show the support of font shaping support in the terminal emulators and console programs.

Supporting font shaping

@XVilka
XVilka / gadts.rs
Created June 23, 2017 10:51 — forked from Sgeo/gadts.rs
Gadts in Rust
/// This type is only every inhabited when S is nominally equivalent to T
#[derive(Debug)]
pub struct Is<S, T>(::std::marker::PhantomData<(*const S, *const T)>);
// Construct a proof of the fact that a type is nominally equivalent
// to itself.
pub fn is<T>() -> Is<T, T> { Is(::std::marker::PhantomData) }
// std::mem::transmute does not accept unsubstituted type parameters
// manual transmute as suggested by manual

Keybase proof

I hereby claim:

  • I am XVilka on github.
  • I am xvilka (https://keybase.io/xvilka) on keybase.
  • I have a public key whose fingerprint is BA9D 6CF9 322C 369D B202 9FCA E235 D217 9EDE 6823

To claim this, I am signing this object:

@XVilka
XVilka / BiDiSupport.md
Last active February 1, 2024 14:53
BiDirectional Text

This gist will show the support of BiDirectional text in the terminal emulators and console programs. You can read more about the standardization efforts at the dedicated page of FreeDesktop Terminal BiDi working group.

How to test

Logical Order ◀ ◀ ◀ RTL LTR ▶ ▶ ▶
WHAT IS UNICODE؟ in arabic in arabic ؟EDOCINU SI TAHW ؟EDOCINU SI TAHW in arabic
ما هو الترميز الموحد يونيكود؟ in Arabic ما هو الترميز الموحد يونيكود؟ in Arabic
@XVilka
XVilka / TrueColour.md
Last active March 18, 2024 19:31
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@XVilka
XVilka / bio_unpack.py
Created December 28, 2013 19:38
Unpacks *.BIO and *.CAP EFI capsule files
#!/bin/env python
import ctypes
import struct
import sys
import os
import array
EFI_CAPSULE_GUID = "BD86663B760D3040B70EB5519E2FC5A0".decode('hex') # 3B6686BD-0D76-4030-B70E-B5519E2FC5A0
EFI2_CAPSULE_GUID = "8BA63C4A2377FB48803D578CC1FEC44D".decode('hex') # 4A3CA68B-7723-48FB-803D-578CC1FEC44D
UEFI_CAPSULE_GUID = "B9829153B5AB9143B69AE3A943F72FCC".decode('hex') # 539182B9-ABB5-4391-B69A-E3A943F72FCC