This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!name=davidliyutong personal module | |
#!desc=This is a custom module for Surge5 that sets direct routes for specific IP CIDRs. | |
[MITM] | |
hostname = %APPEND% 100.100.100.0/24, 100.99.0.0/16, 192.168.0.0/16, 10.0.0.0/8 | |
[Rule] | |
IP-CIDR,100.100.100.0/24,DIRECT | |
IP-CIDR,100.99.0.0/16,DIRECT | |
IP-CIDR,192.168.0.0/16,DIRECT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This function takes RGB values and writes them to the LED device | |
set_led_color() { | |
echo -n "$1,$2,$3" > /proc/ubnt_ledbar/custom_color | |
} | |
# This function smoothly transitions from one color to another | |
transition_color() { | |
local startR=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from typing import List, Optional, Tuple | |
import numpy as np | |
import pyrealsense2 as rs | |
from pydantic import BaseModel | |
import open3d as o3d | |
import cv2 | |
import py_cli_interaction | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import heapq | |
from time import monotonic | |
from typing import Iterable, Dict, Any, List, Callable, Optional | |
import datetime | |
import inspect | |
class RateLimit: | |
def __init__(self, num: int, duration: datetime.timedelta): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# download version | |
VERSION=$(curl -sL https://api.github.com/repos/microsoft/vscode-cpptools/releases/latest | jq -r ".tag_name") | |
VERSION=${VERSION:1} # Remove character 'v' | |
echo "VERSION: $VERSION" | |
# prepare download destination | |
DOWNLOAD_DESTINATION="$HOME/Downloads" | |
if [[ ! -d $DOWNLOAD_DESTINATION ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "clang - 生成和调试活动文件", | |
"type":"cppdbg", | |
"request": "launch", | |
"program": "${fileDirname}/${fileBasenameNoExtension}", | |
"args": [], | |
"stopAtEntry": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# On ubuntu:18.04 | |
echo "-------- I am $(whoami) --------" | |
HOME_DIR=$(eval echo ~$USER) | |
sudo apt-get update | |
sudo apt-get install -y \ | |
libsoqt4-dev \ | |
libcoin80-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import json | |
import logging | |
import os | |
import os.path as osp | |
import shutil | |
import subprocess | |
from typing import Optional, Dict, Tuple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
if [ -z $DBENCH_MOUNTPOINT ]; then | |
DBENCH_MOUNTPOINT=/tmp | |
fi | |
if [ -z $FIO_SIZE ]; then | |
FIO_SIZE=2G | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
# any name can be used; Velero uses the labels (below) | |
# to identify it rather than the name | |
name: change-storage-class-config | |
# must be in the velero namespace | |
namespace: velero | |
# the below labels should be used verbatim in your | |
# ConfigMap. |
NewerOlder