Skip to content

Instantly share code, notes, and snippets.

View gitname's full-sized avatar

gitname gitname

  • California, USA
View GitHub Profile
@gitname
gitname / README.md
Last active August 5, 2023 20:46
Deploying Scribble.rs to Digital Ocean

Here are my notes about deploying Scribble.rs to Digital Ocean.

Scribble.rs is an open-source, ad-free alternative to skribbl.io.

Overview of procedure

  1. Create Droplet
  2. Create Docker network
  3. Configure firewall
  4. Install and run Nginx Proxy Manager
@gitname
gitname / README.md
Last active June 10, 2024 09:20
Using `@react-pdf/renderer` with React 18

Using @react-pdf/renderer v3.0.1 with React 18

Introduction

When I tried to use the @react-pdf/renderer package (version 3.0.1) with a React 18 app, two problems arose. In this article, I'll describe those problems and tell you how I solved them.

Update: Here's a video demonstration of the problems and solution described in this article: https://youtu.be/YZP5r7Uy_bU

Problem 1: Dependency Conflict

@gitname
gitname / META.md
Created November 25, 2017 23:31
CodeSandbox project demonstrating Issue #59 in `patientslikeme/react-calendar-heatmap`
@gitname
gitname / Object-Rest-Properties-Syntax-Examples.md
Last active June 24, 2017 02:44
Object Rest Properties Syntax for ECMAScript/JavaScript - Examples

Introduction

I oftentimes find that I have forgotten the object rest properties syntax.

The following is a collection of examples to which I expect to be able to refer in order to remind myself of the rules of the syntax.

Examples

Flat Object

@gaearon
gaearon / connect.js
Last active June 24, 2024 09:43
connect.js explained
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (