← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 31
  1. Print battery status on the command-line

    Examples: $ acpi -b Battery 0: Full, 100% $ acpi Battery 0: Charging, 88%, 00:05:20 until charged Try also acpi -V.

  2. When running: $ borg create --stats --progress --compress lz4 -e ~/Downloads/ --exclude-caches /path/to/repo::$(date +"%Y-%m-%d_%H:%M:%S") /home/" the shell printed: Failed to create/acquire the lock /path/to/repo/lock.exclusive (timeout) I found a message

  3. Duplicates Print duplicates rows: $ sort file.csv | uniq -d For the following examples I assume email addresses are the fifth column of a csv file.

  4. Check health status of a disk with smartctl

    To find the path to the disk, run lsblk.

  5. Install: $ sudo apt install moreutils Usage: $ vidir then edit file names.

  6. Remove Microsoft’s carriage-return character ^M

    From Stackoverflow: The ^M is a carriage-return character.

  7. Visidata 101: a few commands to get started

    Download Visidata on Trisquel GNU/Linux: $ sudo apt install visidata Open file with Visidata: $ vd file.csv To edit a cell, press e, edit, then press Enter.

  8. Remove duplicated rows of a csv or tsv file

    Print duplicates: $ sort file.csv | uniq -d Create a new file without duplicates: $ awk '!

  9. To convert from hexadecimal to decimal $ echo "ibase=16; 7FF" | bc 2047 Remember: ibase, input ‘i’ base. $ echo $((16#2A)) 42 To convert from decimal to hexadecimal $ printf '%x' 42 2a and: $ echo "obase=16; 10" | bc Remember: obase, output ‘o’ base.

  10. This is a follow up from: https://yctct.com/mutt-gpg-mbsync-msmtp-notmuch TL;DR: update .muttrc create an encrypted file with the password create a directory for the new mailbox update .mbsyncrc update .msmtprc update .config/mutt/mailboxes In .muttrc, ad…

  11. Vim: replace only part of a matched regex

    There is a number 2 here and a dot there:. 1. but we only want to match 1. not 2 :%s/[[:digit:]]\zs\.

  12. Project description This is a project I did to run-through some system administration jobs; that is: running GNU/Linux on a virtual machine Logical Volume Manager (LVM) password policy sudo policy user management lighttpd mariaDB Set up with: virt-manager…

  13. Git: display date when branch was last updated

    $ git reflog --date=local

  14. These are the commands I ran to reinstall Jitsi on my server.

  15. Back up the file we’ll modify: $ cp /etc/hosts /etc/hosts.bak Open the original file: $ sudo nano /etc/hosts Add the following line at the bottom of the file: 127.0.0.1 www.example.com Save the file.

  16. Connect to Mullvad’s servers via Wireguard

    Updated on August 1st 2026.

  17. Install guix package manager on GNU/Linux Trisquel

    I followed this wiki: https://trisquel.info/en/wiki/gnu-guix-package-manager These are the commands I ran: $ sudo apt install guix $ sudo -i guix pull $ sudo systemctl restart guix-daemon.service $ guix pull $ bash -l $ guix install glibc-locales $ exit $

  18. What is Shell Literacy?

    One might define Shell Literacy as one’s ability to interact with a computer via the shell (without graphical interface).

  19. $ git config user.name && git config user.email

  20. Convert a .pdf file into an .epub file

    $ sudo apt-get install poppler-utils $ pdftohtml file.pdf $ pandoc -f html -t epub3 -o output.epub input.html --quiet See: https://yctct.com/html-to-epub/

  21. Vim: Count the number of occurence of a pattern

    In Vim, type: :%s/pattern//gn Or, search for the pattern: /pattern and then display the number of occurence: :%s///gn % tells Vim to search the whole file.

  22. That’s the command I used to back up /home on an external drive using rsync: $ rsync -avh \ archive (recursive and maintain permission, verbose, human readable --stats \ print a summary of how much data was copied --exclude=lost+found \ --exclude=user/.…

  23. $ sudo fdisk -l or; $ df -T or: $ df -T | awk '{match($0,/ +/);print $1,substr($0,RSTART,RLENGTH),$2}' or: cat /proc/mounts | grep filesystem | cut -d " " -f1,3

  24. Rename the label (name) of a filesystem (device)

    With e2label To check the current name run: $ sudo e2label /dev/sdb1 [sudo] password for s04tw: $ The empty lines means the device has no label To rename the label of the filesystem, run: $ sudo e2label /dev/sdb1 new-name To show the new label of the fil…

  25. See: https://trisquel.info/en/wiki/how-format-external-storage-device-using-parted Rename the filesystem’s label (name) You might want to rename the device (filesystem)’s label, see: https://yctct.com/rename-filesystem-label

  26. Start using Make to compile pdf with Pandoc

    For a long time I have used a Pandoc command like this to convert Markdown files to pdf files: $ pandoc -o essay.pdf \ --pdf-engine=xelatex metadata.yaml \ --lua-filter=/home/user/bin/smallscripts/count-para.lua \ --trace essay.md \ I first used to retri…

  27. I’ve been using mupdf for a while but it’s missing smooth scrolling.

  28. Note: I took these notes a few months ago, when I started to set up my own cgit instance.

  29. See part 1: https://yctct.com/cgit-instance-setup-1 Note: I am making these notes a few months after I started to set up my own cgit instance.

  30. My actual keyboard configuration is there: /etc/defaults/keyboard To display the actual configuration run: $ setxkbmap -query rules: evdev model: pc105 layout: ca, de, ir variant: multix, qwerty options: ctrl:nocaps,grp:alt_shift_toggle

  31. List all files tracked by git in a single repository

    Use ls-tree: $ git ls-tree -r main --name-status --full-name main is the name of the branch.