This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { transform, isEqual, isObject } from "lodash"; | |
import Reactotron from "reactotron-react-native"; | |
export const stateChanges = (object: any, base: any): Object => { | |
return transform(object, (result, value, key) => { | |
if (!isEqual(value, base[key])) { | |
// @ts-ignore | |
result[key] = | |
isObject(value) && isObject(base[key]) | |
? stateChanges(value, base[key]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DEVICE_HEIGHT = Dimensions.get("window").height; | |
const Screen = () => { | |
const [screenHeight, setScreenHeight] = useState(0); | |
function onContentSizeChange(contentWidth, contentHeight) { | |
setScreenHeight(contentHeight); | |
} | |
const scrollEnabled = screenHeight > DEVICE_HEIGHT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CRYSTAL = crystal | |
UNAME = "$(shell uname -ms)" | |
LIBRARY_PATH = $(shell brew --prefix crystal-lang)/embedded/lib | |
LIBS = -levent -lpcl -lpcre -lgc -lpthread | |
LDFLAGS = -Wl,-undefined,dynamic_lookup | |
TARGET = crystal_example_ext.bundle | |
$(TARGET): crystal_example_ext.o | |
$(CC) -bundle -L$(LIBRARY_PATH) -o $@ $^ $(LIBS) $(LDFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download Oracle Jdk 8 for Linux 32bit from:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-arm-downloads-2187472.html | |
# ... The download should be a file like: jdk-8u33-linux-arm-vfp-hflt.tar.gz | |
# Download JRuby from: http://www.jruby.org/download | |
# ... The download should be a file like: jruby-bin-1.7.18.tar.gz, jruby-bin-9.0.0.0.pre1.tar.gz | |
# Install 'GNURoot' and 'GNURoot Wheezy x86' from app store, see: | |
# [gnuroot app](https://play.google.com/store/apps/details?id=champion.gnuroot&hl=en) | |
# [gnuroot repo](https://github.com/corbinlc) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function AddOrUpdateWebQuery(ByVal URL As String, Optional DontRefresh As Boolean = False) As QueryTable | |
Dim Connection As String: Connection = "URL;" & URL | |
Dim PostText As String: Dim Parts() As String | |
If Len(URL) > 1024 Then | |
' URL exceeds 1K so use HTTP POST to get around the limit | |
Parts = Split(URL, "?", 2) | |
URL = Parts(LBound(Parts)) | |
If UBound(Parts) > LBound(Parts) Then PostText = Parts(UBound(Parts)) |