Wednesday

tmux session management

In tmux, you can create a new session using the tmux command followed by the new-session command. Here's the basic syntax:

bash
tmux new-session -s session_name

Replace session_name with the desired name for your new session. If you don't specify a name, tmux will assign a default name.

Here are a few examples:

  1. To create a new session named "mysession":

    bash
  • tmux new-session -s mysession
  • To create a new session without specifying a name:

    bash
    1. tmux new-session

    After running the new-session command, you will be switched to the new session. You can then use tmux commands to manage and navigate between sessions.

    Here are some useful tmux session management commands:

    • Switching between sessions:

      • Switch to the last session: tmux switch-client -n
      • Switch to a specific session by name: tmux switch-client -t session_name
    • Listing sessions:

      • List existing sessions: tmux list-sessions or tmux ls
    • Detaching from a session:

      • Detach from the current session (leave it running in the background): tmux detach-client
    • Attaching to a session:

      • Attach to the last session: tmux attach
      • Attach to a specific session by name: tmux attach -t session_name
    • Killing a session:

      • Kill a session: tmux kill-session -t session_name

    Remember that you can customize the key bindings and create scripts to simplify these commands based on your preferences. To customize tmux behavior, you can add configurations to your ~/.tmux.conf file.

    Tuesday

    what is best javascript framework for showing large grids of data (research)

    As of my last knowledge update in January 2022, some popular JavaScript frameworks and libraries for displaying large grids of data include:

    1. Ag-Grid:

      • Description: Ag-Grid is a feature-rich data grid that is highly customizable and optimized for large datasets. It supports a wide range of features such as sorting, filtering, grouping, and virtual scrolling.
      • Website: Ag-Grid
    2. React Data Grid:

      • Description: React Data Grid is part of the AdapTable library and is built specifically for React applications. It offers features like sorting, filtering, and customizable cell rendering.
      • Website: React Data Grid
    3. Handsontable:

      • Description: Handsontable is a data grid library that provides a spreadsheet-like interface. It supports features like sorting, filtering, and data validation.
      • Website: Handsontable
    4. SlickGrid:

      • Description: SlickGrid is a fast, customizable, and lightweight grid control. It's designed for handling large amounts of data with features like sorting, filtering, and cell editing.
      • GitHub: SlickGrid
    5. Vue Table Component:

      • Description: Vue Table Component is a simple and lightweight grid component for Vue.js. It allows you to display data with features like sorting and pagination.
      • GitHub: Vue Table Component
    6. DataTables:

      • Description: DataTables is a jQuery-based plugin that provides a flexible and feature-rich solution for displaying data in tables. It supports server-side processing for handling large datasets.
      • Website: DataTables
    7. Angular Material Table:

      • Description: Angular Material provides a table component that is well-integrated with Angular. It supports features like sorting, pagination, and filtering.
      • Documentation: Angular Material Table

    Keep in mind that the "best" framework or library depends on your specific requirements, such as the framework you are using (React, Angular, Vue, etc.) and the features you need. Additionally, the landscape may have evolved, and new libraries may have been introduced since my last update. Always check the latest documentation and community feedback to make an informed decision.

    Saturday

    midnight commander shortcuts cheatsheet

     In the shortcuts below, "C" stands for CTRL and "A" stands for "ALT". This is a convention

    used in the Midnight Commander documentation and was kept here.
    
    You can also use "ESC" instead of "ALT", which is useful on Macbooks.
    
    Main View
    ---------------------------------------------------------------
    - File/directory operations
        F3                        View file
        Shift + F3                View raw file (disregard extension)
        F5                        Copy selected files
        F6                        Move selected files
        Shift + F6                Rename file under cursor
        Shift-F4                  Create a new file
        C-x d                     Compare directories
        C-x c                     Chmod dialog
        C-x o                     Chown dialog
        C-x C-s                   Edit symlink
        C-x s                     Create symlink dialog
        C-x l                     Create hard link dialog
        C-x v                     Run relative symbolic link tool on selected or tagged items
        C-x a                     List active VFS directories
    
    - Selection
        Insert / C-t              Select/deselect file
        *                         Invert selection on files
        +                         Specify file selection options (including custom pattern)
        -                         Same as above, but for deselecting
    
    - Navigation
        TAB /  / C-i              Jump from one panel to the other
        F9                        Select the top menu bar
        Esc Esc                   Quickly dismiss menus/pop-ups (skip the timeout for "Single press" from the configuration)
        A-c                       Quick cd dialog
        A-?                       Search dialog
        C-s                       Search for item
        A-s                       Incremental search (A-s again to jump to next occurence)
        A-y                       Move to the previous directory in the directory history
        A-u                       Move to the next directory in the directory history
        A-Shift-h                 Show path history
        C-\                       Directory Hotlist
        C-p / Up arrow            Move selection bar to the previous entry in the panel
        C-n / Down arrow          Move selection bar to the next entry in the panel
        A-g                       Move selection bar to the first visible item in the panel
        A-r                       Move selection bar to the middle item in the panel
        A-j                       Move selection bar to the last visible item in the panel
        A-v / Page up             Move selection bar one page up
        A-p / Page down           Move selection bar one page down
        A-< / Home                Move selection bar to the top (first entry)
        A-> / End                 Move selection bar to the bottom (last entry)
    
    - Display
        C-r                       Refresh current panel
        C-u                       Swap panels
        A-,                       Toggle panel layout (horizontal/vertical)
        C-x i                     Toggle other panel to information mode
        C-x q                     Toggle other panel to quick view mode
        A-i                       Make the other panel show the same directory as the current
        A-o                       Display the contents of the highlighted dir in the other panel
        A-t                       Change panel view (full, brief, long)
        A-.                       Toggle "Show Hidden Files" feature
    
    - Command prompt
        C-o                       Drop to the console
        A-Enter                   Put the name of the highlighted file on command line
        C-x t                     Put the name of the selected items on command line
        C-Shift-Enter             Put the full path of the highlighted file on command line
        A-a / C-x p               Put the full path of the pane directory on the command line
        A-h                       Show command history
        A-n / A-p                 Navigate up/down through the command history
        C-x !                     External Panelize (fill current panel with the output of a command)
        C-x j                     Show background jobs
        F2-@                      Run a command on the currently highlighted item, e.g.:
            F2-@ unzip                Unzip selected file
            F2-@ zip -r foo.zip       Zip current directory as foo.zip
            F2-@ 7za x                Extract selected file with 7zip
            F2-@ 7za a foo.7z         7zip current directory as foo.7z
    
    - Others
        Shift-F10                 Quiet exit, without confirmation
    
    
    File View
    ---------------------------------------------------------------
        C-f                           View the next file
        C-b                           View the previous file

    test smtp server with powershell

    Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...