<commit_before>* Git
** .gitconfig file

#+begin_src gitconfig :tangle ~/.gitconfigC-SPC
  [core]
          editor = emacsclient -t

  [rerere]
          enabled = true

  [color]
          ui = auto

  [merge]
          conflictStyle = diff3

  [diff]
          # Remove `a/` and `b/` prefixes from diffs.
          noprefix = true
#+end_src

** Update git author info in history

#+begin_src sh
  cd path/to/repo

  git filter-branch -f --env-filter '

  OLD_EMAIL="<EMAIL>"
  CORRECT_NAME="username"
  CORRECT_EMAIL="<EMAIL>"

  if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
  then
      export GIT_COMMITTER_NAME="$CORRECT_NAME"
      export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
  fi
  if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
  then
      export GIT_AUTHOR_NAME="$CORRECT_NAME"
      export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
  fi
  ' --tag-name-filter cat -- --branches --tags
#+end_src

** Force push (updated history)

#+begin_src sh
  git push --force --tags origin 'refs/heads/*'
#+end_src

* Mpv

** mpv.conf

#+begin_src conf :mkdirp yes :tangle ~/.mpv/mpv.conf
  ontop
#+end_src

* Karabiner
#+begin_src json :mkdirp yes :tangle ~/.config/karabiner/karabiner.json
  {
      "global": {
          "check_for_updates_on_startup": true,
          "show_in_menu_bar": true,
          "show_profile_name_in_menu_bar": false
      },
      "profiles": [
          {
              "complex_modifications": {
                  "parameters": {
                      "basic.simultaneous_threshold_milliseconds": 50,
                      "basic.to_delayed_action_delay_milliseconds": 500,
                      "basic.to_if_alone_timeout_milliseconds": 1000,
                      "basic.to_if_held_down_threshold_milliseconds": 500,
                      "mouse_motion_to_scroll.speed": 100
                  },
                  "rules": [
                      {
                          "description": "Ctrl+p/Ctrl+n to arrow up/down",
                          "manipulators": [
                              {
                                  "from": {
                                      "key_code": "p",
                                      "modifiers": {
                                          "mandatory": [
                                              "control"
                                          ]
                                      }
                                  },
                                  "to": [
                                      {
                                          "key_code": "up_arrow"
                                      }
                                  ],
                                  "type": "basic"
                              },
                              {
                                  "from": {
                                      "key_code": "n",
                                      "modifiers": {
                                          "mandatory": [
                                              "control"
                                          ]
                                      }
                                  },
                                  "to": [
                                      {
                                          "key_code": "down_arrow"
                                      }
                                  ],
                                  "type": "basic"
                              }
                          ]
                      },
                      {
                          "description": "Ctrl+G to Escape",
                          "manipulators": [
                              {
                                  "description": "emacs like escape",
                                  "from": {
                                      "key_code": "g",
                                      "modifiers": {
                                          "mandatory": [
                                              "left_control"
                                          ]
                                      }
                                  },
                                  "to": [
                                      {
                                          "key_code": "escape"
                                      }
                                  ],
                                  "conditions": [
                                      {
                                          "type": "frontmost_application_unless",
                                          "bundle_identifiers": [
                                              "^org\\.gnu\\.Emacs"
                                          ]<commit_msg>Apply karabiner bindings when Emacs is not in the foreground<commit_after>* Git
** .gitconfig file

#+begin_src gitconfig :tangle ~/.gitconfigC-SPC
  [core]
          editor = emacsclient -t

  [rerere]
          enabled = true

  [color]
          ui = auto

  [merge]
          conflictStyle = diff3

  [diff]
          # Remove `a/` and `b/` prefixes from diffs.
          noprefix = true
#+end_src

** Update git author info in history

#+begin_src sh
  cd path/to/repo

  git filter-branch -f --env-filter '

  OLD_EMAIL="<EMAIL>"
  CORRECT_NAME="username"
  CORRECT_EMAIL="<EMAIL>"

  if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
  then
      export GIT_COMMITTER_NAME="$CORRECT_NAME"
      export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
  fi
  if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
  then
      export GIT_AUTHOR_NAME="$CORRECT_NAME"
      export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
  fi
  ' --tag-name-filter cat -- --branches --tags
#+end_src

** Force push (updated history)

#+begin_src sh
  git push --force --tags origin 'refs/heads/*'
#+end_src

* Mpv

** mpv.conf

#+begin_src conf :mkdirp yes :tangle ~/.mpv/mpv.conf
  ontop
#+end_src

* Karabiner
#+begin_src json :mkdirp yes :tangle ~/.config/karabiner/karabiner.json
  {
      "global": {
          "check_for_updates_on_startup": true,
          "show_in_menu_bar": true,
          "show_profile_name_in_menu_bar": false
      },
      "profiles": [
          {
              "complex_modifications": {
                  "parameters": {
                      "basic.simultaneous_threshold_milliseconds": 50,
                      "basic.to_delayed_action_delay_milliseconds": 500,
                      "basic.to_if_alone_timeout_milliseconds": 1000,
                      "basic.to_if_held_down_threshold_milliseconds": 500,
                      "mouse_motion_to_scroll.speed": 100
                  },
                  "rules": [
                      {
                          "description": "Ctrl-p/Ctrl-n to arrow up/down",
                          "manipulators": [
                              {
                                  "from": {
                                      "key_code": "p",
                                      "modifiers": {
                                          "mandatory": [
                                              "control"
                                          ]
                                      }
                                  },
                                  "to": [
                                      {
                                          "key_code": "up_arrow"
                                      }
                                  ],
                                  "conditions": [
                                      {
                                          "type": "frontmost_application_unless",
                                          "bundle_identifiers": [
                                              "^org\\.gnu\\.Emacs"
                                          ]
                                      }
                                  ],
                                  "type": "basic"
                              },
                              {
                                  "from": {
                                      "key_code": "n",
                                      "modifiers": {
                                          "mandatory": [
                                              "control"
                                          ]
                                      }
                                  },
                                  "to": [
                                      {
                                          "key_code": "down_arrow"
                                      }
                                  ],
                                  "conditions": [
                                      {
                                          "type": "frontmost_application_unless",
                                          "bundle_identifiers": [
                                              "^org\\.gnu\\.Emacs"
                                          ]
                                      }
                                  ],
                                  "type": "basic"
                              }
                          ]
                      },
                      {
                          "description": "Ctrl+G to Escape",
                          "manipulators": [
                              {
                                  "description": "Emacs-like escape",
                                  "from": {
                                      "key_code": "g",
                                      "modifiers": {
                                          "mandatory": [
                                              "left_control"
                                          ]
                                      }
                                  },
                                  "to": [
                                      {
                                          "key_code": "escape"
                                      }
                                  ],
                                  "conditions": [
                                      {
                                          "type": "frontmost_application_unless",
                                          "bundle_identifiers": [
                                              "^org\\.gnu\\.Emacs"
                                          ]
{'fraction_non_alphanumeric': 0.0840703664107299, 'fraction_numerical': 0.0031101176013218, 'mean_word_length': 0.6063065875741492, 'pattern_counts': {'":': 88, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 143, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '839952', 'n_tokens_mistral': 2336, 'n_tokens_neox': 2165, 'n_words': 366}