Skip to content

Instantly share code, notes, and snippets.

View mbrammer's full-sized avatar

Mischa Brammer mbrammer

View GitHub Profile
@mbrammer
mbrammer / showJoomlaVersions.sh
Last active December 20, 2015 19:28
Shell script to check Joomla versions of virtual hosts
#!/bin/bash
# Colors
ESC_SEQ="\033["
COL_RESET=$ESC_SEQ"39m"
COL_RED=$ESC_SEQ"31m"
COL_GREEN=$ESC_SEQ"32m"
COL_YELLOW=$ESC_SEQ"33m"
COL_BLUE=$ESC_SEQ"34m"
COL_MAGENTA=$ESC_SEQ"35m"
@mbrammer
mbrammer / showWordpressVersions.sh
Created August 8, 2013 09:35
Shell script to check WordPress versions of virtual hosts
#!/bin/bash
# Colors
ESC_SEQ="\033["
COL_RESET=$ESC_SEQ"39m"
COL_RED=$ESC_SEQ"31m"
COL_GREEN=$ESC_SEQ"32m"
COL_YELLOW=$ESC_SEQ"33m"
COL_BLUE=$ESC_SEQ"34m"
COL_MAGENTA=$ESC_SEQ"35m"
@mbrammer
mbrammer / crop-rtsp-live-stream-and-provide-result-as-new-rtsp-live-stream.md
Last active August 21, 2024 09:07
Crop section from RTSP live stream and provide result as new RTSP live stream

Create croped RTSP live stream from existing RTSP live stream

I needed a croped section of a RTSP live stream from a UniFi Protect camera, since I am filming my yard from a shed and wanted to see a cutout of the front door from my 4K camera.
This article will show you how to enable the RTSP live stream on the UniFi Protect camera, how to setup a streaming server and how to actually execute the processing of the live stream.

Enable UniFi Protect RTSP live stream

The following screenshots are made from UniFi Protect application on version 2.7.18

  1. Go to "UniFi devices"
  2. Click on the desired camera in the camera list
@mbrammer
mbrammer / .bashrc
Last active September 4, 2024 20:36
Auto-switch NVM Node version when switching into directory with .nvmrc file
#
# Run 'nvm use' automatically every time there's
# a .nvmrc file in the directory. Also, revert to default
# version when entering a directory without .nvmrc
#
enter_directory() {
if [[ $PWD == $PREV_PWD ]]; then
return
fi
@mbrammer
mbrammer / infex.html
Created August 28, 2024 09:20
Twilio frontend call with backend call initialization
<button id="call-button">Call</button>
<script src="//media.twiliocdn.com/sdk/js/client/v1.13/twilio.min.js"></script>
<script>
let device;
// Assume that the frontend already knows the user ID or session ID
const userId = 'example-user-id';
// Fetch the capability token from your backend