(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
Had to do this for some advanced networking with KVM, and couldn't figure out how to do it using the Nework Manager gui. Did find an article later that showed how to do it with nmtui, but it's so much easier to record what you did when using the cli.
In the examples below "eth0" is the name of my physical interface. By default on Ubuntu and most distributions that will almost certainly be different, for example: "eno1", "ens1", or "enp2s0".
To see what everything looks like before starting:
#include <chrono> | |
#include <cmath> | |
#include <exception> | |
#include <fstream> | |
#include <iostream> | |
#include <limits> | |
#include <numeric> | |
#include <opencv2/dnn/dnn.hpp> | |
#include <opencv2/imgcodecs.hpp> | |
#include <opencv2/imgproc.hpp> |
For those of you who want to try out systemd-networkd, you can read on, and find out in this tutorial how to switch from NetworkManager to systemd-networkd on Linux.
Requirement systemd-networkd is available in systemd version 210 and higher. Check the version of your systemd before proceeding.
$ systemctl --version
It is relatively straightforward to switch from Network Manager to systemd-networkd (and vice versa).
There's not a good, simple embeddable REPL for JS out there that I could find. I wanted one for presentations on JavaScript concepts. The developer tools' console would be ideal, but bailing out of my presentation and opening a console brakes the flow. Tools like codepen.io et al. are great, but more overhead and set up than I need. I just want to type JS and show the result. This is a decent first step for my needs.
d3 = require("d3"); | |
jsdom = require("jsdom"); | |
document = jsdom.jsdom(); | |
window = document.parentWindow; | |
var sampleSVG = d3.select(document.body) | |
.append("svg") | |
.attr("width", 100) | |
.attr("height", 100) |
Source material: | |
http://security.stackexchange.com/questions/24444/what-is-the-most-hardened-set-of-options-for-gcc-compiling-c-c | |
https://wiki.gentoo.org/wiki/Hardened_Gentoo | |
https://wiki.debian.org/Hardening | |
================================================================================================================> | |
GCC Security related flags and options: | |
CFLAGS="-fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2" | |
LDFLAGS="-Wl,-z,now -Wl,-z,relro" |
/* Allocate aligned memory in a portable way. | |
* | |
* Memory allocated with aligned alloc *MUST* be freed using aligned_free. | |
* | |
* @param alignment The number of bytes to which memory must be aligned. This | |
* value *must* be <= 255. | |
* @param bytes The number of bytes to allocate. | |
* @param zero If true, the returned memory will be zeroed. If false, the | |
* contents of the returned memory are undefined. | |
* @returns A pointer to `size` bytes of memory, aligned to an `alignment`-byte |
// | |
// ffmpeg_customfilter | |
// - base name - ainfoda (audio filter) | |
// - base name - vinfoda (video filter) | |
// | |
// 1. create new filein libavfilter/infoda_af.c | |
// use any filters as template, simplest is af_afnull.c | |
// filename is arbitrary (all recent named as af_name), but for me all my stuff called with |