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
| "permissions": { | |
| "allow": [ | |
| "Bash(*)", | |
| "WebSearch", | |
| "WebFetch", | |
| "Edit", | |
| "Write", | |
| "Find", | |
| "Read", | |
| "Search" |
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/bash | |
| # Variables we need to make things easier later on. | |
| CONFIGFS="/sys/kernel/config" | |
| GADGET="$CONFIGFS/usb_gadget" | |
| VID="0x0525" | |
| PID="0xa4a2" | |
| SERIAL="0123456789" | |
| MANUF=$(hostname) |
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
| echo "dtoverlay=dwc2,dr_mode=otg" | sudo tee -a /boot/config.txt | |
| sudo apt install -y git meson libcamera-dev libjpeg-dev | |
| git clone https://gitlab.freedesktop.org/camera/uvc-gadget.git | |
| cd uvc-gadget | |
| make uvc-gadget | |
| cd build | |
| sudo meson install | |
| sudo ldconfig | |
| cd ~/ | |
| wget https://gist.githubusercontent.com/nielsvaes/17be5d737f1314a396cc7c9b80f1135f/raw/c0295876cad0588d1c25161d7c10dad9408e715c/rpi-uvc-gadget.sh |
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
| import random | |
| import logging | |
| import matplotlib.pyplot as plt | |
| class ShouldLog: | |
| yes = logging.INFO | |
| no = logging.ERROR | |
| # Set up logging | |
| logging.basicConfig( |
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
| import os | |
| import zipfile | |
| def make_zipfile(output_filename, source_dir): | |
| relroot = os.path.abspath(os.path.join(source_dir, os.pardir)) | |
| with zipfile.ZipFile(output_filename, "w", zipfile.ZIP_DEFLATED) as zip: | |
| for root, dirs, files in os.walk(source_dir): | |
| zip.write(root, os.path.relpath(root, relroot)) | |
| for file in files: | |
| filename = os.path.join(root, file) |
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
| import stat | |
| import os | |
| import shutil | |
| import datetime | |
| LOCAL_HISTORY = ".local_history" | |
| AUTO_PREFIX = ".version__" | |
| NAMED_PREFIX = ".named__" | |
| READONLY = 33060 | |
| WRITABLE = 33206 |
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
| -- Let's create a beacon for a unit in distress. | |
| -- Frequency will be 40MHz FM (home-able by a Huey's AN/ARC-131) | |
| -- The beacon they use is battery-powered, and only lasts for 5 min | |
| local UnitInDistress = UNIT:FindByName("CRASHED HELICOPTER") | |
| local UnitBeacon = UnitInDistress:GetBeacon() | |
| -- Set the beacon and start it | |
| UnitBeacon:RadioBeacon("MySoundFileSOS.ogg", 40, radio.modulation.FM, 20, 5*60) |
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
| -- DCS lua | |
| local tanker = GROUP:FindByName("TANKER") | |
| local route = tanker:GetTaskRoute() | |
| for _, each in pairs(route) do | |
| tanker:I(each["x"]) | |
| tanker:I(each["y"]) | |
| end |
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
| local recce = UNIT:FindByName("DRONE UNIT") | |
| local lasing_drone = SPOT:New(recce) | |
| local target = UNIT:FindByName("LASER TARGET") | |
| lasing_drone:LaseOn(target, 1688, 600) | |
| MESSAGE:New("Lasing Target!"):ToAll() |
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
| --- | |
| --- Generated by EmmyLua(https://github.com/EmmyLua) | |
| --- Created by niels. | |
| --- DateTime: 1/4/2022 3:35 PM | |
| --- | |
| local function split_string(str, delimiter) | |
| local result = {}; | |
| for match in (str ..delimiter):gmatch("(.-)"..delimiter) do | |
| table.insert(result, match); |
NewerOlder