Skip to content

Instantly share code, notes, and snippets.

View garethfoote's full-sized avatar

Gareth Foote garethfoote

View GitHub Profile
@garethfoote
garethfoote / index.html
Created May 2, 2017 16:16
JavaScript - DOM Selection & Manipulation
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>JavaScript Example</title>
</head>
<body>
<h1>This is a JS Example.</h1>
<span class="time">What's the time?!</span>
<hr/>
@garethfoote
garethfoote / rtsp-to-mp4.sh
Last active July 13, 2024 13:24
Convert RTSP stream into 60 second mp4 segments with local machine time as filename: Ymd-HM
if [ -z "$1" ]; then
IP_ADDRESS=10.164.208.102
else
IP_ADDRESS=$1
fi
# FFMPEG command for creating segments from RTSP stream
ffmpeg -i rtsp://@${IP_ADDRESS}:5554/playlist.m3u -c copy -map 0 -f segment -strftime 1 -segment_time 60 -segment_format mp4 "%Y%m%d-%H%M.mp4"
// Make variables for the led pin number and delay
// These can be used throughout your code
int ledPin = 13;
int delayMs = 1000;
void setup() {
// Tell pin 13 to work as an output
pinMode( ledPin, OUTPUT );
}
// Make variables for the led, button pin number and delay
// These can be used throughout your code
int ledPin = 13;
int buttonPin = 7;
int delayMs = 250;
void setup() {
// Tell pin 13 to work as an OUTPUT
pinMode( ledPin, OUTPUT );
// Tell pin 7 to work as an INPUT
// Make variables to be used throughout code
int sensorPin = A0;
int ledPin = 13;
void setup() {
// Tell pin 13 to work as an output:
pinMode(ledPin, OUTPUT);
}
void loop() {