From 4a211305679d3b2ab3ffa2397b0d2c7dde92abfa Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sat, 3 Jun 2023 23:49:12 +0300 Subject: [PATCH] ec check --- .editorconfig | 11 +++++++++++ ~/Bash/irc_logger.sh | 40 +++++++++++++++++++------------------- ~/CSS/back-image-cover.css | 12 ++++++------ ~/HTML/SEMATIC-HTML5.md | 30 ++++++++++++++-------------- ~/PHP/Fenom.md | 8 +++++--- ~/PHP/gettype.php | 30 ++++++++++++++-------------- ~/PHP/mail.php | 26 ++++++++++++------------- ~/Python/irc-bot.py | 16 +++++++-------- 8 files changed, 93 insertions(+), 80 deletions(-) diff --git a/.editorconfig b/.editorconfig index c49b5f0..860a0be 100644 --- a/.editorconfig +++ b/.editorconfig @@ -74,3 +74,14 @@ indent_size = 4 [~/SublimeText/*.sublime-*] indent_style = tab indent_size = 4 + +[~/Gambas/*] +indent_size = 2 + +[~/Solar2D/**] +indent_style = unset +indent_size = unset +end_of_line = unset +charset = unset +trim_trailing_whitespace = unset +insert_final_newline = unset diff --git a/~/Bash/irc_logger.sh b/~/Bash/irc_logger.sh index 82e2bc0..b594e44 100755 --- a/~/Bash/irc_logger.sh +++ b/~/Bash/irc_logger.sh @@ -1,26 +1,26 @@ -#!/bin/bash +#!/bin/bash # https://linuxconcept.com/making-a-simple-irc-chat-bot-logger-using-bash-script/ -nick="blb$$" +nick="blb$$" channel=admin server=iiiypuk.me -config=/tmp/irclog -[ -n "$1" ] && channel=$1 -[ -n "$2" ] && server=$2 -config="${config}_${channel}" -echo "NICK $nick" > $config -echo "USER $nick +i * :$0" >> $config -echo "JOIN #$channel" >> $config -trap "rm -f $config;exit 0" INT TERM EXIT -tail -f $config | nc $server 6667 | while read MESSAGE -do - case "$MESSAGE" in - PING*) echo "PONG${MESSAGE#PING}" >> $config;; *QUIT*) ;; - *PART*) ;; - *JOIN*) ;; - *NICK*) ;; - *PRIVMSG*) echo "${MESSAGE}" | sed -nr "s/^:([^!]+).*PRIVMSG[^:]+:(.*)/[$(date '+%R')] \1> \2/p" >> $config;; - *) echo "${MESSAGE}";; - esac +config=/tmp/irclog +[ -n "$1" ] && channel=$1 +[ -n "$2" ] && server=$2 +config="${config}_${channel}" +echo "NICK $nick" > $config +echo "USER $nick +i * :$0" >> $config +echo "JOIN #$channel" >> $config +trap "rm -f $config;exit 0" INT TERM EXIT +tail -f $config | nc $server 6667 | while read MESSAGE +do + case "$MESSAGE" in + PING*) echo "PONG${MESSAGE#PING}" >> $config;; *QUIT*) ;; + *PART*) ;; + *JOIN*) ;; + *NICK*) ;; + *PRIVMSG*) echo "${MESSAGE}" | sed -nr "s/^:([^!]+).*PRIVMSG[^:]+:(.*)/[$(date '+%R')] \1> \2/p" >> $config;; + *) echo "${MESSAGE}";; + esac done diff --git a/~/CSS/back-image-cover.css b/~/CSS/back-image-cover.css index 167ef3a..a468ce5 100644 --- a/~/CSS/back-image-cover.css +++ b/~/CSS/back-image-cover.css @@ -1,8 +1,8 @@ body{ - margin: 0px; - height: 100vh; - background-image: url('../img/landing.jpg'); - background-size: cover; - background-position: center center; - background-repeat: no-repeat; + margin: 0px; + height: 100vh; + background-image: url('../img/landing.jpg'); + background-size: cover; + background-position: center center; + background-repeat: no-repeat; } diff --git a/~/HTML/SEMATIC-HTML5.md b/~/HTML/SEMATIC-HTML5.md index c18c75e..00c1175 100644 --- a/~/HTML/SEMATIC-HTML5.md +++ b/~/HTML/SEMATIC-HTML5.md @@ -107,22 +107,22 @@ ```html - - - Заголовок страницы - - -
- -
+ + + Заголовок страницы + + +
+ +
-
- -
+
+ +
- - + + ``` diff --git a/~/PHP/Fenom.md b/~/PHP/Fenom.md index 0dceeb4..81ee7d3 100644 --- a/~/PHP/Fenom.md +++ b/~/PHP/Fenom.md @@ -1,11 +1,13 @@ # Fenom + ## IF . ELSEIF . ELSE + ``` {if } - {* ...code... *} + {* ...code... *} {elseif } - {* ...code... *} + {* ...code... *} {else} - {* ...code... *} + {* ...code... *} {/if} ``` diff --git a/~/PHP/gettype.php b/~/PHP/gettype.php index 4dacff2..81d8e04 100644 --- a/~/PHP/gettype.php +++ b/~/PHP/gettype.php @@ -1,18 +1,18 @@ diff --git a/~/PHP/mail.php b/~/PHP/mail.php index e04593b..5447d73 100644 --- a/~/PHP/mail.php +++ b/~/PHP/mail.php @@ -77,21 +77,21 @@ $message = ' - Birthday Reminders for August + Birthday Reminders for August -

Here are the birthdays upcoming in August!

- - - - - - - - - - -
PersonDayMonthYear
Johny10thAugust1970
Sally17thAugust1973
+

Here are the birthdays upcoming in August!

+ + + + + + + + + + +
PersonDayMonthYear
Johny10thAugust1970
Sally17thAugust1973
'; diff --git a/~/Python/irc-bot.py b/~/Python/irc-bot.py index 3d14cd0..73035a1 100755 --- a/~/Python/irc-bot.py +++ b/~/Python/irc-bot.py @@ -16,14 +16,14 @@ irc.send(str.encode('NICK ' + botnick + '\n')) irc.send(str.encode('JOIN '+ channel +'\n')) while True: - text = irc.recv(2040) - print(text) + text = irc.recv(2040) + print(text) - if text.find(str.encode('PING')) != -1: - irc.send(str.encode('PONG ' + str(text.split()[1]) + '\r\n')) + if text.find(str.encode('PING')) != -1: + irc.send(str.encode('PONG ' + str(text.split()[1]) + '\r\n')) - # !time - return current timestamp - if text.find(str.encode('!time')) != -1: - ts = time.time() - irc.send(str.encode('PRIVMSG #admin :{}\r\n'.format(int(ts)))) + # !time - return current timestamp + if text.find(str.encode('!time')) != -1: + ts = time.time() + irc.send(str.encode('PRIVMSG #admin :{}\r\n'.format(int(ts))))