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 / 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 March 19, 2024 01:37
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)
@azlkiniue
azlkiniue / Dockerfile
Created March 10, 2021 11:16
simple nodejs dockerfile example
FROM node:14-alpine
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install
COPY . .
@azlkiniue
azlkiniue / capitals.topo.json
Created November 28, 2020 06:10
List of Capital Cities Coordinates in TopoJSON Format
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am azlkiniue on github.
  • I am yusril (https://keybase.io/yusril) on keybase.
  • I have a public key whose fingerprint is B939 B6A7 4A3D 5C0D 7005 B79E B9AE 014E B7D9 30E0

To claim this, I am signing this object:

{
"_id": "5ecd41ce845d170035039246",
"email": "[email protected]",
"name": "Ahmada Yusril",
"nik": "3571022222222222",
"phone": "081234567890",
"status": 6,
"password": "$2a$12$juvNCPiHNyYnUvjbgtiC4.M/EjTHez35DUprehGB7wd12csHXGLTe",
"verified_token": "JtBCJYG6kPef",
"verified": false,
(function(window) {
var data,
xy = d3
.geo
.equirectangular()
.scale($('#map_container').width())
.translate([$('#map_container').width() / 2, $('#map_container').height() / 2]),
path = d3
.geo
.path()