Skip to content

Instantly share code, notes, and snippets.

@GollyJer
GollyJer / react-native-gifted-chat+0.9.11.patch
Created Oct 29, 2019
Patch react-native-gifted-chat to eliminate need for sizing code. Allows the chat data to stay cached.
View react-native-gifted-chat+0.9.11.patch
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 Apr 1, 2018
Visual Studio Code - Python debugger configurations.
View launch.json
{
// 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 Apr 4, 2017
React Native Button
View rn-button.js
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 / StatelessComponentStuctures.js
Created Feb 24, 2017
Different ways to structure stateless React Components.
View StatelessComponentStuctures.js
import React from 'react';
import {
StyleSheet,
Text,
View,
Image
} from 'react-native';
const styles = StyleSheet.create({
@GollyJer
GollyJer / AndroidStyleDrawerNavigationExample.js
Last active Feb 24, 2017
Android Style Drawer Navigation example using reactnavigation.org and Exponent-js
View AndroidStyleDrawerNavigationExample.js
import Exponent from 'exponent';
import React from 'react';
import {
Button,
Platform,
StatusBar,
StyleSheet,
Text,
TouchableHighlight,
View,
@GollyJer
GollyJer / CloseExplorerFolder.ahk
Last active Feb 24, 2017
Use Autohotkey to close a Windows Explorer folder by name.
View CloseExplorerFolder.ahk
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%