Skip to content

Instantly share code, notes, and snippets.

View joshuaherman's full-sized avatar

Joshua Herman joshuaherman

View GitHub Profile
@joshuaherman
joshuaherman / react-native-maps-enable-google-maps-instructions.md
Last active May 11, 2017 06:15 — forked from heron2014/react-native-maps-enable-google-maps-instructions.md
Visual instructions how to enable Google Maps on IOS using react-native-maps

Visual instructions how to enable Google Maps on IOS using react-native-maps

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

2. cd GoogleMapPlayground

@joshuaherman
joshuaherman / isPrime
Last active August 2, 2016 02:19
isPrime - Java
static boolean isPrime(<T> num) {
if (num == 1 || num == 2 || num == 3 || num == 5 || num == 7) {
return true;
}else if (num % 2 == 0 || num % 5 == 0 || num % 3 == 0) {
return false;
}else{
return true;
}
}
#!/bin/bash
# GUI-related packages
pkgs="
xserver-xorg-video-fbdev
xserver-xorg xinit
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa
gstreamer1.0-libav
epiphany-browser
#!/bin/bash
while true
do
wget -q --tries=10 --timeout=20 -O - http://google.com > /dev/null
if [[ $? -eq 0 ]]; then
echo $(date) "1" | tee -a log.csv
else
echo $(date) "0" | tee -a log.csv
fi