Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
Open to new opportunities

Glenn 'devalias' Grant 0xdevalias

👀
Open to new opportunities
View GitHub Profile
@LitileXueZha
LitileXueZha / debug-react-source-code.md
Last active Jul 10, 2022
Debug react source code on yourself custom builds with source map.
View debug-react-source-code.md

Debug react source code on yourself custom builds with source map. First of all, read offical guide How to Contribute and be familiar with it's build flow.

Clone the repository, use specified branch or tag, eg: v16.8.0:

$ git clone --depth 1 --branch v16.8.0 [repo url]
$ cd ./react
$ yarn
...
AssertionError [ERR_ASSERTION]: Current node version is not supported for development
View Bob-Ledger.md

1. Plug in Ledger, open Ledger Live and update device firmware to latest

Screen Shot 2021-07-07 at 9 07 44 AM

2. Go to Settings -> Expirimental Features

Screen Shot 2021-07-07 at 9 07 51 AM

3. Enable "Developer mode"

@goran-peoski-work
goran-peoski-work / lazy.ts
Last active Jul 7, 2021
Dynamic import of omponent
View lazy.ts
import React, { ComponentType, LazyExoticComponent } from "react";
type Transformer = <T>(name: keyof T) => (module: T) => { default: T[keyof T] };
const transformer: Transformer = (
(name) => (module) => ({ default: module[name] })
);
@KoryNunn
KoryNunn / handshake-airdrop.md
Last active Apr 3, 2022
Handshake airdrop for github users.
View handshake-airdrop.md

Had 15 github followers in 2019? You can get about $4kAUD of crypto for minimal effort.

Explain this scam

That's legitimately a good default position to hold, however, in this case, the free money is a function of time, and not only charity.

In February 2020, in order to promote Handshake (HNS) to developers, an airdrop was offered to any Github user with more than 15 followers. The Airdrop would give you 4246HNS, at the time worth around at $0.08USD per coin, for a total of $339.68USD, pretty generous!

Today, 4246HNS is worth around $4000 dollarydoos, and there are plenty of github users who haven't claimed theirs.

@djs55
djs55 / docker-desktop-mutagen-builds.md
Last active Jul 25, 2020
Development builds containing the Docker Desktop + Mutagen integration
View docker-desktop-mutagen-builds.md

This is a list of Docker Desktop for Mac development builds which contain mutagen. These are based on Edge, but may contain unexpected bugs. They should be used for testing the Mutagen feature rather than for production work.

2020-07-14: development snapshot: https://desktop-stage.docker.com/mac/edge/46638/Docker.dmg

  • Exclude files from a mutagen sync based on the .dockerignore file.
  • Flush around docker exec as well as docker run for more reliable scripting.
  • Fix a bug which could result in duplicates in the list of synchronised directories.
  • Allow the sync to be bypassed by using :consistent or :cached. In particular this means if you want the previous :delegated behaviour before mutagen, switch to :cached. This
View Keybase
### Keybase proof
I hereby claim:
* I am moloch-- on github.
* I am moloch (https://keybase.io/moloch) on keybase.
* I have a public key whose fingerprint is 0E59 543B A7BC 269F 3AAE 707E B705 0578 9B38 EEA6
To claim this, I am signing this object:
@zachboyd
zachboyd / AWSSubscriptionClient.ts
Last active Nov 4, 2021
Appsync Subscription support for subscriptions-transport-ws
View AWSSubscriptionClient.ts
import { uniqBy } from 'lodash';
import { ClientOptions, SubscriptionClient } from 'subscriptions-transport-ws';
export class AWSSubscriptionClient extends SubscriptionClient {
constructor(
url: string,
options?: ClientOptions,
webSocketImpl?: any,
webSocketProtocols?: string | string[]
) {
@jacobmix
jacobmix / SyncLoungeDockerGuide.md
Last active Apr 21, 2020
SyncLounge Docker guide
View SyncLoungeDockerGuide.md

Here's how you set up on SyncLounge with Docker (Now with Markdown):
First make sure you got the Docker Hub in your registry:
Regisry

Download the latest SyncLounge image:
Image

Launch the image, and go to advanced settings:
Create Container

@joecot
joecot / synclounge-selfhosted-nodocker.md
Last active Oct 16, 2021
Synclounge Selfhosted Without Docker
View synclounge-selfhosted-nodocker.md

Self Hosted SyncLounge (without Docker)

This is a quick howto for self-hosting SyncLounge, a useful tool for hosting watch parties for your Plex server.

If you just want to host a plex party, you can use the public synclounge.tv server. If you want to use Docker instead of mucking about with Node, the SyncLounge readme describes it. This is for running the NodeJS yourself.

You don't need programming experience to set SyncLounge up, but without a passable experience configuring linux, you're probably better off using synclounge.tv instead.

Server Pre-Reqs

@slikts
slikts / advanced-memo.md
Last active Aug 8, 2022
Advanced memoization and effects in React
View advanced-memo.md

nelabs.dev

Advanced memoization and effects in React

Memoization is a somewhat fraught topic in the React world, meaning that it's easy to go wrong with it, for example, by [making memo() do nothing][memo-pitfall] by passing in children to a component. The general advice is to avoid memoization until the profiler tells you to optimize, but not all use cases are general, and even in the general use case you can find tricky nuances.

Discussing this topic requires some groundwork about the technical terms, and I'm placing these in once place so that it's easy to skim and skip over:

  • Memoization means caching the output based on the input; in the case of functions, it means caching the return value based on the arguments.
  • Values and references are unfortunately overloaded terms that can refer to the low-level implementation details of assignments in a language like C++, for example, or to memory