rust hello world

Hello world The basic hello world in Rust. fn main() { // Statements here are executed when the compiled binary is called. // Print text to the console. println!("Hello World!"); } Backlinks rustup

February 25, 2024 · 1 min · Kristian Alexander P

rustup

Install rust Get the installer script here for linux, but also support other os’es like windows. In archlinux, using rustup is the recommended way to install if you intend to program anything in Rust.

February 25, 2024 · 1 min · Kristian Alexander P

hyprland

A wayland compositor.

February 25, 2024 · 1 min · Kristian Alexander P

exchange

Backlinks davmail

February 23, 2024 · 1 min · Kristian Alexander P

microsoft

Backlinks davmail windows

February 23, 2024 · 1 min · Kristian Alexander P

davmail

The answer for microsoft exchange in linux. Configuration davmail.server=true davmail.mode=Auto davmail.url=https://mail.domain.com/EWS/Exchange.asmx davmail.defaultDomain=DOMAIN davmail.ssl.nosecurecaldav=false davmail.ssl.nosecureimap=false davmail.ssl.nosecureldap=false davmail.ssl.nosecurepop=false davmail.ssl.nosecuresmtp=false davmail.caldavPort=1081 davmail.imapPort=1144 davmail.ldapPort=1390 davmail.popPort=1111 davmail.smtpPort=1026 davmail.imapAutoExpunge=true davmail.allowRemote=false davmail.logFilePath=/tmp/davmail-mkn.log davmail.logFileSize=1MB davmail.disableGuiNotifications=true davmail.disableTrayActivitySwitch=true davmail.showStartupBanner=false davmail.enableKerberos=false Systemd user unit most linux distro uses systemd anyway. # /usr/lib/systemd/user/davmail@.service [Unit] Description=DavMail for %i [Service] ExecStart=/usr/bin/davmail %h/.config/davmail/%i.properties Restart=on-failure [Install] WantedBy=default.target DefaultInstance=davmail

February 23, 2024 · 1 min · Kristian Alexander P

systemd

linux init system. emacs systemd user unit Description=Emacs text editor Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/ [Service] Type=notify ExecStart=/usr/bin/emacs --fg-daemon # Emacs will exit with status 15 after having received SIGTERM, which # is the default "KillSignal" value systemd uses to stop services. SuccessExitStatus=15 # The location of the SSH auth socket varies by distribution, and some # set it from PAM, so don't override by default. # Environment=SSH_AUTH_SOCK=%t/keyring/ssh Restart=on-failure [Install] WantedBy=default.target Backlinks davmail

February 23, 2024 · 1 min · Kristian Alexander P

pass

Password Manager for linux. Backlinks msmtp

February 23, 2024 · 1 min · Kristian Alexander P

msmtp

Setup See arch wiki for complete setup in archlinux. My setup # Set default values for all following accounts. defaults auth on tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt logfile /tmp/msmtp.log account gmail host smtp.gmail.com port 587 user alexarians@gmail.com from alexarians@gmail.com passwordeval pass google.com/app_pass/alexarians@gmail.com account hotmail host smtp-mail.outlook.com port 587 user christian.alexander@windowslive.com from christian.alexander@windowslive.com passwordeval pass outlook.live.com/christian.alexander@windowslive.com account ymail host smtp.mail.yahoo.com port 587 user christian.alexander@ymail.com from christian.alexander@ymail.com passwordeval pass login.yahoo.com/app_pass/christian.alexander@ymail.com account yahoo host smtp.mail.yahoo.com port 587 user alexforsale@yahoo.com from alexforsale@yahoo.com passwordeval pass login.yahoo.com/app_pass/alexforsale@yahoo.com account zum host localhost port 1025 tls off tls_starttls off auth plain user ZUM\kristian.alexander from kristian.alexander@zumstar.co.id passwordeval pass zumstar.co.id/kristian.alexander account mkn tls off tls_starttls off auth plain host localhost port 1026 user MKN\kristian.alexander from kristian.alexander@mkncorp.com passwordeval pass mkncorp.com/kristian.alexander account default : yahoo Notes: ...

February 23, 2024 · 1 min · Kristian Alexander P

notmuch

Required Setups Packages notmuch msmtp Preferrably, emacs as a frontend. Message (use-package message :custom (message-directory (expand-file-name ".mail" (getenv "HOME"))) (message-sendmail-envelope-from 'header)) Notes: message-directory should reflects the root directory for mail. sendmail (use-package sendmail :custom (mail-specify-envelope-from t) (mail-envelope-from 'header) (send-mail-function 'sendmail-send-it) (sendmail-program (executable-find "msmtp"))) Notes: sendmail-program should point to the full path. Hooks Post-new #!/usr/bin/env bash _AFEW=$(command -v afew) newcount=$(notmuch count tag:new) summary="Notmuch: ${newcount} new message" [ -n "${_AFEW}" ] && "${_AFEW}" --tag --new -vv if [ $newcount -gt 1 ]; then summary="${summary}s"; fi if [ $newcount -gt 0 ]; then detail="$(notmuch search --output=summary --format=json tag:new | sed -e 's/.*authors": "//;s/|[^"]*"/"/;s/", "subject": "/ : /;s/".*//')"; fi notmuch tag -new -- tag:new # See the notmuch pre-hook for DISPLAY thoughts # Desktop notifications if [ $newcount -gt 0 ]; then logger -t notmuch "calling notify-send '$summary' '$detail'" && notify-send -i /usr/share/icons/Papirus/symbolic/actions/mail-message-new-symbolic.svg "$summary" "$detail"; fi # Stop the astroid spinner; this will refresh the UI [[ "$(pgrep astroid)" != "" ]] && logger -t notmuch "Astroid polling stop requested during post-new hook" && astroid --stop-polling 2>&1 >/dev/null [ "$(command -v notifymuch)" ] && notifymuch exit 0 Pre-new #!/usr/bin/env bash [[ -x $(which offlineimap) ]] && offlineimap -s [[ "$(pgrep astroid)" != "" ]] && logger -t notmuch "Astroid polling start requested during pre-new hook" && astroid --start-polling 2>&1 >/dev/null # Ensure that this script exits with success, otherwise notmuch will fail out. exit 0 Backlinks notmuch

February 23, 2024 · 2 min · Kristian Alexander P