Розбіжності
Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.
Порівняння попередніх версій Попередня ревізія Наступна ревізія | Попередня ревізія | ||
nodeny:others [19/05/2022 06:23] – [Корисні функції Perl] Method | nodeny:others [30/03/2024 11:20] (поточний) – [прибрати сміття в історії] Method | ||
---|---|---|---|
Рядок 3: | Рядок 3: | ||
====== прибрати сміття в історії ====== | ====== прибрати сміття в історії ====== | ||
- | | + | |
- | alias mc mc -u | + | вписати після інших аліасів |
- | + | alias mc mc -u | |
- | | + | |
+ | ====== позиція курсору в редакторі nano ====== | ||
+ | |||
+ | | ||
+ | або | ||
+ | |||
+ | | ||
+ | вписати після інших аліасів | ||
+ | alias nano nano -с | ||
====== Очистити історію shell ====== | ====== Очистити історію shell ====== | ||
Рядок 41: | Рядок 50: | ||
sysrc vmware_guestd_enable=" | sysrc vmware_guestd_enable=" | ||
| | ||
- | ====== для proxmox: ====== | + | ==== Для віртуалізації Proxmox VE ==== |
- | + | Агент віртуалізації Proxmox VE qemu-guest-agent | |
- | apt-get install qemu-guest-agent | + | |
- | | + | Починаючи FreeBSD 13.0 (у 12.2 не перевіряв) |
+ | <code bash> | ||
+ | pkg install qemu-guest-agent | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | sysrc qemu_guest_agent_enable=" | ||
+ | sysrc qemu_guest_agent_flags=" | ||
+ | |||
+ | service | ||
+ | </ | ||
====== для telegram: ====== | ====== для telegram: ====== | ||
Рядок 52: | Рядок 71: | ||
====== for pays from file ====== | ====== for pays from file ====== | ||
- | + | ||
pkg install p5-Text-CSV p5-Text-CSV_XS p5-Spreadsheet-ParseExcel | pkg install p5-Text-CSV p5-Text-CSV_XS p5-Spreadsheet-ParseExcel | ||
+ | |||
====== paysys: ====== | ====== paysys: ====== | ||
pkg install p5-XML-Simple p5-Digest-MD5 p5-MIME-Base64 p5-Data-Dumper p5-LWP-UserAgent-WithCache p5-LWP-Protocol-https p5-Crypt-SSLeay p5-File-Path | pkg install p5-XML-Simple p5-Digest-MD5 p5-MIME-Base64 p5-Data-Dumper p5-LWP-UserAgent-WithCache p5-LWP-Protocol-https p5-Crypt-SSLeay p5-File-Path | ||
+ | | ||
+ | |||
+ | ====== snmp: ====== | ||
+ | |||
+ | pkg install net-snmp p5-Net-SNMP p5-Net-SNMPTrapd | ||
Рядок 70: | Рядок 95: | ||
url: " | url: " | ||
+ | ====== wrong_balance ====== | ||
| | ||
Рядок 113: | Рядок 138: | ||
SHOW GLOBAL VARIABLES WHERE variable_name IN(' | SHOW GLOBAL VARIABLES WHERE variable_name IN(' | ||
+ | [[https:// | ||
- | ====== Proxmox ====== | ||
- | 167 nano / | ||
- | 168 curl http:// | ||
- | 169 apt-get update | ||
- | 170 curl http:// | ||
- | 171 curl http:// | ||
- | 172 wget http:// | ||
- | 173 wget http:// | ||
- | 174 apt install curl | ||
- | 175 curl http:// | ||
- | 176 curl http:// | ||
- | 177 curl http:// | ||
- | 178 apt-get update | ||
- | 179 curl http:// | ||
- | 180 curl http:// | ||
- | 181 curl http:// | ||
- | 182 sudo apt-get update | ||
- | 183 sudo gpg --no-default-keyring --keyring / | ||
- | 184 sudo gpg --no-default-keyring --keyring / | ||
- | 185 curl http:// | ||
- | 186 apt-get install hponcfg -y | ||
- | 187 hponcfg -f passwd_reset_ilo.xml -l log.txt | ||
- | 188 ssacli ctrl all show config | ||
- | 189 sudo ssacli ctrl all show config | ||
- | 190 apt-get install ssacli | ||
- | 191 ssacli ctrl all show config | ||
- | 192 ssacli ctrl all show status | ||
- | 193 ssacli rescan | ||
- | 194 ssacli ctrl slot = 0 ld all show status | ||
- | 195 ssacli ctrl slot=0 create type=ld drives=2I: | ||
- | 196 ssacli ctrl slot = 0 ld all show status | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | ====== Корисні функції Perl ====== | ||
- | |||
- | <code perl> | ||
- | I remember seeing this awhile ago on this list and saved it: | ||
- | #bin2dec: | ||
- | $out = unpack(" | ||
- | #bin2hex: | ||
- | $out = unpack(" | ||
- | #bin2oct: | ||
- | $out = sprintf " | ||
- | #dec2bin: | ||
- | $out = unpack(" | ||
- | #dec2hex: | ||
- | $out = unpack(" | ||
- | #dec2oct: | ||
- | $out = sprintf " | ||
- | #hex2bin: | ||
- | $out = unpack(" | ||
- | #hex2dec: | ||
- | $out = hex $in; | ||
- | #hex2oct: | ||
- | $out = sprintf " | ||
- | #oct2bin: | ||
- | $out = unpack(" | ||
- | #oct2dec: | ||
- | $out = oct $in; | ||
- | #oct2hex: | ||
- | $out = unpack(" | ||
- | #hex2ansii | ||
- | $out = pack(' | ||
- | #is ipv4 | ||
- | my $ok = ' | ||
- | |||
- | sub ip2bin { | ||
- | my $ip = shift; | ||
- | my $bin = join('', | ||
- | return $bin; | ||
- | return unpack(' | ||
- | } | ||
- | |||
- | sub bin2ip { | ||
- | my $bin = shift; | ||
- | return join ' | ||
- | } | ||
- | |||
- | sub ip2num { | ||
- | my $ip = shift; | ||
- | return unpack(" | ||
- | return unpack(' | ||
- | } | ||
- | |||
- | sub num2ip { | ||
- | my $num = shift; | ||
- | my $res = (($num>> | ||
- | return $res; | ||
- | } | ||
- | |||
- | # decode utf like \x{42f} | ||
- | print Dumper(%mydata) =~ s/ | ||
- | </ |