Skip to content

Instantly share code, notes, and snippets.

@HDR
HDR / Huawei_HPR.py
Last active April 18, 2025 06:46
Connect to a Huawei smart watch in Huawei HR Data Broadcast mode and display the heartrate
import asyncio
from bleak import BleakScanner, BleakClient
huawei_device = None
huawei_heartrate_char_uuid = "00002a37-0000-1000-8000-00805f9b34fb"
async def notification_handler(sender, data):
heart_rate = data[1]
print(f"Heart Rate:{heart_rate} BPM", end="\r")
@ma7555
ma7555 / sstp_server.md
Last active April 20, 2025 08:35
SSTP VPN Server with Docker on Ubuntu VPS

On the VPS:

  • Create a 10 year certificate. The "Common Name" (CN) must be the static IP of the instance.
    openssl req  -nodes -new -x509 -keyout key.pem -out cert.pem -days 3650
  • Run the SoftEther docker with either of the following:
    1. A Single User, SSTP only. Not updated recently (7 years ago at the time of creating the gist)
    sudo docker run -d --cap-add NET_ADMIN -e SSTP_ENABLED=1 -e USERNAME=YOUR_VPN_USERNAME -e PASSWORD=YOU_VPN_PASS -e SERVER_PWD=YOUR_SERVER_PASS -e CERT="$(cat cert.pem)" -e KEY="$(cat key.pem)" -p 443:443/tcp fernandezcuesta/softethervpn
@thomascube
thomascube / cve-2017-16651.md
Last active January 3, 2024 11:12
Roundcube Vulnerability CVE-2017-16651

Roundcube Webmail File Disclosure Vulnerability

  • Software: https://roundcube.net/
  • Versions: 1.1.0 - 1.1.9, 1.2.0 - 1.2.6, 1.3.0 - 1.3.2
  • CVE: CVE-2017-16651
  • Author: Thomas Bruederli
  • Release date: 2017-11-09

Summary

Roundcube Webmail allows unauthorized access to arbitrary files on the

@mosquito
mosquito / README.md
Last active April 13, 2025 18:03
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@Brainiarc7
Brainiarc7 / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Last active August 18, 2024 02:58
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@PkmX
PkmX / gist:fefff90bab3b6eb2847f
Last active January 13, 2017 06:41
Nexus 5 Camera Characteristics Dump
Camera module HAL API version: 0x100
Camera module API version: 0x203
Camera module name: QCamera Module
Camera module author: Qualcomm Innovation Center Inc
Number of camera devices: 2
Vendor tag definitions:
Dumping configured vendor tag descriptors: 3 entries
0x80000000 (privatedata_reprocess) with type 0 (byte) defined in section org.codeaurora.qcamera3.privatedata
0x80010000 (opaque_raw_strides) with type 1 (int32) defined in section org.codeaurora.qcamera3.opaque_raw