Capture a video of a given X Window with gstreamer.
xwininfo| badblocks -b 4096 -p 0 -s -t 0 -v -w DEVICE [LAST_BLOCK] [FIRST_BLOCK] | |
| -b block_size | |
| -p num_passes | |
| -s Show the progress of the scan | |
| -t test_pattern | |
| -v Verbose mode | |
| -w Use write-mode test |
| // YouTube API video uploader using JavaScript/Node.js | |
| // You can find the full visual guide at: https://www.youtube.com/watch?v=gncPwSEzq1s | |
| // You can find the brief written guide at: https://quanticdev.com/articles/automating-my-youtube-uploads-using-nodejs | |
| // | |
| // Upload code is adapted from: https://developers.google.com/youtube/v3/quickstart/nodejs | |
| const fs = require('fs'); | |
| const readline = require('readline'); | |
| const assert = require('assert') | |
| const {google} = require('googleapis'); |
| // Instagram started setting cross-origin-resource-policy: same-origin when it sees bad referer headers. | |
| // this change leads to ERR_BLOCKED_BY_RESPONSE error and broken images if instagram image is embedded to external website. | |
| // to mitigate this, simple image proxy can be used. | |
| // Steps to install this worker: | |
| // 1. Create CNAME cdn.<yourdomain.com> in your CloudFlare panel | |
| // 2. Create new worker and put the code below into the worker code | |
| // 3. Setup worker route so the worker launches on your cdn. subdomain. | |
| // 4. Modify your image urls from | |
| // https://scontent-arn2-1.cdninstagram.com/v/t51.2885-15/sh0xxx.jpg | |
| // to: |
| (function(options) { | |
| // Init options if not specified | |
| options = options || { | |
| "capturePayload": false | |
| }; | |
| // Store a reference to the native method | |
| let oldOpen = XMLHttpRequest.prototype.open; | |
| var xhrlogcounter = 1; |
| # Python Rclone Script with Telegram and InfluxDB Reporting | |
| # - This Script backups your data to any rclone location (see rclone.org) | |
| # - You can execute scripts, commands and database dumps before running a single rclone command | |
| # - It sends automatic error reports and summaries | |
| # - It saves all statistics and operations to an Influx database | |
| # - The data can be used for visualizations in e.g. Grafana | |
| # - You can automate it by using cron | |
| # Created by: Luca Koroll - https://github.com/lucanello | |
| # Last update: 2021-07-04 |
nano ~/.bashrcPS1="\[$(tput bold)\]\[\033[38;5;9m\]\u\[$(tput sgr0)\]\[\033[38;5;7m\]@\[$(tput bold)\]\[\033[38;5;171m\]\H\[$(tput sgr0)\]\[\033[38;5;7m\]:\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;41m\]\w\[$(tput sgr0)\]\\$ \[$(tput sgr0)\]"