View gadts.rs
/// 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
View radare-cygwin-build.sh
#!/bin/bash
# Base directory is current by default
BASE_DIR="."
# Use > 1 to consume two arguments per pass in the loop (e.g. each
# argument has a corresponding value to go with it).
# Use > 0 to consume one or more arguments per pass in the loop (e.g.
# some arguments don't have a corresponding value to go with it such
# as in the --default example).
View keybase.md

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:

View BiDiSupport.md

This gist will show the support of BiDirectional text in the terminal emulators and console programs.

How to test

Supporting BiDirectional text

View TrueColour.md

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
View bio_unpack.py
#!/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
View json tests
# -------------------------------
# ADD instruction
NAME="AVR: [ADD]"
FILE=malloc://32
CMDS='
e asm.arch=avr
wx 480f
pi 1
'
EXPECT='add r20, r24