Posted in Apache Bash CLI Linux Python SysAdmin WebAdmin

Instaliraj LAMPY

  #!/bin/bash # LAMP + Python + SQLite stack sa pipx/pipenv (Ubuntu Server) set -e sudo apt update sudo apt upgrade -y sudo apt install…

Posted in Bash CLI CMD Linux Privatnost Sigurnost Windows

gpg cli cmd tl;dr

gpg kreiranje ključa RSA 4096 sve funkcije, nema rok trajanja gpg –quick-gen-key <%ime.prezime@domena.tld%> rsa4096 cert,auth,sign,encr never gpg izvoz, privatni ključ gpg –armor –export-secret-key <%ime.prezime@domena.tld%> gpg…

Posted in Bash CLI Linux

Ubuntu – XRDP – Terminal – Svaki puta pogrešna tastatura

Rješenje nano ~/.profile dodaj setxkbmap hr setxkbmap xsetxkbmap kbd xkbd keyboard xkeyboard tastatura xtastatura layout xlayout tipkovnica xtipkovnica

Posted in Bash CLI Linux Powershell SysAdmin Windows

WAN IP adresa

bash.sh curl –silent https://ipinfo.io/geo curl –silent https://am.i.mullvad.net/json powershell.ps1 (invoke-webrequest https://ipinfo.io/geo).content ipinfo xipinfo ajpi xajpi wan xwan ipaddress xipaddress address xaddress adresa xadresa

Posted in Bash CLI CMD Linux Windows

PDF2EPUB Pretvori .PDF datoteku u .EPUB

Imaj “Calibre” i: • ebook-convert.exe  dokument.pdf  dokument.pdf.epub –no-default-epub-cover –embed-font-family "Verdana" –pretty-print • ebook-convert.exe "$File" "$File.epub" –no-default-epub-cover –embed-all-fonts –disable-font-rescaling –font-size-mapping 12,12,14,16,18,20,22,24 –insert-blank-line –linearize-tables –insert-blank-line-size 2 Više…

Posted in Bash Linux

Ubuntu Linux – bash – beskonačna povijest (endless history)

Editiraj nano /etc/bash.bashrc # globalni bash shell nano ~/.bashrc # samo za aktivnog korisnika i dodaj export HISTSIZE=-1 export HISTFILESIZE=-1 bash xbash bashrc xbashrc xhistory…

Posted in Bash CLI Linux

Linux – Koja grafička kartica je?

lspci | grep VGA which gpu xwhich xgpu xsysinfo xsi

Posted in Bash CLI Linux

Odjavi svakoga s Linux računala

Prvo se SSH-iraj i pokreni “w” da vidiš tko je online: w Pokazat će nešto kao 15:10:22 up 9 min, 2 users, load average: 0,71,…

Posted in Bash Powershell

Instaliraj Powershell na Ubuntu 22.04

sudo apt-get update sudo apt-get install -y wget apt-transport-https software-properties-common wget -q "https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb" sudo dpkg -i packages-microsoft-prod.deb sudo apt-get update sudo apt-get install -y powershell…

Posted in Bash

Bash skripta za Discord bota

#!/bin/bash daniUtjednu=("NED" "PON" "UTO" "SRI" "CET" "PET" "SUB") danUtjednuBroj=`date +%u` danUtjednu=${daniUtjednu[$danUtjednuBroj]} poruka="\`\`\`powershell\n\ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒\n\ ▓▓▓▓▒ ▓▓▓▓▒\n\ ▓▓▓▓▒ `date +%Y-%m-%d` $danUtjednu ▓▓▓▓▒\n\ ▓▓▓▓▒ ▓▓▓▓▒\n\ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒\n\ \`\`\`" curl…

Posted in Bash CLI CMD Powershell

OCR .PDF datoteke

ocrmypdf -O 3 –tesseract-oem=3 –language=hrv –force-ocr –output-type pdf –sidecar OCR.txt inputFile.pdf temp.pdf Po završetku će datoteka “OCR.txt” imati tekst iz datoteke “inputFile.pdf”. Datoteka “temp.pdf” je…

Posted in Bash CLI Powershell

PDF kontrast i to

magick convert -monitor -density 150 $inputFile -auto-level -gamma .4 -compress JPEG -quality 80 -adaptive-sharpen 2 -antialias -compress JPEG $outputFile https://imagemagick.org/ pdf xpdf jpg xjpg jpeg…

Posted in Bash CLI Linux

Ubuntu upgrade fuckery

How to unfuck Problem grub-efi-amd64-signed : Depends: grub-efi-amd64-bin (= 2.06-2ubuntu7) but 2.06-2ubuntu10 is to be installed Rješenje sudo apt –only-upgrade install grub-efi-amd64-signed xapt xgrub

Posted in Bash CLI CMD Powershell SysAdmin

Nextcloud – Batch upload

Import iz commandlineta u NextCloud:  curl -u <%USERNAME%>:<%LOZINKA%>   -T X:\Proba123.pdf   http://sljedecioblak.server.tld/remote.php/dav/files/datotetke/ xcurl xnextcloud upload batch cli commandline command line xcli xcommandline script xscript

Posted in Bash Linux

Kako instalirati .deb paket – Ubuntu

sudo dpkg –install paket.deb howto kakoda install xdeb xdpkg

Posted in Bash CMD

dig mail server mx record

bash.sh dig +nocmd domena.tld mx +noall +answer Rezultat: domena.tld. 3600 IN MX 5 mail.domena.tld batch.cmd wsl dig +nocmd domena.tld mx +noall +answer xdig xmx dig…

Posted in Bash CLI SysAdmin

Bjutifuliziran messages / system log

sudo apt install ccze -y tail /var/log/messages –sleep-interval=1 –follow | ccze -m ansi less messages syslog beautiful colors boje bojce nešto prekrasno xless xmessages xsyslog…

Posted in Bash Linux

Pogreška tijekom “./configure” faze kompajliranja (nekog prastarog programa?)

Problem checking host system type… Invalid configuration `x86_64-pc-linux-gnuoldld’: machine `x86_64-pc’ not recognized checking target system type… Invalid configuration `x86_64-pc-linux-gnuoldld’: machine `x86_64-pc’ not recognized checking build…

Posted in Bash CLI CMD Linux Powershell Sigurnost SysAdmin Windows

Kako izračunati CRC SHA

powershell.ps1 Get-FileHash -Path datoteka.zip     # default=SHA256 Get-FileHash -Path datoteka.zip -Algorithm SHA1 batch.cmd certutil.exe -hashfile datoteka.zip SHA256 certutil.exe -hashfile datoteka.zip SHA1 bash.sh sha256sum datoteka.zip sha1sum…

Posted in Bash CLI JavaScript Powershell Python

Postoji li datoteka ili ne, pitanje je tad

bash.sh if [   -f "datoteka.txt" ]; then echo "Postoji"   ; fi if [ ! -f "datoteka.xyz" ]; then echo "Ne postoji"; fi batch.cmd if   …