Skip to content

Instantly share code, notes, and snippets.

View ibndias's full-sized avatar
⚔️

Derry Pratama ibndias

⚔️
View GitHub Profile
@ibndias
ibndias / RiscV-Linux-on-Arty-A7-100T.md
Last active April 6, 2024 09:38
Quickstart Running Linux on Arty A7-100T FPGA

A quickstart guide to run Linux on Arty A7 100T FPGA

Because everyone keeps posting about Arty A7 35T while I only have the 100T. This is basically just a guide for linux on litex [https://github.com/litex-hub/linux-on-litex-vexriscv].

Requirements

  • Arty A7 100T FPGA
  • Micro USB Cable
  • and a PC

Prerequisites

@ibndias
ibndias / sft_trainer.py
Created February 8, 2024 11:51 — forked from lewtun/sft_trainer.py
Fine-tuning Mistral 7B with TRL & DeepSpeed ZeRO-3
# This is a modified version of TRL's `SFTTrainer` example (https://github.com/huggingface/trl/blob/main/examples/scripts/sft_trainer.py),
# adapted to run with DeepSpeed ZeRO-3 and Mistral-7B-V1.0. The settings below were run on 1 node of 8 x A100 (80GB) GPUs.
#
# Usage:
# - Install the latest transformers & accelerate versions: `pip install -U transformers accelerate`
# - Install deepspeed: `pip install deepspeed==0.9.5`
# - Install TRL from main: pip install git+https://github.com/huggingface/trl.git
# - Clone the repo: git clone github.com/huggingface/trl.git
# - Copy this Gist into trl/examples/scripts
# - Run from root of trl repo with: accelerate launch --config_file=examples/accelerate_configs/deepspeed_zero3.yaml --gradient_accumulation_steps 8 examples/scripts/sft_trainer.py
@ibndias
ibndias / PG_Rag_Benchmarks.ipynb
Created December 31, 2023 13:57 — forked from chuyqa/PG_Rag_Benchmarks.ipynb
PGVector Local LLM
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ibndias
ibndias / RIMI Documentation.md
Last active May 31, 2023 05:09
RIMI: Instruction-level Memory Isolation for Embedded Systems on RISC-V Documentation
@ibndias
ibndias / offsec.md
Created May 6, 2023 18:30 — forked from jivoi/offsec.md
Penetrating Testing/Assessment Workflow

Penetrating Testing/Assessment Workflow & other fun infosec stuff

https://github.com/jivoi/pentest

My feeble attempt to organize (in a somewhat logical fashion) the vast amount of information, tools, resources, tip and tricks surrounding penetration testing, vulnerability assessment, and information security as a whole*

@ibndias
ibndias / keychronfn.sh
Created October 14, 2021 00:38
Keychron Function Key Ubuntu, use F1-F12 first, press FN to use multimedia
echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u -k all
sudo reboot # optional
@ibndias
ibndias / smartfactory-explanation.md
Last active January 4, 2023 15:05
Smartfactory Explanation compilation

HTTPS, FTPS, and Benchmark Explanation

HTTPS Handshake Log Explanation

We demonstrate the HTTPS connection between two Raspberry Pi. The HTTPS client is using our cryptochip that will do the handshake and connect to the ordinary HTTPS server. This shows that our cryptochip works flawlessly and compatible with other widely used crypto library.

image image

Server started, CA certificate, server certificate and key loaded.

TCPDUMP Enabel non root for wireshark

sudo groupadd pcap && sudo usermod -a -G pcap $USER && sudo chgrp pcap /usr/bin/tcpdump && sudo chmod 750 /usr/bin/tcpdump && sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/tcpdump

sudo groupadd pcap; sudo usermod -a -G pcap $USER; sudo chgrp pcap /usr/bin/tcpdump; sudo chmod 750 /usr/bin/tcpdump; sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/tcpdump
@ibndias
ibndias / linux-remove-ip-address.md
Last active December 28, 2022 00:18
How to remove IP address in Linux

Linux Remove IP

Removing IP shown in ip a command

sudo ip addr del <ip-address>/24 dev <interface>

example: sudo ip addr del 192.168.56.110/24 dev eth0

Remove all IP shown in ifconfig command

@ibndias
ibndias / tshark-filter.sh
Last active December 27, 2022 01:12
Tshark filter port only
sudo tshark -i lo -f "tcp port 4433"
sudo tshark -i eth0 -f "host 192.168.0.10"
https://wiki.wireshark.org/CaptureFilters