Skip to content

Commit

Permalink
update vscode env
Browse files Browse the repository at this point in the history
  • Loading branch information
Charmve committed Jan 21, 2024
1 parent b28c0a0 commit 14f839b
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 89 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docker/dev/installers/install_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ else
cp -f ${PKG_NAME} /usr/bin/bazel
chmod a+x /usr/bin/bazel

# NOTE(jiaming):
# NOTE:
# `bazel_completion.bash` was copied from `/etc/bash_completion.d/bazel`
# on x86_64 with bazel deb-installed.
# cp -f "${RCFILES_DIR}/bazel_completion.bash" /etc/bash_completion.d/bazel
Expand Down
5 changes: 3 additions & 2 deletions scripts/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,17 @@ function main() {
return 1
fi

# Note(jiaming):
# Note:
# 1) Exclude deleted files, Ref:
# https://stackoverflow.com/questions/6894322/how-to-make-git-diff-and-git-log-ignore-new-and-deleted-files
# 2) git-clang-format Ref:
# https://github.com/llvm/llvm-project/blob/release/12.x/clang/tools/clang-format/git-clang-format
local what_to_diff
what_to_diff="${CI_MERGE_REQUEST_DIFF_BASE_SHA:-HEAD~1}"

declare -a diff_files
readarray -t diff_files < <(git diff --ignore-submodules --diff-filter=d --name-only "${what_to_diff}")

for one_change in "${diff_files[@]}"; do
run_format "${TOP_DIR}/${one_change}"
done
Expand Down
20 changes: 18 additions & 2 deletions scripts/format_extra_check.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#! /bin/bash
###
# @Author: Charmve [email protected]
# @Date: 2023-11-27 10:09:28
# @LastEditors: Charmve [email protected]
# @LastEditTime: 2024-01-21 22:34:08
# @FilePath: /OccNet-Course/scripts/format_extra_check.sh
# @Version: 1.0.1
# @Blogs: charmve.blog.csdn.net
# @GitHub: https://github.com/Charmve
# @Description:
#
# Copyright (c) 2023 by Charmve, All Rights Reserved.
# Licensed under the MIT License.
###
set -euo pipefail

TOP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
Expand Down Expand Up @@ -35,7 +49,7 @@ function run_gtest_dependency_check() {
}

function proto_specific_dirs_check() {
declare -A proto_dirs
declare -a proto_dirs
for fn in "$@"; do
if [[ "${fn}" == *".proto" ]]; then
local dir
Expand All @@ -51,7 +65,7 @@ function proto_specific_dirs_check() {

function run_proto_lint() {
local msg
# NOTE(Jiaming):
# NOTE:
# 1. run "buf lint" from top_dir
# 2. buf lint would probably fail, here we check unused imports only
pushd "${TOP_DIR}" > /dev/null
Expand All @@ -77,7 +91,9 @@ function main() {
local what_to_diff
what_to_diff="${CI_MERGE_REQUEST_DIFF_BASE_SHA:-HEAD~1}"

declare -a changes
readarray -t changes < <(git diff --ignore-submodules --diff-filter=d --name-only "${what_to_diff}")

for one_change in "${changes[@]}"; do
if [[ "${one_change}" == *".proto" ]]; then
run_proto_lint "${one_change}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/gen_proto_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function main() {
;;
esac
done
# Note(jiaming):
# Note:
# 1) Exclude deleted files, Ref:
# https://stackoverflow.com/questions/6894322/how-to-make-git-diff-and-git-log-ignore-new-and-deleted-files
# 2) git-clang-format Ref:
Expand Down
2 changes: 1 addition & 1 deletion scripts/gofmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function check_gofmt_cmd() {
GOFMT_PATH="$(command -v gofmt)"
fi
else
# NOTE(Jiaming): This depends on two facts:
# NOTE: This depends on two facts:
# 1) Our workspace is named com_maiwei and its workspace dir /maiwei is writable
# 2) The symlink created (pointing to the execution_root dir) is bazel-maiwei
# bazel info execution_root
Expand Down
29 changes: 0 additions & 29 deletions scripts/maiwei_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ export WHITE='\033[34m'
export YELLOW='\033[33m'
export NO_COLOR='\033[0m'

# Note(jiaming): Readonly.
# Not using the `readonly` keyword here as this file may be sourced multiple times
AVAILABLE_OFFICES=(
bayarea
beijing
shenzhen
suzhou
guangzhou
)

function info() {
(echo >&2 -e "[${WHITE}${BOLD}INFO${NO_COLOR}] $*")
}
Expand Down Expand Up @@ -251,25 +241,6 @@ function country_of_office() {
echo "${country}"
}

#############################################
# Check if the "canonical" office is valid
# Globals:
# AVAILABLE_OFFICES
# Arguments:
# A canonical office name
# Returns:
# 0 if office name is valid, non-zero otherwise
#############################################
function validate_office() {
local office="$1"
for cand in "${AVAILABLE_OFFICES[@]}"; do
if [[ "${cand}" == "${office}" ]]; then
return 0
fi
done
return 1
}

function determine_arm64_model() {
local arch
arch="$(uname -m)"
Expand Down
139 changes: 88 additions & 51 deletions src/video.html
Original file line number Diff line number Diff line change
@@ -1,78 +1,115 @@
<!-- This site is entirely raw HTML/CSS 😬. This'll change one day<sup>TM</sup>. -->

<html lang="en"><head>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-Q603T56FWT"></script>
<script
async=""
src="https://www.googletagmanager.com/gtag/js?id=G-Q603T56FWT"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());

gtag('config', 'G-Q603T56FWT');
gtag("config", "G-Q603T56FWT");
</script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jesse Wei</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/style.css" />
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
},
svg: {
fontCache: 'global'
}
};
MathJax = {
tex: {
inlineMath: [
["$", "$"],
["\\(", "\\)"],
],
},
svg: {
fontCache: "global",
},
};
</script>
<script type="text/javascript" id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
<link rel="shortcut icon" type="image/x-icon" href="/img/logo.jpg">
</head>
<script
type="text/javascript"
id="MathJax-script"
async=""
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
></script>
<link rel="shortcut icon" type="image/x-icon" href="/img/logo.jpg" />
</head>

<body>
<body>
<header>
<nav>
<ul class="nav-links">
<li><a class="no-underline" href="/">Home</a></li>
<li><a class="no-underline" href="/blog">Blog</a></li>
<li><a class="no-underline" href="/teaching">Teaching</a></li>
</ul>
</nav>
<nav>
<ul class="nav-links">
<li><a class="no-underline" href="/">Home</a></li>
<li><a class="no-underline" href="/blog">Blog</a></li>
<li><a class="no-underline" href="/teaching">Teaching</a></li>
</ul>
</nav>
</header>

<h1 class="big-name">Jesse Wei</h1>
<h3 class="sub-name">
{Undergraduate, Researcher, Serial COMP TA} @
<a class="no-underline" href="https://unc.edu">UNC</a>
{Undergraduate, Researcher, Serial COMP TA} @
<a class="no-underline" href="https://unc.edu">UNC</a>
</h3>

<div style="position: relative; padding: 30% 45%;">
<iframe style="position: absolute; width: 60%; height: 60%; left: 0; top: 0;" src="https://player.bilibili.com/player.html?aid=214932992&amp;bvid=BV1wa411j7iR&amp;cid=743024340&amp;page=1" scrolling="no" border="0" frameborder="no"></iframe>
<div style="position: relative; padding: 30% 45%">
<iframe
style="position: absolute; width: 60%; height: 60%; left: 0; top: 0"
src="https://player.bilibili.com/player.html?aid=214932992&amp;bvid=BV1wa411j7iR&amp;cid=743024340&amp;page=1"
scrolling="no"
border="0"
frameborder="no"
></iframe>
</div>

<div>
<video width="320" height="240" controls="">
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
<source src="movie.webm" type="video/webm">
<source src="movie.mp4" type="video/mp4" />
<source src="movie.ogg" type="video/ogg" />
<source src="movie.webm" type="video/webm" />
<object data="movie.mp4" width="320" height="240">
<embed src="movie.swf" width="320" height="240">
</object>
</video>
</div>
<embed src="movie.swf" width="320" height="240" />
</object>
</video>
</div>

<div class="container">
<iframe width="190" height="200" src="https://www.youtube.com/embed/QsaT23CZIpM" title="Jesse's PB (9.04s)" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe
width="190"
height="200"
src="https://www.youtube.com/embed/QsaT23CZIpM"
title="Jesse's PB (9.04s)"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen=""
></iframe>
</div>

<footer>
<ul class="footer-flex">
<li><a class="no-underline" href="https://www.linkedin.com/in/jessewei1/">LinkedIn</a></li>
<li><a class="no-underline" href="https://www.github.com/jesse-wei">GitHub</a></li>
<li><a class="no-underline" href="mailto:[email protected]">Email</a></li>
<li><a class="no-underline" href="phone.html">Phone</a></li>
</ul>
<ul class="footer-flex">
<li>
<a class="no-underline" href="https://www.linkedin.com/in/jessewei1/"
>LinkedIn</a
>
</li>
<li>
<a class="no-underline" href="https://www.github.com/jesse-wei"
>GitHub</a
>
</li>
<li>
<a class="no-underline" href="mailto:[email protected]">Email</a>
</li>
<li><a class="no-underline" href="phone.html">Phone</a></li>
</ul>
</footer>

</body></html>
</body>
</html>
2 changes: 1 addition & 1 deletion tools/check_gtest_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function _is_target_testonly() {
function _is_gtest_dependent_target() {
local deps
deps="$(buildozer 'print deps' "$1" 2> /dev/null)"
# NOTE(Jiaming):
# NOTE:
# Here we can check ONLY direct dependency on googletest.
# Since if target_b depends on target_a which in turn depends on gtest
# Bazel will emit the following error:
Expand Down
2 changes: 1 addition & 1 deletion tools/normalize_includes.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def normalize_header_includes(fentry: Path, dry=False, strip=False):
fentry_new.rename(fentry)


# TODO(Jiaming): maybe a multi-threaded version
# TODO: maybe a multi-threaded version
def main(files=None, dirs=None, dry=False, strip=False):
if files:
for ent in files:
Expand Down

0 comments on commit 14f839b

Please sign in to comment.