Skip to content

Instantly share code, notes, and snippets.

@chantastic
chantastic / on-jsx.markdown
Last active May 13, 2025 12:04
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@TheBB
TheBB / loading.org
Last active January 4, 2025 09:25
Loading in Spacemacs

Emacs packages, features, files, layers, extensions, auto-loading, require, provide, use-package… All these terms getting you confused? Let’s clear up a few things.

Files

Emacs files contains code that can be evaluated. When evaluated, the functions, macros and modes defined in that file become available to the current Emacs session. Henceforth, this will be termed as loading a file.

One major problem is to ensure that all the correct files are loaded, and in the

@gaearon
gaearon / connect.js
Last active May 3, 2025 05:27
connect.js explained
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (

Fabric Android shell

Overview

This is the doc for fabric-android-shell.sh

Invoking the Fabric plugin by standalone (non-jvm) processes So our plugin has 3 responsibilities:

  • (pre-build) Enable your app on our backend
@hjertnes
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@siepkes
siepkes / bazel-0.11.1-solaris.patch
Last active April 23, 2018 20:17
Patch to make Bazel 0.11.1 dist build on SmartOS (aka Illumos, aka Solaris)
diff -Nuar '--exclude=bazel-*' '--exclude=output' bazel-orig/scripts/bootstrap/buildenv.sh bazel/scripts/bootstrap/buildenv.sh
--- bazel-orig/scripts/bootstrap/buildenv.sh 2018-04-01 14:52:36.150686900 +0000
+++ bazel/scripts/bootstrap/buildenv.sh 2018-04-16 15:39:12.323691231 +0000
@@ -83,6 +83,10 @@
JAVA_HOME="${JAVA_HOME:-/usr/local/openjdk8}"
;;
+solaris)
+ JAVA_HOME="${JAVA_HOME:-/opt/local/java/openjdk8}"
+ ;;