Skip to content

Instantly share code, notes, and snippets.

View timmyha's full-sized avatar
💕

timothy h timmyha

💕
View GitHub Profile
@timmyha
timmyha / gist:0445df119a3192c2266c157ac092c33a
Created October 12, 2025 18:33
zed theme with Crimson Dark as base
"experimental.theme_overrides": {
"syntax": {
"boolean": {
"color": "#857499"
},
"number": {
"color": "#857499"
},
"constant": {
"color": "#857499"
@timmyha
timmyha / chat_window.lua
Last active February 27, 2025 18:37
claudius chat window
local chat_win = nil
local chat_buf = nil
local chat_file = nil
local toggle_chat
-- generate random file at ~/chats
local function generate_filename()
local random = math.random(1000000)
return os.getenv("HOME") .. "/chats/chat_" .. random .. ".chat"
@timmyha
timmyha / shopify_scraper.js
Last active April 4, 2024 20:32
shopify product scraper
// run in console of a shopify store /products.json endpoint.
let json = JSON.parse(document.querySelector("pre").innerHTML);
const parseJSON = (obj) => {
let csvArr = [['title','description','sku','image_originator_url']];
for (product of obj.products) {
const randomSKU = Math.floor(Math.random() * 9999999999);
const row = [
product.title,
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
# login-shell=no
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
# title=foot
# locked-title=no
@timmyha
timmyha / config.fish
Created December 18, 2023 07:11
fish notes function
function noted -a 'filename'
cd ~/Documents/notes
if test -n "$filename"
if test -e "$argv.md"
echo "opening daily note"
nvim "$argv.md"
else
echo "creating new daily note, opening"
touch "$argv.md"
nvim "$argv.md"
@timmyha
timmyha / gist:01b48e58c50c462ab03f50ddb8e757fc
Created October 13, 2023 14:42
cursor color based on mode
vim.cmd [[
highlight nCursor guifg=#752f4d guibg=#ba7cbb
highlight iCursor guifg=#1b1818 guibg=#97bad0
highlight vCursor guifg=#1b1818 guibg=#FFFFFF
highlight rCursor guifg=#1b1818 guibg=#FFFFFF
highlight Cursor guifg=#1b1818 guibg=#FFFFFF
highlight cCursor guifg=#1b1818 guibg=#FFFFFF
set guicursor=n:block-Cursor
set guicursor+=i:block-iCursor
set guicursor+=n-v-c:noblink
@timmyha
timmyha / config.fish
Last active October 10, 2023 14:26
fish shell notes function
function noted -a 'filename'
cd ~/Documents/notes
if test -n "$filename"
if test -e "$argv.md"
echo "opening daily note"
nvim "$argv.md"
else
echo "creating new daily note, opening"
touch "$argv.md"
nvim "$argv.md"
@timmyha
timmyha / .zshrc
Last active October 3, 2023 12:15
new daily note zsh function
daily_note() {
cd ~/Documents/notes
if [ -e "$(date +%F).md" ]
then
echo "opening daily note"
nvim "$(date +%F).md"
else
echo "creating new daily note, opening"
cp ./templates/daily_note.md "$(date +%F).md"
nvim "$(date +%F).md"
@timmyha
timmyha / borders.md
Created September 14, 2023 10:56
apply border to cmp and diagnostic windows in neovim

for diagnostics:

vim.diagnostic.config {
  virtual_text = false,
  float = {
    header = false,
    border = 'rounded',
    focusable = true,
 },
@timmyha
timmyha / Buttons.tsx
Created December 25, 2022 20:08
How I use styled-components
import styled from 'styled-components';
import { DarkTheme } from '../../theme';
import { store } from '../../store';
const theme = DarkTheme;
interface Props {
width?: string;
height?: string;
size: string;