Skip to content

Instantly share code, notes, and snippets.

View darrenbutcher's full-sized avatar

Darren Butcher darrenbutcher

  • Hack by Design
  • Toronto, Canada/St. Maarten
View GitHub Profile
@itsMapleLeaf
itsMapleLeaf / example.tsx
Last active August 14, 2025 13:59
React suspense with Convex
import { Suspense } from 'react'
import { api } from 'convex/_generated'
import { useQuerySuspense } from './useQuerySuspense'
function App() {
return (
<Suspense fallback="Loading...">
<TodoList />
</Suspense>
)
@pesterhazy
pesterhazy / building-sync-systems.md
Last active October 27, 2025 18:10
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

@benjtinsley
benjtinsley / Tailwind Config - Stripped Version
Last active November 10, 2021 10:53
Tailwind Config Stripped Version, which has been stripped of all default Tailwind values in order to ensure only the absolute necessary styles are generated into classes.
/*
Tailwind - The Utility-First CSS Framework
A project by Adam Wathan (@adamwathan), Jonathan Reinink (@reinink),
David Hemphill (@davidhemphill) and Steve Schoger (@steveschoger).
Welcome to the Tailwind config file. This is where you can customize
Tailwind specifically for your project. Don't be intimidated by the
@swalkinshaw
swalkinshaw / tutorial.md
Last active October 24, 2025 14:52
Designing a GraphQL API
const env = process.env.ENV || 'development';
const configs = {
development: {
api: 'https://api.staging.com',
},
staging: {
api: 'https://api.staging.com',
},
production: {
@xujiaao
xujiaao / android-studio-disable-test-only-mode.md
Last active May 16, 2024 16:16
Disable 'testOnly' mode for Android Studio 3.0
tags
Android
Android Studio

Disable 'testOnly' mode for Android Studio 3.0

Name of thing Sorta like... Mounted? Can you even setState? What would you say... ya do here?
constructor initialize() nope nope init stuff NO side effects
componentWillMount beforeDomReady() nope yeah but don't Only needed in createClass now use constructor for most things
render render nope please no render stuff and don't set any state please
componentDidMount domReady() yup yup DOM is a go init jQuery plugins dispatch stuff
componentWillReceiveProps onChange() yup yup
@posener
posener / go-kit.md
Last active February 23, 2024 21:35
Why I Recommend to Avoid Using the go-kit Library

Why I Recommend to Avoid Using the go-kit Library

There is a trending 'microservice' library called go-kit. I've been using the go-kit library for a while now. The library provide a lot of convenience integrations that you might need in your service: with service discovery with Consul, distributed tracing with Zipkin, for example, and nice logic utilities such as round robin client side load balancing, and circuit breaking. It is also providing a way to implement communication layer, with support of RPC and REST.

@JonCole
JonCole / Redis-BestPractices-General.md
Last active October 22, 2025 09:55
Redis Best Practices

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

@mxstbr
mxstbr / Readme.md
Last active October 20, 2024 20:44
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':