Skip to content

Instantly share code, notes, and snippets.

@jehartzog
jehartzog / Contract Killer 3.md
Created June 22, 2016 18:31
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@jehartzog
jehartzog / react-native-material-textfield+0.12.0.patch
Last active July 18, 2020 16:15
Quick Patch for react-native-material-textfield for RN 63
diff --git a/node_modules/react-native-material-textfield/src/components/affix/index.js b/node_modules/react-native-material-textfield/src/components/affix/index.js
index d6c9d64..f2e77ff 100644
--- a/node_modules/react-native-material-textfield/src/components/affix/index.js
+++ b/node_modules/react-native-material-textfield/src/components/affix/index.js
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
-import { Animated } from 'react-native';
+import { Animated, Text } from 'react-native';
@jehartzog
jehartzog / react-native-material-buttons+0.5.0.patch
Created July 18, 2020 16:16
Patch react-native-material-buttons for RN 63
diff --git a/node_modules/react-native-material-buttons/src/components/button/index.js b/node_modules/react-native-material-buttons/src/components/button/index.js
index 40d89e6..f248d20 100644
--- a/node_modules/react-native-material-buttons/src/components/button/index.js
+++ b/node_modules/react-native-material-buttons/src/components/button/index.js
@@ -69,6 +69,7 @@ export default class Button extends PureComponent {
toValue: 1,
duration: focusAnimationDuration,
easing: Easing.out(Easing.ease),
+ useNativeDriver: true,
})
@jehartzog
jehartzog / react-native-material-dropdown+0.11.1.patch
Created July 18, 2020 16:17
Patch for react-native-material-dropdown RN 63
diff --git a/node_modules/react-native-material-dropdown/src/components/dropdown/index.js b/node_modules/react-native-material-dropdown/src/components/dropdown/index.js
index b1e65a1..d812b5d 100644
--- a/node_modules/react-native-material-dropdown/src/components/dropdown/index.js
+++ b/node_modules/react-native-material-dropdown/src/components/dropdown/index.js
@@ -133,7 +133,7 @@ export default class Dropdown extends PureComponent {
disabledItemColor: PropTypes.string,
baseColor: PropTypes.string,
- itemTextStyle: Text.propTypes.style,
+ itemTextStyle: PropTypes.any,
@jehartzog
jehartzog / react-native+0.63.1.patch
Created July 19, 2020 16:19
Patch Pressable to remove initial delay
diff --git a/node_modules/react-native/Libraries/Pressability/Pressability.js b/node_modules/react-native/Libraries/Pressability/Pressability.js
index 37555d5..82190ed 100644
--- a/node_modules/react-native/Libraries/Pressability/Pressability.js
+++ b/node_modules/react-native/Libraries/Pressability/Pressability.js
@@ -277,14 +277,14 @@ const isTerminalSignal = signal =>
signal === 'RESPONDER_TERMINATED' || signal === 'RESPONDER_RELEASE';
const DEFAULT_LONG_PRESS_DELAY_MS = 370; // 500 - 130
-const DEFAULT_PRESS_DELAY_MS = 130;
+const DEFAULT_PRESS_DELAY_MS = 0;
@jehartzog
jehartzog / gist:9490e310a07d74a546c680a27c4a339a
Last active October 5, 2020 23:22
Iterable Android Notification Action not fired at App Load Workaround
const getIterableInternalData = (payload: IterablePushPayload): any =>
Platform.OS === 'android'
? JSON.parse((payload as IterablePushPayloadAndroid).itbl)
: (payload as IterablePushPayloadIOS).itbl;
const doAndroidAppLoadCheck = async () => {
if (Platform.OS !== 'android') {
return;
}
@jehartzog
jehartzog / gist:ef5e4091d18176c55a84b67c9e5358b7
Created December 23, 2020 22:07
RN Patch to fix SectionList header remount when switching to/from empty section array
diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js b/node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js
index 53eb54b..d870b3b 100644
--- a/node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js
+++ b/node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js
@@ -173,7 +173,7 @@ class VirtualizedSectionList<
_computeState(props: Props<SectionT>): State {
const offset = props.ListHeaderComponent ? 1 : 0;
- const stickyHeaderIndices = [];
+ const stickyHeaderIndices = [0];
@jehartzog
jehartzog / react-navigation-drawer+2.5.0.patch
Last active March 5, 2021 17:49
react-navigation-drawer 2.5.0 prevent initial render flash
diff --git a/node_modules/react-navigation-drawer/lib/module/views/Drawer.js b/node_modules/react-navigation-drawer/lib/module/views/Drawer.js
index 352ca07..0f5dad4 100644
--- a/node_modules/react-navigation-drawer/lib/module/views/Drawer.js
+++ b/node_modules/react-navigation-drawer/lib/module/views/Drawer.js
@@ -60,6 +60,10 @@ export default class Drawer extends React.PureComponent {
constructor(...args) {
super(...args);
+ _defineProperty(this, "state", {
+ isReady: false,
@jehartzog
jehartzog / react-native-reanimated+2.0.0.patch
Created March 17, 2021 14:51
iOS fix build Reanimated 2.0.0 RN 64 w/ Hermes
diff --git a/node_modules/react-native-reanimated/RNReanimated.podspec b/node_modules/react-native-reanimated/RNReanimated.podspec
index 6cdf6ac..2852ea0 100644
--- a/node_modules/react-native-reanimated/RNReanimated.podspec
+++ b/node_modules/react-native-reanimated/RNReanimated.podspec
@@ -85,6 +85,7 @@ Pod::Spec.new do |s|
s.dependency 'Yoga'
s.dependency 'DoubleConversion'
s.dependency 'glog'
+ s.dependency 'hermes-engine'
@jehartzog
jehartzog / react-native-tus-client+1.1.0.patch
Created April 10, 2021 20:59
react-native-tus-client TUSKit Version Fix
diff --git a/node_modules/react-native-tus-client/RNTusClient.podspec b/node_modules/react-native-tus-client/RNTusClient.podspec
index b855287..3f49b50 100644
--- a/node_modules/react-native-tus-client/RNTusClient.podspec
+++ b/node_modules/react-native-tus-client/RNTusClient.podspec
@@ -15,5 +15,5 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '8.0'
s.dependency 'React-Core'
- s.dependency 'TUSKit'
+ s.dependency 'TUSKit', '~> 1.4.2'