I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: mpd-autoplay | |
| # Required-Start: mpd | |
| # Required-Stop: | |
| # Should-Start: | |
| # Should-Stop: | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 |
| !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.blobUtil=e():"undefined"!=typeof global?global.blobUtil=e():"undefined"!=typeof self&&(self.blobUtil=e())}(function(){return function e(t,n,r){function o(u,a){if(!n[u]){if(!t[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var f=n[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return o(n?n:e)},f,f.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(e,t){"use strict";function n(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=-1;++o<t;)r[o]=e.charCodeAt(o);return n}function r(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,o=-1;++o<r;)t+=String.fromCharCode(n[o]);return t}function o(e,t){return new L(function(n,r){var o=new Image;t&&(o.crossOrigin=t),o.onload=function( |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentMost GStreamer examples found online are either for Linux or for gstreamer 0.10.
This particular release note seems to have covered important changes, such as:
Applying -v will print out useful information. And most importantly the negotiation results.
| /* | |
| ** | |
| ** Example of Interprocess communication in Node.js through a UNIX domain socket | |
| ** | |
| ** Usage: | |
| ** server> MODE=server node ipc.example.js | |
| ** client> MODE=client node ipc.example.js | |
| ** | |
| */ |
Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:
Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.
Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.
Instructions provided for both Fedora and Ubuntu (including Debian):
Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:
| "vimrc file maintained by Damian Michalski for personal use | |
| "Based on vimrc from Marek Tkaczyk | |
| " NOTE: you need to create 'backup', 'swap', 'undo' and undodir folders inside ~/.vim | |
| " NOTE: in order for airline to look good, you need to install and select powerline fonts pack | |
| " NOTE: markonm/traces.vim is incompatible with neovim - to make it work, turn off inccommand | |
| " NOTE: in order to make language client work, you need to execute: | |
| " yarn global add javascript-typescript-langserver | |
| " That will install javascript-typescript-stdio |
Capturing video from the rpi camera with ffmpeg can vary from less than 5% to 100% of the CPU (rpi zero) depending on ffmpeg using the hardware acceleration or not.
On many github issues one finds the suggestion of using h264_omx codec to use the gpu - but it does not ship with the default ffmpeg on Raspbian.
Instead I found that one can use the v4l2 driver provided by raspbian to get hardware accelerated h264 output. Also setting the video size will save one from using a (cpu) scale filter.
capture h264 video from rpi camera
| #!/usr/bin/env bash | |
| # SoftEther VPN Server Installer Script | |
| # Register vultr.com with free credit https://www.vultr.com/?ref=9771340-9J | |
| # Create VPS | |
| # Tested on Ubuntu 24.04, Debian 12.0 | |
| # Instructions: | |
| # 1. Save this file as softether-installer.sh | |
| # 2. chmod +x softether-installer.sh | |
| # 3. Run: ./softether-installer.sh or bash softether-installer.sh | |
| # 4. Initialize VPN server config: /usr/local/vpnserver/vpncmd |