Skip to content

Instantly share code, notes, and snippets.

View matthargett's full-sized avatar

Matt Hargett matthargett

View GitHub Profile
// include/linux/stddef.h
#undef false
#undef true
// include/linux/compiler-gcc4.h
#undef __always_inline
// include/linux/types.h
#define fd_set mock_fd_set
#define dev_t mock_dev_t
@matthargett
matthargett / psm-compilation-fix-with-cleanups.diff
Created April 19, 2013 04:19
patch that fixes compilation of MonoGame.PSM project, along with some cleanups suggested by ReSharper.
diff --git a/MonoGame.Framework/Content/ContentManager.cs b/MonoGame.Framework/Content/ContentManager.cs
old mode 100644
new mode 100755
diff --git a/MonoGame.Framework/Content/ContentTypeReaderManager.cs b/MonoGame.Framework/Content/ContentTypeReaderManager.cs
old mode 100644
new mode 100755
index 484abce..fe41140
--- a/MonoGame.Framework/Content/ContentTypeReaderManager.cs
+++ b/MonoGame.Framework/Content/ContentTypeReaderManager.cs
@@ -156,7 +156,7 @@ namespace Microsoft.Xna.Framework.Content
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 7f8aa6de894ceafc7078aa01522e3b341c6a3c6d
Last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: 8-core 64-bit ivybridge
OS X: 10.11.3-x86_64
Your system is ready to brew.
@matthargett
matthargett / ts-vs-flow.md
Created November 19, 2018 21:00
TypeScript versus flowtype

First, let's note the difference in philosophy: TypeScript aims for fast analysis because you can to compile it down to JS before you can run/test it. flowtype is meant to be an async analysis that can run continuously with changes since the last analysis, or in parallel with your eslint and bundler rules. As such, flowtype's type system and analysis is not quite as concerned with speed or memory usage in service of potentially finding more bugs.

On two occasions I have tried to roll out flow in React Native applications, and on those two occasions we ended up backing out after a few weeks. Some detail: flow doesn't have a public roadmap, and what version you use is dictated by the react/react-native dependency and the annotations in react-native itself. flowtype also has some hard-coded aspects to help the analysis for React, so major updates to React itself sometimes also require updating flowtype to match. React Native upgrades then get gated based on your dependent libraries (or flow-typed) being updated