Skip to content

Instantly share code, notes, and snippets.

View zhiyue's full-sized avatar
🌻
just do it.

zhiyue zhiyue

🌻
just do it.
View GitHub Profile
@KrustyHack
KrustyHack / readme.md
Created July 9, 2018 07:46
Proxmox Cloud VM

[[qm_cloud_init]] Cloud-Init Support

ifdef::wiki[] :pve-toplevel: endif::wiki[]

http://cloudinit.readthedocs.io[Cloud-Init] is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, configuration of network

@AlexanderWillner
AlexanderWillner / runMojaveVirtualbox.sh
Last active January 8, 2020 03:22
Install macOS 10.14 Mojave on VirtualBox on macOS
Moved to https://github.com/AlexanderWillner/runMacOSinVirtualBox
@DaneGardner
DaneGardner / ubuntu_18.04_cuda.md
Last active February 25, 2025 14:22
Installing CUDA 9.1 on Ubuntu 18.04 (circ. 5/18)

Install CUDA 9.1 on Ubuntu 18.04

Prep system

sudo apt install build-essential gcc-6 g++-6

sudo update-alternatives --remove-all gcc
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 20
sudo update-alternatives --set gcc /usr/bin/gcc-6
@KrustyHack
KrustyHack / doc.adoc
Last active September 19, 2024 16:37
proxmox-ubuntu-cloud-howto

Cloud-Init Support

Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network

@gongpeione
gongpeione / getWeiboDataBack.js
Last active April 4, 2024 07:51
微博炸号找回部分内容
/**
* 1 打开 https://m.weibo.cn/beta 登陆你被炸的账号
* 2 打开浏览器控制台
**/
function delay (time) {
return new Promise(r => {
setTimeout(() => r(), time || 1000); // 延时 1s,可适当增加延长时间
});
}
@ashokpant
ashokpant / cuda_9.0_cudnn_7.0.sh
Last active August 29, 2025 08:18
Install CUDA Toolkit v9.0 and cuDNN v7.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v9.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb)
CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb"
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda-9-0
@nickytonline
nickytonline / my-mac-setup.sh
Last active July 23, 2025 00:49
Mac Setup Scripts
#!/bin/sh
# More Mac setup at https://mac.iamdeveloper.com
# Log file
timestamp=$(date +%s)
logFile="./my-mac-setup-$timestamp.log"
# if true is passed in, things will reinstall
reinstall=$1
#!/bin/bash
#set persistence mode for all GPU
sudo nvidia-smi -pm 1
#Set gpu max power at 160w
sudo nvidia-smi -pl 160
#Set Power level of specific GPU (1080) in watts
# sudo nvidia-smi -i 2 -pl 200
@pexcn
pexcn / ChinaDNS Flow.md
Last active February 6, 2023 03:03
记录一下 ChinaDNS 的工作原理和一些 DNS 相关的想法

ChinaDNS 的工作流程

ChinaDNS 的上游 DNS 分为 国内 DNS可信 DNS

工作流程

  1. ChinaDNS 会同时向上游的 DNS 发送请求。
  2. 如果 可信 DNS 先返回,则直接采用 可信 DNS 的结果。
  3. 如果 国内 DNS 先返回,分两种情况:如果返回的结果是国内的 IP, 则采用;否则丢弃并转而采用 可信 DNS 的结果。
anonymous
anonymous / align_images_masked.py
Created December 27, 2017 01:50
Patched alignment and merging scripts including the option for masking via the detected face points, seamless clone and erosion and blurring of the masks.
import argparse
import cv2
import dlib
import json
import numpy
import skimage
from pathlib import Path
from tqdm import tqdm
from umeyama import umeyama