Skip to content

Instantly share code, notes, and snippets.

@huytd
huytd / logseq-things.css
Created June 3, 2024 20:41
Custom Logseq Things theme (modified from https://github.com/rcvd/logseq-things-theme/)
.white-theme,
html[data-theme=light] {
--cl-white: #fff;
--cl-alabaster: #f9fafb;
--cl-blackhaze: #f5f6f8;
--cl-antiflash: #f2f3f5;
--cl-athens: #eef0f4;
--cl-gallery: #eeeff0;
--cl-fadedwhite: #ececec;
--cl-lilac: #e9e9e9;

Screenshots:

image image image
@huytd
huytd / tokyo-rs-simple-bot.js
Created October 12, 2023 07:50
Simple bot for tokyo-rs
const USERNAME = "rotate-bot";
const ws = require('ws');
const client = new ws(`wss://combat.sege.dev/socket?key=${USERNAME}&name=${USERNAME}`);
client.on('open', () => {
console.log('Connected!');
setInterval(() => {
client.send(JSON.stringify({
@huytd
huytd / hiccup.vim
Last active October 14, 2023 03:51
My latest Vim config in Lua
" Hiccup Theme for Vim
" Author: Huy Tran
" License: BSD 3 Clauses
" Put this file to: colors/hiccup.vim
highlight clear
if exists('syntax_on')
syntax reset
endif
local wezterm = require 'wezterm'
local config = {}
if wezterm.config_builder then
config = wezterm.config_builder()
end
config.color_scheme = 'One Half Black (Gogh)'
config.font = wezterm.font 'Office Code Pro'
<scheme name="Fleetjetbrain-color-theme" parent_scheme="Darcula" version="1">
<colors>
<option name="CONSOLE_BACKGROUND_KEY" value="1E1F22" />
<option name="LINE_NUMBERS_COLOR" value="D6D6DD" />
<option name="SELECTION_BACKGROUND" value="163761" />
<option name="CARET_ROW_COLOR" value="292929" />
<option name="WHITESPACES" value="737373" />
<option name="CARET_COLOR" value="D6D6DD" />
<option name="INDENT_GUIDE" value="737373" />
<option name="SELECTED_INDENT_GUIDE" value="737373" />
let mapleader=" "
set ideajoin
set clipboard+=unnamed
set clipboard+=ideaput
inoremap jk <ESC>
nnoremap <C-j> 10jzz
nnoremap <C-k> 10kzz
nnoremap H h
[
{
"context": "Editor",
"bindings": {
"cmd-b": "editor::GoToDefinition",
"cmd-shift-b": "editor::GoToTypeDefinition",
"cmd-r": "project_symbols::Toggle",
"cmd-0": "workspace::ToggleLeftSidebar",
"ctrl-0": "outline::Toggle"
}
@huytd
huytd / pomodoro.py
Last active May 23, 2023 05:35
A pomodoro timer that write the tracked time into a file near you
#!/usr/bin/env python3
##############################################################################
# Installation:
# First, run the following command to install the required dependencies:
# pip3 install rumps
# Then, copy the script to /usr/bin/local/tmr
##############################################################################
import rumps