A common and reliable pattern in service unit files is thus:
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
#include "txq.h" | |
kprobe:ena_com_prepare_tx | |
{ | |
// grab/cast the transmit queue param | |
$io_sq = (struct ena_com_io_sq *) arg0; | |
// logic copied from from ena_com_free_q_entries | |
$queuelen = (uint16) $io_sq->tail - (uint16) $io_sq->next_to_comp; |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Extreme Performance Tuning Benchmark Environment | |
Parameters: | |
AmiId: | |
Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id> | |
Default: '/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2' |
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
#!/usr/bin/bash | |
# configuration matches the wg-quick specifications | |
# manual invocation: | |
# $ sudo wg-netns vpn-1 | |
# via systemd: | |
# $ sudo systemctl start [email protected] | |
# examples: |
This document was originally written several years ago. At the time I was working as an execution core verification engineer at Arm. The following points are coloured heavily by working in and around the execution cores of various processors. Apply a pinch of salt; points contain varying degrees of opinion.
It is still my opinion that RISC-V could be much better designed; though I will also say that if I was building a 32 or 64-bit CPU today I'd likely implement the architecture to benefit from the existing tooling.
Mostly based upon the RISC-V ISA spec v2.0. Some updates have been made for v2.2
The RISC-V ISA has pursued minimalism to a fault. There is a large emphasis on minimizing instruction count, normalizing encoding, etc. This pursuit of minimalism has resulted in false orthogonalities (such as reusing the same instruction for branches, calls and returns) and a requirement for superfluous instructions which impacts code density both in terms of size and
#!/usr/bin/env bash | |
trim() { | |
local var="$*" | |
# remove leading whitespace characters | |
var="${var#"${var%%[![:space:]]*}"}" | |
# remove trailing whitespace characters | |
var="${var%"${var##*[![:space:]]}"}" | |
printf '%s' "$var" | |
} |
const fetch = require('node-fetch'), | |
FormData = require('form-data'); | |
// your gitea domain without trailing slash | |
const GITEA_DOMAIN = 'https://subdomain.domain.xyz'; | |
// you can find this variables when you visit your gitea installation | |
// open dev-tools and look in the Cookies section | |
const i_like_gitea = 'YOUR_I_LIKE_GITEA_STRING'; | |
const gitea_awesome = 'YOUR_GITEA_AWESOME_STRING'; |
(function() { | |
let ctx = new AudioContext(); | |
let gain = ctx.createGain(); | |
let cmpr = ctx.createDynamicsCompressor(); | |
let src = ctx.createMediaElementSource(document.getElementsByTagName("video")[0]); | |
ctx.destination.channelCount = 1; | |
let ts = ctx.currentTime; | |
gain.gain.setValueAtTime(6, ts); |
var parse = (list) => { | |
const vp = /(?:youtube\.com.*(?:\?|&)(?:v)=|youtube\.com.*embed\/|youtube\.com.*v\/|youtu\.be\/)((?!videoseries)[a-zA-Z0-9_-]*)/; | |
const dl = Array.from(document.querySelectorAll(`a[href*="list=${list}"]`), e => e.href.match(vp)[1]); | |
return dl.filter((v, i, a) => a.indexOf(v) === i).map(e => `https://youtube.com/watch?v=${e}`); | |
}; | |
var dl = (() => { | |
let a = document.createElement("a"); | |
document.body.appendChild(a); | |
a.style = "display: none"; |