Skip to content

Instantly share code, notes, and snippets.

View d-rk's full-sized avatar
🏠
Working from home

d-rk

🏠
Working from home
View GitHub Profile
@JReinhold
JReinhold / global-error-boundary.js
Last active May 3, 2023 18:36
example of a top-level ErrorBoundary component in React that handles React errors, event errors and async rejections.
import React from 'react';
/**
* A default ErrorBoundary that renders children, or if they produce an error, renders the passed
* onError() function, optionally with the error as a prop.
*/
export class GlobalSentryBoundary extends React.Component {
state = { reactError: undefined };
componentDidCatch(error, errorInfo) {
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off