Skip to content

Instantly share code, notes, and snippets.

View ychaouche's full-sized avatar

Yassine Chaouche ychaouche

View GitHub Profile
Algeria DZA 1950 9018423
Algeria DZA 1951 9269869
Algeria DZA 1952 9521212
Algeria DZA 1953 9772646
Algeria DZA 1954 10014393
Algeria DZA 1955 10247428
Algeria DZA 1956 10482183
Algeria DZA 1957 10717503
Algeria DZA 1958 10953641
function printfln {
format_string="$1"
shift
printf "$format_string\n" "$@"
}
root@messagerie-recup[10.10.10.20] ~ # mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 52
Server version: 10.11.4-MariaDB-1~deb12u1 Debian 12
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD("xxx");
# -*- shell-script -*-
export INTERFACE="eth4"
export PATH="$PATH":~/SYNCHRO/bin/ # put the path to where net.ip.private is
export BOOTTIME=$(sys.boottime)
Hello Mattia,
I hope this message finds you well.
At the end of your article about sensible-bash,
you write:
# Don't use ~ to define your home here, it won't work.
export dotfiles="$HOME/dotfiles"
export repos="$HOME/repos"
function mail.user.login.last {
command ls -1t /var/log/dovecot.log* |
while read -r filename;
do
match=$(zgrep -H --line-buffered --color -E "Login.*$1" "$filename" | tail -1);
if [[ -n "$match" ]];
then
echo "$match";
echo "that was a match, now I return 0."
return 0
root@messagerie-prep[10.10.10.19] ~ # ls %s
%s, , , , , ; for (i=1; i<7; i++) =; print -bash; fflush()}'
root@messagerie-prep[10.10.10.19] ~ # ls %s
%s, , , , , ; for (i=1; i<7; i++) =; print -bash; fflush()}'
root@messagerie-prep[10.10.10.19] ~ # ls %s*
-rw-r--r-- 1 root root 0 Jun 26 16:51 %s, , , , , ; for (i=1; i<7; i++) =; print -bash; fflush()}'
-rw-r--r-- 1 root root 0 Jun 26 16:50 %s, , , , , ; for (i=1; i<7; i++) =; print -bash; fflush()}'?
root@messagerie-prep[10.10.10.19] ~ #
# while no 404 or 500
while curl -f "$homepage?page=$page" > /tmp/curl.last 2>/tmp/curl.last.error
do
# add a trailing newline
echo 2>>/tmp/curl.last.error
# parse the gist
~/CODE/TEST/BASH/filegist < /tmp/curl.last | tee /tmp/curl.last.results
# if parsing didn't find anything,
-*-outline-*-
(best viewed in emacs with outline-mode)
* by name
** apparmor
*** intro
Some processes are monitored by AppArmor and their actions can be restricted to their AppArmor profile.
For example : access to certain paths, or execution of certain commands, or certain kernel capabilities.
If the profile doesn't allow, the user gets a permission denied.
Example : tcpdump can't read or write files not ending with .pcap.
archive.create.tgz is a function
archive.create.tgz ()
{
local dir="$1";
local archivename="$dir.tgz";
shift;
echo tar --exclude=*~ $@ -cvzf $archivename $dir;
tar --exclude=*~ $@ -cvzf $archivename $dir
}
archive.create.zip is a function