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 bash | |
| # checck if pidof exists | |
| PIDOF="$(which pidof)" | |
| # and if not - install it | |
| (test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof | |
| # find app in default paths | |
| CO_PWD=~/Applications/CrossOver.app/Contents/MacOS | |
| test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS |
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
| # Simplified version and explanation at: https://stackoverflow.com/a/64439347/12866353 | |
| import os | |
| import ffmpeg | |
| def compress_video(video_full_path, size_upper_bound, two_pass=True, filename_suffix='cps_'): | |
| """ | |
| Compress video file to max-supported size. | |
| :param video_full_path: the video you want to compress. | |
| :param size_upper_bound: Max video size in KB. |
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
| #include <stdio.h> | |
| #include <assert.h> | |
| #include <libusb-1.0/libusb.h> | |
| int main(int argc, char **argv) { | |
| libusb_context *context; | |
| libusb_device_handle *handle; | |
| libusb_device *device; | |
| struct libusb_device_descriptor desc; | |
| unsigned char buffer[256]; |
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
| 2 - Autos & Vehicles | |
| 1 - Film & Animation | |
| 10 - Music | |
| 15 - Pets & Animals | |
| 17 - Sports | |
| 18 - Short Movies | |
| 19 - Travel & Events | |
| 20 - Gaming | |
| 21 - Videoblogging | |
| 22 - People & Blogs |