Skip to content

Instantly share code, notes, and snippets.

View gieoon's full-sized avatar

gieoon gieoon

View GitHub Profile
@cheadrian
cheadrian / Chrome Extension Manifest V3 Firebase Javascript.md
Last active February 25, 2026 08:28
Insert Firebase inside website using Chrome Extension with Manifest V3. Web Version 9 CDN modular Firebase Firestore local JS.
@krabs-github
krabs-github / JavaScript - Determine if Hex Color is Light or Dark.js
Last active September 2, 2025 12:51
[JavaScript - Determine if Hex Color is Light or Dark] JavaScript - Determine if Hex Color is Light or Dark #JavaScript
function lightOrDark(color) {
// Check the format of the color, HEX or RGB?
if (color.match(/^rgb/)) {
// If HEX --> store the red, green, blue values in separate variables
color = color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);
r = color[1];
g = color[2];
@jordienr
jordienr / Gradient.js
Created September 12, 2021 00:23
Stripe Mesh Gradient WebGL
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/
@devhammed
devhammed / countries.json
Last active February 22, 2026 01:04
Countries with Name, Dial Code, Emoji Flag and ISO Code
[
{
"name": "Afghanistan",
"flag": "πŸ‡¦πŸ‡«",
"code": "AF",
"dial_code": "+93"
},
{
"name": "Γ…land Islands",
"flag": "πŸ‡¦πŸ‡½",
@lenkan
lenkan / use-location.js
Created March 2, 2019 18:26
React hook that keeps up to date with the current location.
// @ts-check
import { useState, useEffect } from 'react'
function getCurrentLocation () {
return {
pathname: window.location.pathname,
search: window.location.search
}
}
@MikaelCarpenter
MikaelCarpenter / react-select-data-attributes.jsx
Created December 14, 2018 19:09
Solution for adding data attributes to a react-select component by passing in "custom components" where you've manipulated the innerProps prop
import React, { Component } from 'react';
import ReactSelect, { components } from 'react-select';
const TextOption = props => (
components.Option && (
<components.Option { ...props }>
...
</components.Option>
)
);
@rasmi
rasmi / setup.md
Last active January 30, 2025 08:11
Python development environment setup on Chromebook

Python development environment setup on Chromebook

(also works for a minimal Linux install)

Check for updates

Do this first!

sudo apt-get update && sudo apt-get dist-upgrade
@rameerez
rameerez / add-new-website.sh
Last active June 12, 2024 23:56
Script to set up a new site with SSL cert in a Unix (Apache VirtualHost) server
#!/bin/sh
# Should be run as sudo
# Usage: add-new-website.sh domain -- script to set up a new site with SSL cert
# where:
# domain website domain without subdomains (ex: example.com)
if [ ! -z "$1" ]
then
@stephenfjohnson
stephenfjohnson / makerLink.js
Created April 16, 2018 16:08
Maker Link with React Styled Components