Tested on Ubuntu 14.04 and Chromium 65
apt-get install chromium-browser adobe-flashplugin
mkdir -p /etc/chromium/policies/managed
vim /etc/chromium/policies/managed/foo_policy.json
In some cases, it is possible that PostgreSQL tables get corrupted. This can happen in case of hardware failures (e.g. hard disk drives with write-back cache enabled, RAID controllers with faulty/worn out battery backup, etc.), as clearly reported in this wiki page. Furthermore, it can happen in case of incorrect setup, as well.
One of the symptoms of such corruptions is the following message:
ERROR: missing chunk number 0 for toast value 123456 in pg_toast_45678
This almost surely indicates that a corrupted chunk is present within a table file. But there is a good way to get rid of it.
The included script 'widevine-flash_armhf.sh' fetches a ChromeOS image for ARM and extracts the Widevine binary, saving it in a compressed archive. Since it downloads a fairly large file (2Gb+ on disk after download) it is recommended that you run the script on a machine that has plenty of disk space.
To install the resultant archive, issue the following on your ARM machine–after copying over the archive if needed:
sudo tar Cfx / widevine-flash-20200124_armhf.tgz
(Where 'widevine-flash-20200124_armhf.tgz' is updated to reflect the actual name of the created archive)
#!/bin/sh -eu | |
# Make sure we have wget or curl | |
available () { | |
command -v "$1" >/dev/null 2>&1 | |
} | |
if available wget; then | |
DL="wget -O-" | |
DL_SL="wget -qO-" | |
elif available curl; then |
This gist will explain you how to enable an undocumented feature of PHP-FPM
which will give a real-time performance stats.
Everybody knows the famous phpinfo()
and the page it generates, right? Then the real-time PHP-FPM
status page design is very similar.
Some informations from the top are not displayed to avoid security issues.
{ | |
"title": "Takeout API", | |
"discoveryVersion": "v1", | |
"ownerName": "Google", | |
"version_module": true, | |
"resources": { | |
"exports": { | |
"methods": { | |
"get": { | |
"flatPath": "v2/{service}/exports/{exportId}", |
#!/bin/sh | |
# | |
# This program takes an .srt file, translates it, and merges both translations into a .ass file with the user's selected | |
# language on top of the screen and the other language at the bottom. | |
# | |
# Usage: ./transmerge.sh [source language] [target language] [language on top (en|fri|...)] [source .srt] [target .ass (optional)] | |
# | |
# ex., $ ./transmerge.sh en fr en movie.srt | |
# |
#!/bin/bash | |
# | |
# renew-letsencrypt-certificates.sh DOMAIN [EMAIL] | |
# | |
# Copy Let's Encrypt SSL certs from a remote public facing web server to local filesystem | |
# Look for changes, if any change, restarts the web service | |
# Useful for using Let's Encrypt with local internal servers, with custom DNS. | |
# Working "mail" command needed for email alerts | |
# |
const W = 640; // video frame width | |
const H = 360; // video frame height | |
const pixelData = await imageLoader("./seaside.png"); // get the pixel data of the backgroung image in RGBA format | |
const buffer = new Uint8Array(W * H * 1.5); // byte buffer for the incoming frame in YUV 422 format | |
const bufferRGB = new Uint8Array(W * H * 4); // byte buffer for the result frame in RGBA format | |
const transformer = new TransformStream({ | |
async transform(videoFrame, controller) { | |
const copyResult = await videoFrame.copyTo(buffer); |
var glRef = {}; | |
function loadImage(src) { | |
return new Promise((resolve, reject) => { | |
const img = new Image(); | |
img.onload = () => { | |
resolve(img); | |
}; | |
img.src = src; | |
}); |