Skip to content

Instantly share code, notes, and snippets.


Derry Pratama ibndias

View GitHub Profile
ibndias / log-executed-ins-riscv.gdb
Created Apr 14, 2021
GDB Script for log executed asm instruction (RISCV)
View log-executed-ins-riscv.gdb
set confirm off
tbreak start_trigger
set logging overwrite on
set logging on
set height 0
set style enabled off
while (1)
x/i $pc

Keybase proof

I hereby claim:

  • I am ibndias on github.
  • I am derrypratama ( on keybase.
  • I have a public key whose fingerprint is 7937 2358 6B67 DB5B 2803 55B1 AF97 CB9B 903B C0DF

To claim this, I am signing this object:

ibndias /
Created Apr 2, 2021
[RISCV] Reserve Register on C library in GCC
mkdir install
mkdir build
cd build
../configure --with-target-cflags="-ffixed-x31" --with-target-cxxflags="-ffixed-x31" --prefix="/home/derry/Documents/Project/riscv-gnu-toolchain/install" #--with-arch=rv64g --enable-multilib
set -e
time make newlib -j16
ibndias /
Created Mar 24, 2021
Tshark filter port only
sudo tshark -i lo -f "tcp port 4433"
ibndias / FTDI_SPI.xml
Created Feb 16, 2021
Working SPI FTDI Configuration File for FT Prog
View FTDI_SPI.xml
<?xml version="1.0" encoding="utf-16"?>
<bcdUSB>USB 2.0</bcdUSB>
ibndias /
Created Feb 5, 2021
fix gitignore being ignored
git rm -r --cached .
git add .
git commit -m "fixed untracked files"
View a-good-c-main-function.c
/* main.c - the complete listing */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <libgen.h>
#include <errno.h>
#include <string.h>
#include <getopt.h>
ibndias / ciphersuite-std-code.c
Created Jan 12, 2021
Ciphersuite Standard Code
View ciphersuite-std-code.c
const string STD_SUITES =
+------------- cipher suite identifier (hex)
| +---------- encryption strength (0=none, 1=weak, 2=medium, 3=strong)
| | +-------- encryption flags (c=block cipher in CBC mode, r=RC4)
| | | +------ key exchange flags (d=DHE, e=ECDHE, s=SRP, x=RSA/export)
| | | | +---- server key type (r=RSA, d=DSA, h=DH, e=EC, p=PSK,
| | | | | q=RSA+PSK, n=none)
| | | | | +-- suite name
| | | | | |
git config --global alias.pristine '!git reset --hard && git clean -dffx'
ibndias /
Last active Nov 16, 2020
# Ubuntu, install prerequisites
sudo apt-get install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
# Install RISCV toolchain
git clone
cd riscv-gnu-toolchain
git submodule update --init --recursive
./configure --prefix=/opt/riscv --with-arch=rv32g --with-abi=ilp32d
make linux