Skip to content

Instantly share code, notes, and snippets.

@bvaughn
bvaughn / index.md
Last active April 19, 2024 04:34
How to use profiling in production mode for react-dom

React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.

Table of Contents

Profiling in production

React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.

@rtviii
rtviii / masif.py
Created April 19, 2024 04:32 — forked from edraizen/masif.py
MaSIF pymol plugin, merged to avoid finding correct paths
# Pablo Gainza Cirauqui 2016 LPDI IBI STI EPFL
# This pymol plugin for Masif just enables the load ply functions.
import os, sys
import math, re
from pymol import cmd, stored
import sys
from pymol import cmd, stored
@martinsam16
martinsam16 / docker-wsl2.md
Last active April 19, 2024 04:25
How to install wsl2 ubuntu + docker + docker-compose

Activate wsl2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install and Configure Ubuntu

@alialacan
alialacan / SwipeDetector.cs
Last active April 19, 2024 04:25
Simple Swipe Detection Script For Unity3D Mobile Development
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class SwipeDetector : MonoBehaviour
{
private Vector2 fingerDownPos;
private Vector2 fingerUpPos;
@jacksonrakena
jacksonrakena / Installing_MinGW_on_Windows.md
Last active April 19, 2024 04:25
Installing MinGW (GCC C++) and Geany, for ENGR 101 at VUW

Guide written by Jackson with help and pictures from Gold

This guide details how to install MinGW/clang, and ENGR 101's preferred code editor, Geany, on a Windows or macOS operating system. Linux users (who probably don't need any guide) should follow the guide on the ECS wiki.

If you've already got mingw/clang installed, skip to the bottom to install Geany.

Installing MinGW (or clang)

This guide details how to install MinGW, the GNU C/C++ compiler, on a Windows or macOS operating system (clang).

@TriMill
TriMill / gen-unicode-list.py
Created February 28, 2020 00:04
List of all (non-control) Unicode characters with codepoint and Unicode descriptor (as given by python module "unicodedata").
#!/usr/bin/python
import unicodedata
import math
MIN_CHAR=0x20
MAX_CHAR=0x100000
PROGRESS=0x8000
print("|%s|" % ("*"*math.ceil((MAX_CHAR-MIN_CHAR) / PROGRESS)))
@samgooi4189
samgooi4189 / bcm57765or57785fix
Last active April 19, 2024 04:20
Fixing Broadcom Corporation BCM57765/57785 SDXC/MMC Card Reader
Follow the WORKAROUND:
1. Add a comand to /etc/rc.local, add the following line above "exit 0":
setpci -s 00:1c.2 0x50.B=0x41
2. Add the same comand to /etc/apm/resume.d/21aspm (which does not exist yet):
setpci -s 00:1c.2 0x50.B=0x41
3. Add the following to /etc/modprobe.d/sdhci.conf:
options sdhci debug_quirks2=4
4. Re-generate initrd:
sudo update-initramfs -u -k all
5. Reboot or reload sdhci module: