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 int TRIG_PIN = 4; | |
const int ECHO_PIN = 5; | |
const int BUZZER_PIN = 3; | |
const int DISTANCE_THRESHOLD = 30; | |
// variables will change: | |
float duration_us, distance_cm; | |
void setup() { | |
Serial.begin (9600); |
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
#!/bin/bash | |
##author - dftaiwo | |
## Expects that an Android device is connected via ADB on USB/Wifi | |
filename="$1.png" | |
if [ $# -eq 0 ] | |
then | |
filename="android_screenshot_`date +"%Y-%m-%d_%H-%M-%S"`.png" | |
fi |
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
if [ -f .env ] | |
then | |
export $(cat .env | sed 's/#.*//g' | xargs) | |
fi |
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
<script> | |
$('input[required], select[required],textarea[required]').each(function(){$($(this).parent()).find('label').addClass('required')}); | |
</script> | |
<style> | |
.required:after{ | |
content:" *"; | |
font-weight:bold; | |
color:red; | |
} |
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
{ | |
"rules": { | |
"articles": { | |
".read": "root.child('users').child(auth.uid).child('subscribed').val() == true" | |
} | |
} | |
} |
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
{ | |
"rules": { | |
"users": { | |
"$user": { | |
"created": { | |
".validate": "newData.val() < now" | |
} | |
} | |
} | |
} |
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
"messages": { | |
"$message": { | |
".read": "data.child('timestamp').val() > (now - 600000)" | |
} | |
} |
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
{ | |
"rules": { | |
"profiles":{ | |
".validate": "newData.hasChildren([ | |
'age', | |
'first_name', | |
'last_name', | |
'state' | |
])" | |
} |
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
{ | |
"rules": { | |
".read":"auth.uid != null", | |
".write":false, | |
"users": { | |
"$uid": { | |
".write": "$uid == auth.uid" | |
} | |
} | |
} |
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
{ | |
"rules": { | |
"users": { | |
"$user_id": { | |
".write": "$user_id === auth.uid" | |
} | |
} | |
} | |
} |
NewerOlder