# Serve current directory on port 8000
python3 -m http.server 8000
# Bind to a specific interface (e.g., localhost only)
python3 -m http.server 8000 --bind 127.0.0.1
# Serve a specific directory
This file contains hidden or 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
| sudo modprobe v4l2loopback video_nr=4 card_label="virtual webcam" exclusive_caps=1 | |
| sudo ffmpeg -use_wallclock_as_timestamps 1 -fflags nobuffer -framerate 60 -device /dev/dri/card0 -f kmsgrab -format bgr0 -i - -vsync drop -init_hw_device vaapi=v:/dev/dri/renderD128 -filter_hw_device v -vf 'hwmap,hwdownload,format=yuv420p' -c:v rawvideo -f v4l2 /dev/video4 |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # __author__ = 'c4mx' | |
| from pbkdf2 import PBKDF2 | |
| from binascii import a2b_hex | |
| import hmac, hashlib, binascii | |
| # passphrase: WPA wifi password | |
| def calc_pmk(passphrase, ssid): | |
| return PBKDF2(passphrase, ssid, 4096).read(32) |
QNAP NAS model TS-453 Pro has limited documentation on how to control its various peripherals, namely:
- the front LCD display, a 2 row, 16 column blue & white LCD display, and its two menu buttons ("ENTER", "SELECT")
- the front LEDs "STATUS" (red & green) & "USB" (blue)
- the 4 "disk error" LEDs (red)
- the front "USB COPY" button
- the main rear fan
This file contains hidden or 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/sh | |
| # | |
| # PROVIDE: nodered | |
| # REQUIRE: LOGIN | |
| # KEYWORD: shutdown | |
| # Author: Andrew Pearson (apearson.io) | |
| # Version: 1.0.2 | |
| # Description: |