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 / README.md
Last active March 7, 2018 00:56
Reveal Airbnb Wish List content without creating Airbnb account

By default, the Wish List content is blurred and hidden behind a signup prompt.

You can copy/paste the bookmarklet code from bookmarklet.js into your Chrome JavaScript console (F12) and run it there. As of today, doing so will reveal the Wish List content.

@gitname
gitname / META.md
Created November 25, 2017 23:31
CodeSandbox project demonstrating Issue #59 in `patientslikeme/react-calendar-heatmap`
@gitname
gitname / example.html
Created November 22, 2017 08:14
Construct copyright date range on client
<html>
<head>
<!-- ... -->
</head>
<body>
<!-- ... -->
@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

@gitname
gitname / http-redirect.html
Created November 1, 2014 21:28
HTTP Redirect in HTML
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1; url=http://example.com/">
<title>Redirecting...</title>
</head>
<body>
Redirecting...
</body>
@gitname
gitname / plugin-file.php
Created October 30, 2014 20:19
WordPress Plugin File Protection Instruction
<?php
/*
Plugin Name: My Plugin
Description: My Plugin
*/
// Put this instruction after the opening comments to disallow users from accessing the plugin file directly.
defined('ABSPATH') or die('Access denied. <a href="javascript:history.back();" title="Go back">Go back</a>');
@gitname
gitname / index.html
Last active August 29, 2015 14:08
WordPress Plugin Directory Protection Page
Access denied. <a href="javascript:history.back();" title="Go back">Go back</a>