Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠
£$%&in'

Mycroft Canner mycroftcanner

🤠
£$%&in'
  • Romanova
View GitHub Profile
@finestructure
finestructure / make-spm-playground.sh
Last active Aug 12, 2020
Make a playground with access to an SPM library ready for importing
View make-spm-playground.sh
#!/usr/bin/env bash
set -eux
PROJ_NAME=myproj2
PKG_URL=https://github.com/johnsundell/plot.git
PKG_FROM=0.1.0
LIB_NAME=Plot
SWIFT_VERSION=5.1.3
PLATFORM=macos
View shouldIkeepSomethingInReactState.js
function shouldIkeepSomethingInReactState() {
if (canIcalculateItFromProps()) {
// Don't duplicate data from props in state.
// Calculate what you can in render() method.
return false;
}
if (!amUsingItInRenderMethod()) {
// Don't keep something in the state
// if you don't use it for rendering.
@ethanhuang13
ethanhuang13 / xcode-beta-slink.sh
Last active Aug 21, 2020
Symbolic link from Xcode.app to Xcode-beta.app (Xcode 11.2)
View xcode-beta-slink.sh
You can’t perform that action at this time.