Inheritance and Virtual Table are often used to create interface in C++ polymorphic class
What if ... there were another way to do this ?
easier, cleaner, faster and more reliable
This article explains how to useCRTP
, [std::variant
](https://en.cppreference.com/w/cpp/utility/variant andstd::visit
to increase code performance.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options | |
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full. | |
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}… | |
Getting help: | |
-h — print basic options | |
-h long — print more options | |
-h full — print all options (including all format and codec specific options, very long) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zfs list -H -o name -t snapshot | xargs -n1 zfs destroy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ zfs destroy -nv system/usr/[email protected] | |
would destroy system/usr/jails/[email protected] | |
would destroy system/usr/jails/[email protected] | |
would destroy system/usr/jails/[email protected] | |
would destroy system/usr/jails/[email protected] | |
would destroy system/usr/jails/[email protected] | |
would destroy system/usr/jails/[email protected] | |
would destroy system/usr/jails/[email protected] | |
would destroy system/usr/jails/[email protected] | |
would destroy system/usr/jails/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <X11/Xlib.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
Display *display; | |
Window window; | |
XEvent event; | |
int s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MODEM="$(mmcli -L | grep -o '/org/freedesktop/ModemManager1/Modem/[0-9]*' | head -1)" | |
BEARER="$(mmcli -m $MODEM --list-bearers | grep -o '/org/freedesktop/ModemManager1/Bearer/[0-9]*' | head -1)" | |
mkdir -p /run/systemd/network | |
connect() { | |
MODEM="$(mmcli -L | grep -o '/org/freedesktop/ModemManager1/Modem/[0-9]*' | head -1)" | |
# hardcode all the things !! (this is for mobile vikings) |
We can use socat
to create 2 virtual serial ports that are connected to each
other locally. This can be useful for debugging serial port applications. Or
simulating serial port communication. Or running 2 legacy programs that only
communicate with each other over serial ports, such as old DOS games. And of
course, for education, since serial communication is probably the most simple
communication protocol there is, RS232 is considered at the bottom of the OSI
stack, at the "Physical Layer". See: http://electronics.stackexchange.com/questions/31171/internet-vs-serial-communication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Usage: terminator[.vbs] [path to starting directory] | |
' contents enclosed in square brackets optional | |
args = "-c" & " -l " & """DISPLAY=:0 terminator""" | |
' If there's a single argument, interpret it as the starting directory | |
If WScript.Arguments.Count = 1 Then | |
dir = WScript.Arguments(0) | |
Else | |
dir = "" |