This file contains hidden or 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 | |
# pcinfo.sh | |
# --- | |
# Collect general inormation about PC hardware, | |
# generate nice report and print to cli or file | |
# -------------------------------------------------------- | |
# author : [email protected] | |
# license : GNU | |
# date : 17.02.2022 | |
# src : https://gist.github.com/colorwebdesigner/b8cd5225741066c502c2f9435f7ae47a |
This file contains hidden or 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 | |
# modx_update | |
# | |
# MODx Revo advanced update script | |
# 1) Put this file in your website folder | |
# 2) Make it executable | |
# 3) Run | |
# -------------------------------------------------------- | |
# Script will automaticaly find all configs, core folder | |
# (even if you change default name and location), make |
This file contains hidden or 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 | |
# system-updater | |
# --- | |
# CLI GUI for system update and upgrade | |
# -------------------------------------------------------- | |
# author: Ivan Pro Tools | |
# github: https://github.com/colorwebdesigner | |
# date: 17-01-2022 | |
# license: GNU | |
# -------------------------------------------------------- |
This file contains hidden or 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 | |
# translit function | |
# ---------------------- | |
translit() { | |
local trs="${1// /-}" | |
trs=$(sed "y/абвгдезийклмнопрстуфхцы/abvgdezijklmnoprstufxcy/" <<< "${trs}") | |
trs=$(sed "y/АБВГДЕЗИЙКЛМНОПРСТУФХЦЫ/ABVGDEZIJKLMNOPRSTUFXCY/" <<< "$trs") | |
trs=${trs//ч/ch} |
This file contains hidden or 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
<? | |
$filter = Array ("xxxxxxx" => "xx"); | |
$rsUsers = CUser::GetList(($by="ID"), ($order="asc"), $filter); | |
while($rsUsers->NavNext(true, "f_")) : | |
echo "[".$f_ID."] (".$f_LOGIN.") ".$f_NAME." ".$f_LAST_NAME."<br>"; | |
endwhile; | |
?> |
This file contains hidden or 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
/* | |
-------------------------------------- | |
Restore backup password | |
start from PHP console in your Bitrix admin | |
-------------------------------------- | |
*/ | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/backup.php"); | |
var_dump(CPasswordStorage::Get('dump_temporary_cache')); |
This file contains hidden or 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
# For root user | |
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u\[\033[01;34m\]@\h:\[\033[;033m\]\w\[\033[00m\] \$ " | |
# For common user | |
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[01;34m\]@\h:\[\033[;033m\]\w\[\033[00m\] \$ " |
This file contains hidden or 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
============================================================ | |
Welcome to \n.\o server, stranger! | |
I see that you are trying to log on \l at \t, | |
so i make note about it in my log file and report my master. | |
Big brother already watching you. | |
------------------------------------------------------------ | |
I'm based on Debian GNU/\s \r, so be jentle, | |
like other \U inside. | |
============================================================ |
This file contains hidden or 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 | |
# ============================ | |
# Found in install.sh from dnote | |
# https://github.com/dnote/dnote/blob/master/install.sh | |
# ============================ | |
http_download() { | |
dest=$1 | |
srcURL=$2 | |
if is_command curl; then |
This file contains hidden or 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
# ============================== | |
# setNtpServers | |
# ============================== | |
# Mikrotik RB951G-2HnD | |
# RouterOS v6.46.4 (stable) | |
# --- | |
# Corrects IP addresses of NTP servers in | |
# System -> NTP Client (if they have changed), | |
# resolve IPs by NTP domains and send message | |
# to Slack. |
NewerOlder