Skip to content

Instantly share code, notes, and snippets.

View jamonholmgren's full-sized avatar

Jamon Holmgren jamonholmgren

View GitHub Profile
@jamonholmgren
jamonholmgren / react-native-yoga-issue.md
Created September 27, 2019 16:40
Issue building React Native ios -- yoga

I was running into a React Native build issue where I was getting this (only captured part of the error message, unfortunately):

Target Support Files/yoga/yoga.xcconfig: unable to open file (in target "yoga" in project "Pods") (in target 'yoga' from project 'Pods')

To fix:

rm -rf ios/build
@jamonholmgren
jamonholmgren / app.js
Created September 25, 2019 02:59
Fast Refresh Issue
// Run `yarn add -D reactotron-react-native` first.
import React from 'react';
import {View, Text} from 'react-native';
import Reactotron from 'reactotron-react-native';
Reactotron.onCustomCommand({
command: 'someCommand',
handler: () => null,
});
Exception 'Given `rootTag` (3) does not correspond to a valid root shadow view instance.' was thrown while invoking createView on target UIManager with params (
15,
RCTRawText,
3,
{
text = hello;
}
)
callstack: (
0 CoreFoundation 0x000000011086b8db __exceptionPreprocess + 331
@jamonholmgren
jamonholmgren / node-gyp-error.md
Created December 20, 2018 00:16
fsevents / Node gyp error

Problem: I ran into a problem where running yarn would result in a weird fsevents error with a large backtrace.

Solution: Delete your yarn.lock file and yarn again.

yarn install v1.12.3
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
@jamonholmgren
jamonholmgren / .zshrc
Created August 2, 2016 06:02
zsh function script to toggle Do Not Disturb mode on a Mac from terminal/command line
# zsh function script to toggle DND on a Mac
function dnd () {
osascript -e "
tell application \"System Events\" to tell process \"SystemUIServer\"
key down option
click menu bar item 1 of menu bar 2
key up option
end tell
"
}
<h2>Wearables</h2>
<p>
Wearable technology is in its infancy, but we are well ahead of the
curve. We can help you write the future, whether you are looking to the
wrist with Android Wear or Apple Watch, or even farther to Virtual
Reality and beyond.
</p>
defmodule AsyncMatrix do
@moduledoc """
Builds a matrix with mutable values using Agent processes.
iex> list = [["x", "x", "o"], ["o", "x", "o"], ["x", "o", "x"]]
[["x", "x", "o"], ["o", "x", "o"], ["x", "o", "x"]]
iex> matrix = AsyncMatrix.from_list(list)
%{0 => %{0 => #PID<0.143.0>, 1 => #PID<0.144.0>, 2 => #PID<0.145.0>},
1 => %{0 => #PID<0.146.0>, 1 => #PID<0.147.0>, 2 => #PID<0.148.0>},
@jamonholmgren
jamonholmgren / blade.js
Last active April 8, 2016 03:01
An idea for a game framework
import Blade from 'blade'
let game = Blade.game({
name: "Swordsman Battle",
version: "1.0.1",
window: "fullscreen"
})
let Swordsman = Blade.object("Swordsman", {
health: 100,
@jamonholmgren
jamonholmgren / .zshrc
Last active May 2, 2016 15:55
My .zshrc
# Update https://gist.github.com/jamonholmgren/6811991b833e6eda47c1
# whenever this changes.
# by Jamon Holmgren
# MIT License, not that that matters much here.
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# ZSH_THEME="random" # To discover new themes
# Favorites: sunrise, apple, jbergantine, gozilla
@jamonholmgren
jamonholmgren / max.exs
Created March 22, 2016 05:06
Doing some testing of how Elixir/BEAM handle multiple processes doing CPU-intensive work.
defmodule Max do
@mdoc """
Spawns a bunch of processes and then tells them all to count to 50,000,000,
and then outputs the index of each process and how long it took in ms.
Example:
iex> Max.start(0, 10, [])
:ok
{7, 3748}