namespace mpl {
template <typename T, typename V, size_t, typename=void>
struct copy_std_container {
using type = std::enable_if_t<
traits::is_std_array_or_vector<T>::value, std::vector<std::decay_t<V>>
>;
};
template <typename T, typename V>
struct copy_std_container::value>> {
namespace traits {
template <typename T, typename = void>
struct is_std_array : std::false_type {};
template <typename T>
struct is_std_array<T,std::enable_if_t<
std::is_same_v<std::array<typename T::value_type, std::tuple_size<T>::value>, T>
> > : std::true_type {};
docker ...
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
- optional, if with initializer
https://stackoverflow.com/questions/39599242/in-c17-can-an-if-statement-with-an-initializer-be-used-to-unpack-an-optional
- Directory
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
- Arguments
#!/bin/bash
echo "First arg: $1"
# start the ssh-agent in the background
$ eval "$(ssh-agent -s)"
# add key
$ ssh-add
# list key
$ ssh-add -l
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
from subprocess import call | |
from time import sleep | |
from datetime import datetime | |
import argparse | |
if __name__ == '__main__' : | |
parser = argparse.ArgumentParser(progname='python vol-ctrl.py', description='decrease volume with delay') | |
parser.add_argument('-i','--init',type=int,help='initial volume') | |
parser.add_argument('-r','--rate',type=int,help='decrease rate') | |
parser.add_argument('-d','--delay',type=int,help='decrease delay in seconds') |
interactive terminal :
aspell -t -c file.tex
list of misspelled words :
cat file.tex | aspell list -t | sort | uniq
convert -coalesce something.gif something.png
or
magick convert -coalesce something.gif something.png
the speed could be known using :
NewerOlder