Run git config --global alias.save-branch '!~/scripts/git-save-branch.sh (customize the path to match where you save the script to)
Now you can run git save-branch to run the script
| ```dataviewjs | |
| function countWords(str) { | |
| return str.trim().split(/\s+/).length; | |
| } | |
| // Replace TAG with whatever tag you wish. | |
| const pages = dv.pages('#structure-note and -#meta') | |
| const rows = [] | |
| for (const page of pages) { |
| ;; -*- lexical-binding: t -*- | |
| ;; This is my Emacs config | |
| ;; it is my own, there is none like it | |
| ;; How do I navigate through CamelCase words? | |
| ;; I use the built-in `winner-mode` to remember the window history | |
| ;; Setup melpa | |
| (require 'package) |
| defmodule PasswordValidator.Mixfile do | |
| use Mix.Project | |
| @source_url "https://github.com/axelson/password-validator" | |
| @version "0.5.0" | |
| def project do | |
| [ | |
| app: :password_validator, | |
| name: "Password Validator", |
| defmodule MyApp.ObanUtils do | |
| @doc """ | |
| Wait for our Phoenix Endpoint to come online | |
| Without waiting for the Phoenix Endpoint to start up we have a race condition | |
| where a job may execute that broadcasts a message (which requires the Endpoint | |
| to be running). And additionally our Phoenix controller's depend on Oban to be | |
| running so that `Oban.insert/3` can be used (which gives us guarantees about | |
| uniqueness). |
| defmodule MyApp.ObanUtils do | |
| @doc """ | |
| Wait for our Phoenix Endpoint to come online | |
| Without waiting for the Phoenix Endpoint to start up we have a race condition | |
| where a job may execute that broadcasts a message (which requires the Endpoint | |
| to be running). And additionally our Phoenix controller's depend on Oban to be | |
| running so that `Oban.insert/3` can be used (which gives us guarantees about | |
| uniqueness). |
| children = [ | |
| MyApp.Repo, | |
| MyAppWeb.Telemetry, | |
| {Phoenix.PubSub, name: MyApp.PubSub}, | |
| MyAppWeb.Endpoint, | |
| MyApp.PresenceDrainer # <-- NEW! | |
| ] |
| defmodule MyApp.PresenceDrainer do | |
| use GenServer | |
| require Logger | |
| def start_link(opts \\\\ []) do | |
| GenServer.start_link(__MODULE__, opts, name: __MODULE__) | |
| end | |
| @impl GenServer | |
| def init(_init_arg) do |
| defmodule MyApp.GracefulShutdownHandler do | |
| use GenServer | |
| require Logger | |
| def start_link(opts \\\\ []) do | |
| GenServer.start_link(__MODULE__, opts, name: __MODULE__) | |
| end | |
| @impl GenServer | |
| def init(_init_arg) do | |
| # We need to trap exits so that we receive the `terminate/2` callback during | |
| # a graceful shutdown |
Run git config --global alias.save-branch '!~/scripts/git-save-branch.sh (customize the path to match where you save the script to)
Now you can run git save-branch to run the script
| (setq gist-view-gist t) | |
| (defun jax-aw-maximize-window (window) | |
| "Select buffer in WINDOW." | |
| (aw-switch-to-window window) | |
| (doom/window-maximize-buffer)) |