Skip to content

Instantly share code, notes, and snippets.

View azlkiniue's full-sized avatar
:shipit:
Forever a work in progress

Ahmada Yusril azlkiniue

:shipit:
Forever a work in progress
View GitHub Profile
@azlkiniue
azlkiniue / install.sh
Last active March 5, 2026 09:27 — forked from Faheetah/install.sh
Install containerd and nerdctl on Ubuntu
# adapted from https://github.com/ArmDeveloperEcosystem/arm-learning-paths/blob/main/content/install-guides/nerdctl.md
# modified for amd64
sudo apt-get update
sudo apt-get install containerd
NERDCTL_VERSION=$(curl -s https://api.github.com/repos/containerd/nerdctl/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//')
wget https://github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz
sudo tar -xzvf nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz -C /usr/local/bin
rm nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz
@azlkiniue
azlkiniue / -ebpf-party-solutions.md
Last active January 20, 2026 00:16
ebpf.party solutions
@azlkiniue
azlkiniue / Dockerfile
Created December 23, 2024 02:26
Dockerfile for building AGL
FROM ubuntu:22.04 AS build
SHELL ["/bin/bash", "-c"]
RUN apt-get update \
&& apt-get install -y \
curl \
git \
python3 \
python3-pip \
@azlkiniue
azlkiniue / airquality.R
Created December 16, 2024 07:54
Statistical Data Analysis on "airquality" R Dataset
data("airquality")
old_airquality <- airquality
# clean the dataset
airquality <- airquality[
complete.cases(airquality),
!(names(airquality) %in% c("Month", "Day"))
]
pairs(airquality)
summary(airquality)

Node Exporter Installation Guide (for Systemd)

Step 1: Create the node_exporter User

The node_exporter user should be non-privileged with a shell of /sbin/nologin. This user will own the necessary directories and will run the service.

sudo useradd --system --shell /sbin/nologin --no-create-home --home-dir /var/lib/node_exporter node_exporter
@azlkiniue
azlkiniue / can2ws.py
Last active September 22, 2024 15:25
Script to forward CAN bus logs (using SocketCAN) into websocket
#!/usr/bin/env python
import can
import asyncio
from typing import List
from can.notifier import MessageRecipient
from websockets.asyncio.server import broadcast, serve
connections = set()
interval = 0.1 # in seconds
@azlkiniue
azlkiniue / create-read-only-kubeconfig.yaml
Last active April 9, 2024 02:10
Create Read-only Kubernetes Config
apiVersion: v1
kind: ServiceAccount
metadata:
name: read-only-user
secrets:
- name: read-only-secret
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
@azlkiniue
azlkiniue / ndtop.py
Last active December 24, 2024 10:09
Script to get list of docker container that used a particular GPU, based on nvitop – https://github.com/XuehaiPan/nvitop
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from typing import Dict
from nvitop import Device, GpuProcess, NA
import docker
from rich.console import Console
from rich.table import Table
from rich import box
docker_client = docker.from_env()
@azlkiniue
azlkiniue / github-followback-checker.py
Last active February 18, 2023 15:25 — forked from rezkyfm/github-followback-checker.py
Check if user in github follow you back or not
'''
Check if user in github follow you back or not
'''
import requests
username = input("Enter your username: ")
def main(username):
@azlkiniue
azlkiniue / parseml.py
Last active March 18, 2021 06:31 — forked from urschrei/parseml.py
Extract attachments from EML files in the current dir, and write them to the output subdir
#!/usr/bin/env python
"""
2020 update:
- More iterators, fewer lists
- Python 3 compatible
- Processes files in parallel
(one thread per CPU, but that's not really how it works)
2021 update:
- Change from legacy format (compat32)