Skip to content

Instantly share code, notes, and snippets.

View darvid's full-sized avatar
πŸŒƒ
πŸ§‘β€πŸš€πŸ’ŠπŸš€

David Gidwani darvid

πŸŒƒ
πŸ§‘β€πŸš€πŸ’ŠπŸš€
View GitHub Profile
@darvid
darvid / mermaid.css
Created January 1, 2025 22:15
⚫ obsidian custom CSS
/* vim: set ft=css:sw=2:ts=2:sts=2:et: */
@charset "UTF-8";
.mermaid svg .quadrant rect {
fill: #313244 !important;
}
.mermaid svg .quadrant text {
font-size: 0.8rem !important;
}
@darvid
darvid / .vscode-settings.json
Last active December 4, 2024 03:23
eslint flat config + next 15 + blood and tears πŸ’’
{
"eslint.lintTask.enable": true,
"eslint.lintTask.options": "--flag unstable_ts_config",
"eslint.options": {
"flags": [
"unstable_ts_config"
],
},
"eslint.workingDirectories": [
"./frontend"
@darvid
darvid / Dockerfile
Last active September 4, 2024 19:31
☁️ 🐍 Amazon Linux 2023 + Python 3.12 (containers)
# syntax=docker/dockerfile:1.9.0-labs
ARG PYTHON_VERSION=3.12
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION} AS lambda-python
ARG PYTHON_VERSION
ENV PYTHON_VERSION=${PYTHON_VERSION}
ARG PYTHON_VERSION
FROM public.ecr.aws/amazonlinux/amazonlinux:2023 AS al2023-python
ARG PYTHON_VERSION
ENV PYTHON_VERSION=${PYTHON_VERSION}
@darvid
darvid / .prettierrc.json
Last active November 9, 2024 06:12
πŸ’… eslint
{
"bracketSameLine": false,
"bracketSpacing": true,
"plugins": [
"prettier-plugin-pkg",
"prettier-plugin-sh",
"prettier-plugin-css-order",
"prettier-plugin-tailwindcss"
],
"printWidth": 80,
@darvid
darvid / catppuccin-mocha.css
Last active December 19, 2023 02:04
πŸˆβ€β¬› πŸ“’ πŸŒ™ catppuccin CSS color variables + Obsidian Mermaid theming
/* catppuccin mocha πŸˆβ€β¬› πŸŒ™ */
:root {
--mocha-rosewater: #f5e0dc;
--mocha-flamingo: #f2cdcd;
--mocha-pink: #f5c2e7;
--mocha-mauve: #cba6f7;
--mocha-red: #f38ba8;
--mocha-maroon: #eba0ac;
--mocha-peach: #fab387;
--mocha-yellow: #f9e2af;
@darvid
darvid / fcd.fish
Created October 29, 2023 00:12
🐚✨ Fuzzy cd with fd and fzf (adaptable to any shell)
function fcd -d "fuzzy cd with fd + fzf"
cd (fd -t d "$argv" | fzf --scheme path)
end
@darvid
darvid / install_pycurl.sh
Created October 20, 2023 18:12
(Linux/Home)brew + openSSL + curl + pycurl + recent pip
brew uninstall --ignore-dependencies curl
env LDFLAGS="-L $(brew --prefix openssl)/lib" CPPFLAGS="-I$(brew --prefix openssl)/include" pip install --no-cache-dir --compile --config-settings="--with-openssl=1" pycurl
@darvid
darvid / uuid6.sql
Created August 11, 2023 01:38 — forked from fabiolimace/UUIDv6.sql
Functions for generating UUIDv6 and UUIDv7 on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@darvid
darvid / uuid6.sql
Created August 11, 2023 01:38 — forked from fabiolimace/UUIDv6.sql
Functions for generating UUIDv6 and UUIDv7 on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@darvid
darvid / README.md
Created June 29, 2021 01:21
poe.ninja API integration for LED tickers

Use [Google Apps Script][1] to create a web service, plop this in, and deploy. You will need to authorize permissions and allow "Anyone" to access the API. (Nothing sensitive is served by this app, obviously; it's just pulling poe.ninja data. Your LED ticker needs to be able to access it, though.)

To hook it up to your LED ticker, go to its settings page, enable Custom API, and enter the following values:

  • ensure https is checked
  • host: script.google.com