- strace :
sytemcall tracer
:Traces system call summoned by a process from syscall table
System calls, Eg:
open syscall (__NR_open),
kill syscall (__NR_kill),
getdents64 syscall (__NR_getdents64),
--cpu-used=4 --cq-level=16 --end-usage=q --lag-in-frames=48 --enable-fwd-kf=1 --aq-mode=1 --deltaq-mode=0 --enable-chroma-deltaq=1 --quant-b-adapt=1 --enable-qm=1 --min-q=1 --enable-keyframe-filtering=0 --arnr-strength=1 --arnr-maxframes=4 --sharpness=3 --enable-dnl-denoising=0 --disable-trellis-quant=0 --threads=64
A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.
By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?
public class Program | |
{ | |
// https://docs.microsoft.com/en-us/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8 | |
public static async Task Main(string[] args) | |
{ | |
using var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(300)); | |
/* | |
* Passing the token directly to the method is easier, but it doesn’t work when you’re handed an arbitrary IAsyncEnumerable<T> | |
* from some other source but still want to be able to request cancellation of everything that composes it. | |
* In corner-cases, it can also be advantageous to pass the token to GetAsyncEnumerator, as doing so avoids “burning in” the token |
/**** Benchmarking CRTP without virtual dispatch in C#. | |
See https://geelaw.blog/entries/csharp-crtp-static-polymorphism-friendship/ | |
Results on my Surface Book 2: | |
| milliseconds | struct, non-virtual | struct, virtual | virtual | | |
| :----------: | :-----------------: | :-------------: | :-----: | | |
| x86 Core 3.1 | 1065 | 1405 | 1431 | | |
| x64 Core 3.1 | 1015 | 1371 | 1418 | | |
| x86 Fx 4.7.2 | 1160 | 1501 | 1490 | |
#!/bin/bash | |
currentAttempt=0 | |
totalAttempts=10 | |
delay=15 | |
while [ $currentAttempt -lt $totalAttempts ] | |
do | |
currentAttempt=$(( $currentAttempt + 1 )) | |
echo "Attempt $currentAttempt of $totalAttempts..." |
CentOS 7 distribution (as well as RHEL 7) ships with a somewhat outdated version of the GCC compiler (4.8.5 on CentOS 7.5), which may not be suitable to your compilation requirements. For example, C11 - which supersedes C99 - is fully supported only starting from GCC 4.9).
Additionally, recent versions of GCC (GCC6, GCC7, GCC8, GCC9) come with improvements which help detect issues at build time and offer suggestions on how to fix them. Sometimes, these are even actually helpful!
This note describes how to build the latest GCC (9.2.0 as of October 2019) from sources on CentOS 7. This should be applicable as is on RHEL 7. For other Linux distributions, adapt as needed.
⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,
This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).
Running this script should look the same in tmux as without.
curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
lnav -i https://gist.github.com/80d1d179c5706f85b281a5558217a5fe.git
# or
lnav -i [email protected]:80d1d179c5706f85b281a5558217a5fe.git