cat with stdin EOF tag can be used to mix stdin input and file content
cat - << 'EOF' "file.txt"
text from stdin to prepend to file.txt content
EOF
#!/usr/bin/expect | |
# usage: ./install_xc32.expect ./xc32_<version>-full-install-linux-x64-installer.run | |
set installer [lindex $argv 0] | |
set install_args [lindex $argv 1] | |
spawn $installer | |
set timeout -1 |
from pyftdi.gpio import GpioController | |
import argparse | |
class FTDIRelays: | |
def __init__(self): | |
self._gpio = GpioController() | |
self._state = 0 # SW cache of the GPIO output lines | |
def pins(self): | |
print(self._gpio.direction) |
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/documentation/liblightmodbus") | |
set(DOXYGEN_GENERATE_TAGFILE "${CMAKE_BINARY_DIR}/documentation/liblightmodbus.tag") | |
set(DOXYGEN_PROJECT_NAME "liblightmodbus - a lightweight, header-only, hardware-agnostic Modbus RTU/TCP library") | |
set(DOXYGEN_PROJECT_BRIEF "A lightweight, header-only, hardware-agnostic Modbus RTU/TCP library") | |
set(DOXYGEN_PROJECT_NUMBER 3.0) | |
set(DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES) | |
set(DOXYGEN_EXCLUDE_PATTERNS "*/doc/doxygen-awesome-css/*") | |
set(DOXYGEN_RECURSIVE YES) | |
set(DOXYGEN_ENABLE_PREPROCESSING YES) | |
set(DOXYGEN_MACRO_EXPANSION YES ) |
# function to create a TARGET_NAME Doxygen target with Doxygen parameters defined in PARAM_FILE and the sources located in SOURCE_DIR | |
function(create_documentation TARGET_NAME PARAM_FILE SOURCE_DIR) | |
find_package(Doxygen REQUIRED dot) | |
include(${PARAM_FILE}) | |
doxygen_add_docs(${TARGET_NAME}-doc | |
${SOURCE_DIR} | |
) | |
if(DOXYGEN_GENERATE_LATEX AND DOXYGEN_USE_PDFLATEX) | |
add_custom_command( | |
TARGET ${TARGET_NAME}-doc |
#!/usr/bin/expect | |
set installer [lindex $argv 0] | |
set email [lindex $argv 1] | |
set password [lindex $argv 2] | |
spawn $installer -b AuthTokenGen | |
set timeout -1 | |
set ret 0 | |
expect { |
#!/usr/bin/expect | |
set installer [lindex $argv 0] | |
set install_args [lindex $argv 1] | |
spawn $installer $install_args | |
set timeout -1 | |
expect { | |
"Press Enter to display the license agreements" { send "\r"; exp_continue} | |
"(press RETURN)" {send "\r"; sleep 1; send "q"; exp_continue} |
UDEV rules |
#! /bin/bash | |
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" |
When multiple users try to user VSCode devcontainer on a remote server, some files are initialized in the /tmp path with the user ownership.
When a second user tries to user VSCode remote server, he's stuck on an ACCESS DENIED error in these folders.
Each user shall create a folder with his username in /tmp and export in his .bashrc the variable TMPDIR=/tmp/$USER
.