Skip to content

Instantly share code, notes, and snippets.

<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" />
@huytd
huytd / android_game.java
Last active August 22, 2023 14:37
Simple game engine using Canvas for Android - using for quick prototype or simple games
package com.gamarist.momoney;
import android.os.Bundle;
import android.R.integer;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
let mapleader=" "
set ideajoin
set clipboard+=unnamed
set clipboard+=ideaput
inoremap jk <ESC>
nnoremap <C-j> 10jzz
nnoremap <C-k> 10kzz
nnoremap H h
@huytd
huytd / 2019.tmux.conf
Created September 27, 2019 22:43
My 2019 Tmux Config
# set -g default-terminal "xterm"
# set-option -ga terminal-overrides ",xterm:Tc"
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -g prefix C-x
unbind-key C-x
bind-key C-2 send-prefix
bind \ split-window -h -c '#{pane_current_path}'
@huytd
huytd / kitty.conf
Last active August 11, 2023 04:22
Kitty Terminal Config
# Shell config
shell /bin/zsh
shell_integration no-cursor
# Font
font_family Berkeley Mono
font_size 13
adjust_line_height 115%
# Window frame
" General Settings
set update.lastchecktime 1686688430225
set update.nag true
set update.nagwait 7
set update.lastnaggedversion 1.14.0
set update.checkintervalsecs 86400
set configversion 2.0
set smoothscroll true
set newtab about:blank
set leavegithubalone true
[
{
"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
@huytd
huytd / tien-len-mien-nam-by-bing-gpt.py
Created May 9, 2023 00:04
Card game Thirteen (a.k.a Tiến lên miền nam) made by Bing Chat
# Step 1: Import the random module
import random
# Step 2: Define a class for cards
class Card:
def __init__(self, rank, suit):
self.rank = rank # an integer from 3 to 15 (3 is lowest and 15 is highest)
self.suit = suit.lower() # a string from "spades", "clubs", "diamonds", or "hearts"
def __str__(self):
@huytd
huytd / middle-mouse-scroll.lua
Created July 23, 2021 04:48
Hammerspoon script for handling middle mouse scroll with MX Ergo
-- HANDLE SCROLLING WITH MIDDLE MOUSE BUTTON PRESSED
local deferred = false
overrideOtherMouseDown =
hs.eventtap.new(
{hs.eventtap.event.types.otherMouseDown},
function(e)
deferred = true
return true