Skip to content

Instantly share code, notes, and snippets.

View simonhlee97's full-sized avatar
🎯
Focusing

Simon simonhlee97

🎯
Focusing
View GitHub Profile
@simonhlee97
simonhlee97 / schema.prisma
Last active September 1, 2022 10:29
prisma schema file - for Seoul Survey Cafe Project
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = "native"
}
@simonhlee97
simonhlee97 / PSYMIN-RHEE-LICENSE.md
Last active August 2, 2022 03:40
the psymin-rhee license

THE PSYMIN-RHEE LICENSE (Ver 1.0)

Simon (aka Psymin) Lee wrote the code for this project. Feel free to use this code for your own learning, building, and projects. No acknowledgement of any kind is required. But if you found some of this code to be helpful, feel free to buy me a cappuccino or burrito if we cross paths 🌯.

@simonhlee97
simonhlee97 / docker_wordpress.md
Created April 29, 2022 07:19 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@simonhlee97
simonhlee97 / fetchData.js
Created April 21, 2022 07:43
simple React example with functional component and fetching data from an api
import React, {useState, useEffect} from 'react'
export default function Test() {
const [users, setUsers] = useState();
const getApiData = async () => {
const response = await fetch(
"https://jsonplaceholder.typicode.com/users/"
).then((response) => response.json());
@simonhlee97
simonhlee97 / README.md
Created March 26, 2022 08:01 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@simonhlee97
simonhlee97 / five-letter-words
Created February 27, 2022 04:54
my-wordle-clone-project
[
'apple',
'chant',
'plant',
'giant',
'trial'
]
@simonhlee97
simonhlee97 / compiled-dark-theme.css
Created November 21, 2021 01:14
simon-sass-lib-dark-thm-compiled-css
@import"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";
* {
color: inherit;
margin: 0
}
body {
font-family: Lato, "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
background-color: #3b444b;
color: #f5f5f5
@simonhlee97
simonhlee97 / heroJumbo.css
Created October 29, 2021 04:36
HeroJumbotron
.hero {
width: 100%;
height: 100vh;
}
.hero-image {
/* "linear-gradient" to add a darken background effect to the image (photographer.jpg). This will make the text easier to read */
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
url('https://images.unsplash.com/photo-1596973161156-9d46c08a13bb?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1587&q=80');
/* Set a specific height */

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@simonhlee97
simonhlee97 / higher-order-comp.js
Last active July 4, 2021 06:07
advanced-react:reusability:HOC
// general syntax for HOC
const upgradedComponent = withSuperPowers(Component);
export default upgradedComponent;
// example:
const componentWithToggle = withToggle(Component);
export default componentWithToggle;
// more concise 1-line version:
export default withToggle(Component);