Skip to content

Instantly share code, notes, and snippets.

View cardyok's full-sized avatar
🎯
Focusing

Cardy Tang cardyok

🎯
Focusing
  • AlibabaCloud
  • Hangzhou, China
View GitHub Profile
#!/bin/bash
set -x
apt-get update
apt-get install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
@cardyok
cardyok / reflection_node_cleanup.sh
Last active November 19, 2024 23:24
reflection node cleanup
#!/bin/bash
if stat /opt/dlami/nvme/lepton/containerd; then
systemctl restart kubelet
systemctl restart gpud
exit 0
fi
systemctl stop gpud
systemctl stop kubelet
crictl pods -q | xargs crictl -t 20s stopp
crictl pods -q | xargs crictl -t 20s rmp
@cardyok
cardyok / kernel-dev.md
Created August 19, 2021 12:20 — forked from vegard/kernel-dev.md
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.