0107

January 7, 2021

Install org-roam and org-roam-server in spacemacs

  • first of all, have spacemacs installed
  • add (org :variables org-enable-roam-support t) inside dotspacemacs-configuration-layers
  • add org-roam-server inside dotspacemacs-additional-packages
  • copy THE FOLLOWING CODE inside user-config
# from the readme of https://github.com/org-roam/org-roam-server

(use-package org-roam-server
  :ensure t
  :config
  (setq org-roam-server-host "127.0.0.1"
        org-roam-server-port 8080
        org-roam-server-authenticate nil
        org-roam-server-export-inline-images t
        org-roam-server-serve-files nil
        org-roam-server-served-file-extensions '("pdf" "mp4" "ogv")
        org-roam-server-network-poll t
        org-roam-server-network-arrows nil
        org-roam-server-network-label-truncate t
        org-roam-server-network-label-truncate-length 60
        org-roam-server-network-label-wrap-length 20))

Create specific file extension handler by xdg-mime

  • All the needed information is in man xdg-mine

  • first, Check the actual mine-type with xdg-mine query filetype filename.ext (the response could be e.g. application/octet-stream)

  • second, if you decide to create your own mine-type you should edit an XML file. You should check if the mine-type name you want to create exists to not to override it. You can see the registered mime-types in /usr/share/applications/defauls.list

  • Then, it’s time to register the new mine-type with sudo xdg-mime install –mode system MyApp-MyFileType.xml to install for all users on the system

  • At this point, if you check again the mime-type (like previous step) you should have the desired responce (your new mine-type).

  • Now it’s time to register the new mine-type with the desired application. The association is done with sudo xdg-mine default MyApp.desktop text/mfe. To see the available .desktop files just do: ls /usr/share/applications | less

  • Optional, register the icon with xdg-icon-resoure

  • xml file example

<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="text/mfe">
    <comment>File for MyApp</comment>
    <glob pattern="*.mfe"/>
  </mime-type>
</mime-info>

Unicode table

  • from: https://unicode-table.com/en/
  • ✅ 2705 ✓ 2713 ✔ 2714 ☑ 2611
  • ❌ 274c ❎ 274e ✖ 2716 ✗ 2717 ✘ 2718 ☒ 2612
  • ★ 2605 ☆ 2606 ✯ 272f ⚝ 269d
  • ♡ 2661 ♥ 2665 ❤ 2764

Tcpdump filter

  • basic command: tcpdump

  • port: port num | src port num | dst port num

  • interface: -i interface | -i enp0s3

  • address: host addr | host 192.168.1.1 | src host 192.168.1.1 | dst host 192.168.1.1

  • logic : and && or || not !

  • net: net 192.168 | src net 192.168 | dst 192.168

  • protocol: arp | ip | tcp | udp | icmp

  • from https://www.cnblogs.com/jiujuan/p/9017495.html