Skip to content

Instantly share code, notes, and snippets.

View ryee-dev's full-sized avatar

roger yee ryee-dev

View GitHub Profile
@gre
gre / easing.js
Last active June 10, 2025 09:25
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 14, 2025 04:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@cschlyter
cschlyter / sortSelectOption.js
Last active October 2, 2024 10:05
[Javascript] Sort alphabetically the option elements of a select element by text.
function sortSelectOptions(selectElement) {
var options = $(selectElement + " option");
options.sort(function(a,b) {
if (a.text.toUpperCase() > b.text.toUpperCase()) return 1;
else if (a.text.toUpperCase() < b.text.toUpperCase()) return -1;
else return 0;
});
$(selectElement).empty().append( options );
@mfd
mfd / GTWalsheimPro.css
Last active May 31, 2025 16:34
GT Walsheim Pro
@font-face {
font-family: GT Walsheim Pro;
src: local("GT Walsheim Pro Regular"),local("GTWalsheimProRegular"),url(GTWalsheimProRegular.woff2) format("woff2"),url(GTWalsheimProRegular.woff) format("woff"),url(GTWalsheimProRegular.ttf) format("truetype");
font-weight: 400;
font-style: normal
}
@font-face {
font-family: GT Walsheim Pro;
src: local("GT Walsheim Pro Bold"),local("GTWalsheimProBold"),url(GTWalsheimProBold.woff2) format("woff2"),url(GTWalsheimProBold.woff) format("woff"),url(GTWalsheimProBold.ttf) format("truetype");
@rachidbch
rachidbch / cvim.sheetcheat.md
Last active December 30, 2023 11:51
CVIM CheatSheet

Keybindings

  • j, s scroll down scrollDown
  • k, w scroll up scrollUp
  • h scroll left scrollLeft
  • l scroll right scrollRight
  • d scroll half-page down scrollPageDown
  •   scroll full-page down	scrollFullPageDown
    
  • u, e scroll half-page up scrollPageUp
  • scroll full-page up scrollFullPageUp
import React from "react";
import {
useRouter,
Link
} from "@reach/router/unstable-hooks";
function Accounts() {
let route = useRouter({
".": () => <div>boring Accounts</div>,
dope: () => <div>Dope Accounts</div>
function CopyButton({ value }) {
let [copied, setCopied] = React.useState();
let hydrated = usePageIsHydrated();
React.useEffect(() => {
let id = setTimeout(() => setCopied(false), 2000);
return () => clearTimeout(id);
}, [copied]);
return (
<button
@alexilyaev
alexilyaev / emotion-guidelines.md
Last active May 16, 2022 13:50
CSS in JS - Emotion Guidelines

CSS-in-JS

This repo uses a CSS-in-JS library called Emotion for its styling.

Why Emotion?

Emotion is a performant and flexible CSS-in-JS library. Building on many other CSS-in-JS libraries, it allows us to style apps quickly with string or object styles. It has predictable composition to avoid specificity issues in CSS. With source maps and labels, Emotion has a great developer experience and performance with heavy caching in production.

Also, Material UI v5 will most likely use Emotion instead of JSS:
material-ui - [RFC] v5 styling solution

@ryuheechul
ryuheechul / Nix.md
Last active January 30, 2023 19:02
Personal micro wiki for nix(os)