Skip to content

Instantly share code, notes, and snippets.

View qboster's full-sized avatar

Bo Qin qboster

  • Beijing, China
  • 04:15 (UTC +08:00)
View GitHub Profile
@salrashid123
salrashid123 / container.go
Created August 4, 2023 16:04
containerd nginx in golang
package main
import (
"context"
"fmt"
"log"
"syscall"
"time"
// "github.com/containerd/cgroups/v3"
@rexlx
rexlx / kill-tracker.sh
Created April 5, 2022 11:30
disable tracker daemon for redhat, fedora and centos (and presumably rocky and alma linux as well)
#!/bin/bash
echo "Hidden=true" >> /etc/xdg/autostart/tracker-extract.desktop
echo "Hidden=true" >> /etc/xdg/autostart/tracker-miner-apps.desktop
echo "Hidden=true" >> /etc/xdg/autostart/tracker-miner-fs.desktop
echo "Hidden=true" >> /etc/xdg/autostart/tracker-miner-user-guides.desktop
echo "Hidden=true" >> /etc/xdg/autostart/tracker-store.desktop
dbus-launch --exit-with-session gsettings set \
org.freedesktop.Tracker.Miner.Files crawling-interval -2
@Dounm
Dounm / monitor_ib_traffic.py
Last active February 14, 2025 03:24
Monitor Infiniband traffic and caculate bandwidth
# Inspired by https://github.com/vpenso/ganglia-sensors/blob/master/lib/python_modules/infiniband.py#/
import logging
import re
import sys
import json
import time
import subprocess
@dockerlead
dockerlead / Tutorial.md
Created November 16, 2020 05:04
Wireguard on CentOS 7/8

Set Up Your Own WireGuard VPN Server on CentOS

This tutorial is going to show you how to set up your own WireGuard VPN server on CentOS. WireGuard is made specifically for the Linux kernel. It runs inside the Linux kernel and allows you to create fast, modern, and secure VPN tunnel. TL;DR

Prerequisites

This tutorial assumes that the VPN server and VPN client are both running CentOS operating system.

Step 1: Install WireGuard on CentOS Server and Desktop

Log into your CentOS server, then run the following commands to install WireGuard.

# CentOS 8
@bonlime
bonlime / get_Imagenet.sh
Last active March 12, 2025 13:39 — forked from BIGBALLON/extract_ILSVRC.sh
script for ImageNet data extract.
#!/bin/bash
#
# script to fully prepare ImageNet dataset
## 1. Download the data
# get ILSVRC2012_img_val.tar (about 6.3 GB). MD5: 29b22e2961454d5413ddabcf34fc5622
# wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_val.tar
# get ILSVRC2012_img_train.tar (about 138 GB). MD5: 1d675b47d978889d74fa0da5fadfb00e
# wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_train.tar
@lucasea777
lucasea777 / build.sh
Created May 19, 2018 02:15 — forked from Artanis/build.sh
Python C Extension Hello World
gcc -fpic --shared $(python3-config --includes) greetmodule.c -o greet.abi3.so
# can also use $(pkg-config --cflags python-3.5)
# or
# python3 setup.py install --record files.txt --user
@Brainiarc7
Brainiarc7 / nvidia-docker2-deploy-ubuntu-16.04LTS.md
Last active September 17, 2022 04:51
How to correctly install nvidia-docker2 on Ubuntu 16.04LTS

How to install NVIDIA Docker 2 package on Ubuntu and Debian:

If you came to this result (from Google or elsewhere) after realizing that Nvidia-docker's entry on this subject does not result in a working installation, here are the basic steps needed to install this package correctly:

For starters, ensure that you've installed the latest Docker Community edition by following the steps below:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

@squidpickles
squidpickles / README.md
Last active January 6, 2025 12:05
Multi-platform (amd64 and arm) Kubernetes cluster

Multiplatform (amd64 and arm) Kubernetes cluster setup

The official guide for setting up Kubernetes using kubeadm works well for clusters of one architecture. But, the main problem that crops up is the kube-proxy image defaults to the architecture of the master node (where kubeadm was run in the first place).

This causes issues when arm nodes join the cluster, as they will try to execute the amd64 version of kube-proxy, and will fail.

It turns out that the pod running kube-proxy is configured using a DaemonSet. With a small edit to the configuration, it's possible to create multiple DaemonSets—one for each architecture.

Steps

Follow the instructions at https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ for setting up the master node. I've been using Weave Net as the network plugin; it see

@gauravkaila
gauravkaila / install_docker_ubuntu_16.04.sh
Last active May 20, 2023 05:47
Install Docker and nvidia-docker on Ubuntu-16.04
#!/bin/bash
# add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# add the Docker repository to APT sources
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# update the package database with the Docker packages from the newly added repo
sudo apt-get update
@raulqf
raulqf / Install_OpenCV3_CUDA9.md
Last active September 2, 2023 13:13
Install OpenCV 3.4.1 with CUDA 9.0 support for an Ubuntu 18.04 distro.

How to install OpenCV 3.4.1 with CUDA on Ubuntu distro

First of all install update and upgrade your system:

    $ sudo apt-get update
    $ sudo apt-get upgrade

Then, install required libraries: