Skip to content

Instantly share code, notes, and snippets.

@GollyJer
GollyJer / react-native-gifted-chat+0.9.11.patch
Created October 29, 2019 19:02
Patch react-native-gifted-chat to eliminate need for sizing code. Allows the chat data to stay cached.
diff --git a/node_modules/react-native-gifted-chat/lib/GiftedChat.js b/node_modules/react-native-gifted-chat/lib/GiftedChat.js
index 7f3f4b5..78ea7a1 100644
--- a/node_modules/react-native-gifted-chat/lib/GiftedChat.js
+++ b/node_modules/react-native-gifted-chat/lib/GiftedChat.js
@@ -1,6 +1,13 @@
import PropTypes from 'prop-types';
import React from 'react';
-import { Animated, Platform, StyleSheet, View, SafeAreaView, } from 'react-native';
+import {
+ Animated,
@GollyJer
GollyJer / launch.json
Created April 1, 2018 14:51
Visual Studio Code - Python debugger configurations.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: File with Terminal",
"type": "python",
"request": "launch",
@GollyJer
GollyJer / rn-button.js
Last active April 4, 2017 19:38
React Native Button
import React from 'react';
import { Text, TouchableNativeFeedback, TouchableOpacity, View, Platform } from 'react-native';
import styles from './styles.js';
const Button = ({ color, onPress, title, disabled }) => {
let Touchable;
const buttonStyle = [styles.button];
const textStyle = [styles.text];
switch (Platform.OS) {
@GollyJer
GollyJer / AndroidStyleDrawerNavigationExample.js
Last active February 24, 2017 18:33
Android Style Drawer Navigation example using reactnavigation.org and Exponent-js
import Exponent from 'exponent';
import React from 'react';
import {
Button,
Platform,
StatusBar,
StyleSheet,
Text,
TouchableHighlight,
View,
@GollyJer
GollyJer / CloseExplorerFolder.ahk
Last active February 24, 2017 18:22
Use Autohotkey to close a Windows Explorer folder by name.
CloseExplorerFolder(win_title) {
WinGet, vwinID, List, ahk_class CabinetWClass
;MsgBox,0x1000,,there are %vWinID% windows of CabinetWClass open.
Loop, %vWinID% {
x := vWinID%A_Index%
WinGetTitle, wt, ahk_id %x%
if (wt == win_title) {
Winclose, ahk_class CabinetWClass
}
;msgBox,0x1000,, index=%a_Index% of %vWinID%`nwt=%wt%
@GollyJer
GollyJer / StatelessComponentStuctures.js
Created February 24, 2017 18:17
Different ways to structure stateless React Components.
import React from 'react';
import {
StyleSheet,
Text,
View,
Image
} from 'react-native';
const styles = StyleSheet.create({