Skip to content

Instantly share code, notes, and snippets.

View Holi0317's full-sized avatar

Hollis Wu Holi0317

  • Toronto
  • 14:15 (UTC -07:00)
View GitHub Profile
@Holi0317
Holi0317 / main.py
Created February 3, 2024 15:40
Temporal workflow with asyncio.Semaphore
import asyncio
from datetime import timedelta
from typing import List
from temporalio import activity, workflow
from temporalio.client import Client
from temporalio.worker import Worker
@activity.defn
@Holi0317
Holi0317 / init.lua
Created June 29, 2022 15:36
Override volar handler but failed
local on_windows = vim.loop.os_uname().version:match("Windows")
local function join_paths(...)
local path_sep = on_windows and "\\" or "/"
local result = table.concat({ ... }, path_sep)
return result
end
local handlers = require("vim.lsp.handlers")
local function log(err, workspace_edit, ctx)
@Holi0317
Holi0317 / vscode.log
Created June 23, 2022 15:46
volar#1490 vscode
[Trace - 11:18:53 PM] Sending notification 'textDocument/didChange'.
Params: {
"textDocument": {
"uri": "file:///Users/hollis.wu/Desktop/vite-project/src/App.vue",
"version": 55
},
"contentChanges": [
{
"range": {
"start": {
@Holi0317
Holi0317 / init.lua
Created June 23, 2022 11:46
volar#1490
local on_windows = vim.loop.os_uname().version:match("Windows")
local function join_paths(...)
local path_sep = on_windows and "\\" or "/"
local result = table.concat({ ... }, path_sep)
return result
end
vim.cmd([[set runtimepath=$VIMRUNTIME]])
@Holi0317
Holi0317 / DynamicLoader.vue
Last active August 27, 2021 05:14
Dynamic components
<template>
<!-- doc: https://vuejs.org/v2/guide/components.html#Dynamic-Components -->
<component :is="comp"></component>
</template>
<script>
// Just a fallback component
import EmptyComp from "./EmptyComp";
export default {
@Holi0317
Holi0317 / rc.lua
Created January 13, 2019 06:01
Minimal awesome config
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
@Holi0317
Holi0317 / README.md
Created May 5, 2018 08:34
Demo of popup windows using PySide2
@Holi0317
Holi0317 / Cargo.toml
Created April 28, 2018 09:19
Hello world!
[package]
name = "hello-world"
version = "0.1.0"
authors = ["holi0317 <holliswuhollis@gmail.com>"]
[dependencies]
rand = "0.4.2"
@Holi0317
Holi0317 / angular-momentum.md
Created March 22, 2018 14:28
Angular momentum notes

By no means this is a complete notes.

Angular momentum

It is a vector. Symbol is L

Unit: kg m²/s

When an object spins, it gains angular momentum. In that case, the object has inertia and keep spinning, resisting other force from interrupt (e.g. Gravity).

[ 0.004][v][cplayer] mpv 0.27.1 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
[ 0.004][v][cplayer] built on Sun Feb 11 20:44:25 CET 2018
[ 0.004][v][cplayer] ffmpeg library versions:
[ 0.004][v][cplayer] libavutil 55.78.100
[ 0.004][v][cplayer] libavcodec 57.107.100
[ 0.004][v][cplayer] libavformat 57.83.100
[ 0.004][v][cplayer] libswscale 4.8.100
[ 0.004][v][cplayer] libavfilter 6.107.100
[ 0.004][v][cplayer] libswresample 2.9.100
[ 0.004][v][cplayer] ffmpeg version: 3.4.1