Skip to content

Instantly share code, notes, and snippets.

View Holi0317's full-sized avatar

Hollis Wu Holi0317

  • Toronto
  • 20:52 (UTC -05:00)
View GitHub Profile
@Holi0317
Holi0317 / Dockerfile
Created June 24, 2025 15:21
Nginx unit timeout
FROM unit:1.34.2-node22
COPY package.json package-lock.json /app/
WORKDIR /app
RUN npm install
RUN npm install unit-http
COPY main.js /app/
COPY conf.json /docker-entrypoint.d/config.json
@Holi0317
Holi0317 / go.mod
Last active March 17, 2025 00:45
Nushell zero width tty
module github.com/holi0317/zero-pty
go 1.24.1
require github.com/aymanbagabas/go-pty v0.2.2
require (
github.com/creack/pty v1.1.21 // indirect
github.com/u-root/u-root v0.11.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
@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 <[email protected]>"]
[dependencies]
rand = "0.4.2"