Skip to content

Instantly share code, notes, and snippets.

View hungdoansy's full-sized avatar
📺

Hung Doan hungdoansy

📺
View GitHub Profile
@rebane2001
rebane2001 / glass-with-controls.html
Last active July 10, 2025 05:34
glass effect test css/svg thing (messy) - demo: https://codepen.io/rebane2001/details/OPVQXMv
<div style="position:absolute;top:-999px;left:-999px">
<svg
id="effectSvg"
width="200"
height="200"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg">
<filter id="displacementFilter4">
@tinylucid
tinylucid / config
Created May 7, 2024 08:20
Ghostty config
font-family = Berkeley Mono
font-style = Regular
font-size = 13
font-thicken = true
adjust-underline-position = 40%
adjust-underline-thickness = -60%
cursor-style = block
cursor-style-blink = false
@erdesigns-eu
erdesigns-eu / Avatar-Colors.js
Created October 23, 2023 13:12
Generate colors based on initials (for use in avatar)
// Generate a color based on letters.
export const generateColor = (letters) => {
// Generate a simple hash from a string
const getHashOfString = (str) => {
let hash = 0;
for (let i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash);
}
hash = Math.abs(hash);
@kettanaito
kettanaito / README.md
Last active June 3, 2025 15:24
Chromium on Vercel (serveless)

Chromium on Vercel (serverless)

This is an up-to-date guide on running Chromium in Vercel serverless functions in 2022. What you will read below is the result of two days of research, debugging, 100+ failed deployments, and a little bit of stress.

Getting started

Step 1: Install dependencies

Use chrome-aws-lambda that comes with Chromium pre-configured to run in serverless, and puppeteer-core due to the smaller size of Chromium distributive.

@bradtraversy
bradtraversy / tailwind-webpack-setup.md
Last active July 17, 2025 09:12
Setup Webpack with Tailwind CSS

Webpack & Tailwind CSS Setup

Create your package.json

npm init -y

Create your src folder

Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.

@huytd
huytd / wordle.md
Last active July 11, 2025 16:33
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@csandman
csandman / README.md
Last active October 11, 2023 10:23
Chakra UI React Select

Chakra React Select

UPDATE: I finally made an NPM package for this component! It is made with TypeScript, and now has a fully customizable styling system. It is also far ahead of this wrapper at this point. Check it out here if you'd like: https://github.com/csandman/chakra-react-select

In order to use this component, you can implement it and use it like you would normally use react-select. It should accept all of the props that the original takes, however customizing the theme or the components could break this implementation. There are also a few extra things you can do with this wrapper that pull from the chakra library.

  • You can pass the size prop with either sm, md, or lg. These will reflect the sizes available on the Chakra <Input /> component (with the exception of xs because it's too small to work).
  • In your options objects, you can add the key isFixed to emulate the exa
@nvtuan305
nvtuan305 / normalize_string.go
Created December 4, 2020 08:40
golang: normalize string (include Vietnamese)
package main
import (
"fmt"
"golang.org/x/text/runes"
"golang.org/x/text/transform"
"golang.org/x/text/unicode/norm"
"strings"
"unicode"
)
@aanari
aanari / set-alacritty-default.sh
Last active June 15, 2025 21:10
Set Alacritty as Default Terminal Editor (Ubuntu)
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator $(which alacritty) 50
sudo update-alternatives --config x-terminal-emulator
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active July 15, 2025 06:35
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.