Skip to content

Instantly share code, notes, and snippets.

View victorbruce's full-sized avatar
👨‍💻
focused

Victor Bruce victorbruce

👨‍💻
focused
View GitHub Profile
@ChrisDobby
ChrisDobby / hookRef.tsx
Created July 30, 2019 19:58
Example of React component in Typescript using the useRef hook
import * as React from "react";
function HookRef() {
const divRef = React.useRef<HTMLDivElement>(null);
React.useEffect(() => {
if (divRef.current) {
console.log(`hookRef div width: ${divRef.current.clientWidth}`);
}
}, []);
@victorbruce
victorbruce / Firebase.md
Last active March 12, 2024 12:07
My journey with Firebase so far. Cheatsheet to serve as a quick reference when developing firebase applications

Firebase

Set up firebase and Deploy

  • Head over to firebase. Sign in and create a project.

  • Copy your project settings under Firebase SDK snippet into your local project (ie your project's api key, auth domain, databaseURL, etc)

  • Create a file (firebase.js or config.js Any name that suits you is fine)

@bradtraversy
bradtraversy / docker-help.md
Last active July 1, 2024 01:13
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@rveitch
rveitch / sass-7-1-pattern.scss
Last active June 24, 2024 12:21
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel