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
{ | |
"defaultAction": "SCMP_ACT_ERRNO", | |
"syscalls": [ | |
{ | |
"name": "accept", | |
"action": "SCMP_ACT_ALLOW", | |
"args": null | |
}, | |
{ | |
"name": "accept4", |
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/bash | |
# https://unix.stackexchange.com/questions/385023/firefox-reading-out-urls-of-opened-tabs-from-the-command-line | |
if [[ $1 == *jsonlz4 ]]; then | |
export opentabs="$1" | |
elif pgrep -f waterfox &>/dev/null; then | |
export opentabs=$(ls -t ~/.waterfox/*/sessionstore-backups/recovery.jsonlz4 | sed q) | |
else | |
export opentabs=$(ls -t ~/.mozilla/firefox*/*/sessionstore-backups/recovery.jsonlz4 | sed q); |
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
#!/usr/bin/env python | |
user = 'xxxxxxx' | |
password = 'xxxxxxxx' | |
import requests | |
from lxml import html | |
login_url = 'https://forum.ubuntu-fr.org/login.php' |
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
#!/usr/bin/env sh | |
# sputnick 2023 (copyleft) | |
# cURL: https://curl.se/docs/httpscripting.html | |
# xidel: https://github.com/benibela/xidel | |
# xidel x86_64: https://sourceforge.net/projects/videlibri/files/Xidel/Xidel%20development/xidel_0.9.9-1_amd64.deb/download | |
user=toi password='xxxxxxxxxxxxxxxxxxxx' | |
trap 'rm -f /tmp/ubuntu-fr.html' EXIT |
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 | |
# Know which signal is caught | |
# man 7 signal | |
# The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored. (9, 19] | |
trap "echo 'SIGHUP 1 Term Hangup (disconnection) or control process termination.'" 1 | |
trap "echo 'SIGINT 2 Term Interrupt from keyboard.'" 2 | |
trap "echo 'SIGQUIT 3 Core Quit request from keyboard.'" 3 | |
trap "echo 'SIGILL 4 Core Illegal instruction.'" 4 | |
trap "echo 'signal 5 not referenced'" 5 | |
trap "echo 'SIGABRT 6 Core Abort signal from abort(3).'" 6 |
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/bash | |
min_number=1 | |
max_number=10 | |
my_number=$(( RANDOM % max_number + min_number )) | |
read -p "Guess a number between $min_number and $max_number >>> " number_guess | |
case $number_guess in |
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/bash | |
# https://stackoverflow.com/a/13401143/465183 | |
# Decimal ASCII codes (see man ascii) | |
ARR=( {48..57} {65..90} {97..122} ) | |
# Array count | |
arrcount=${#ARR[@]} |
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
sudo apt-get update && apt-get install openjdk-11-jre perl libxml2 libxml2-dev libxml-libxml-perl libwww-perl liblwp-protocol-https-perl | |
git clone https://github.com/sputnick-dev/saxon-lint.git | |
cd saxon-lint* | |
chmod +x saxon-lint.pl | |
./saxon-lint.pl --help |
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
$ cd /tmp | |
$ cat file | |
foobar | |
123 | |
$ sed 's/\w//g' file | |
$ sed 's/\d//g' file | |
foobar | |
123 |
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
$ printf '%s\n' a 2 z s 0.1 1.1 | sort -n | |
0.1 | |
a | |
s | |
z | |
1.1 | |
$ printf '%s\n' a 2 z s 0.1 1.1 | sort -V | |
0.1 | |
1.1 | |
2 |
NewerOlder