From a843a46ac0485cb7d0d11e945d4baa55adf3720b Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Sun, 19 Jul 2020 12:57:35 -0500 Subject: [PATCH] Been a looong time since I committed stuff --- bin.org | 18 +++ dotprofile.org | 273 +++++++++++++++++++++++++++++----------- emacs.org | 110 ++++++++++------ git.org | 199 +++++++++++++++++------------ nix.org | 31 ++--- options/C02ZD01LLVDR.el | 15 +++ tmux.org | 184 +++++++++++++++++++-------- z9999-cray.org | 149 ++++++++++++---------- 8 files changed, 649 insertions(+), 330 deletions(-) create mode 100644 options/C02ZD01LLVDR.el diff --git a/bin.org b/bin.org index 4c46ff1..ea4211e 100644 --- a/bin.org +++ b/bin.org @@ -1096,3 +1096,21 @@ TODO: why the hell is :mkdirp yes needed here but nowhere else? end end #+END_SRC +* ~/bin/close + +macos only, simple wrapper around osascript to send close to a gui application so I don't have to use the mouse/trackpad cause I'm lazy af. + +#+BEGIN_SRC sh :padline no :tangle (tangle/file "bin/close" (bound-and-true-p macos-p)) +#!/bin/sh + +if [ -z "${1}" ]; then + printf "usage: close app_name\n no application to close provided\n" + exit 1 +fi + +osascript < /dev/null 2>&1 - [ $? = 0 ] && proto=$(echo "${1}" | sed -e 's|[:]\/\/.*||g') - git_dir=$(echo "${1}" | sed -e 's|.*[:]\/\/||g') - rrepo="${proto}://${git_dir}" - - # strip user@, :NNN, and .git from input uri's - repo="${destination}/"$(echo "${git_dir}" | - sed -e 's/\.git$//g' | - sed -e 's|.*\@||g' | - sed -e 's|\:[[:digit:]]\{1,\}\/|/|g' | - tr -d '~') - - if [ ! -d "${repo}" ]; then - git ls-remote "${rrepo}" > /dev/null 2>&1 - if [ $? = 0 ]; then - mkdir -p "${repo}" - echo "git clone ${rrepo} ${repo}" - git clone --recursive "${rrepo}" "${repo}" + try_git() + { + # assume https if input doesn't contain a protocol + proto=https + destination=${HOME}/src + branch="${2:-master}" + + echo "${1}" | grep '://' > /dev/null 2>&1 + [ $? = 0 ] && proto=$(echo "${1}" | sed -e 's|[:]\/\/.*||g') + git_dir=$(echo "${1}" | sed -e 's|.*[:]\/\/||g') + rrepo="${proto}://${git_dir}" + + # strip user@, :NNN, and .git from input uri's + repo="${destination}/"$(echo "${git_dir}" | + sed -e 's/\.git$//g' | + sed -e 's|.*\@||g' | + sed -e 's|\:[[:digit:]]\{1,\}\/|/|g' | + tr -d '~') + + if [ ! -d "${repo}" ]; then + if git ls-remote "${rrepo}" > /dev/null 2>&1; then + mkdir -p "${repo}" + echo "git clone ${rrepo} ${repo}" + git clone --recursive "${rrepo}" "${repo}" + else + echo "${rrepo} doesn't look to be a git repository" + fi + fi + + if [ "${branch}" != "master" ]; then + wtdir="${repo}@${branch}" + if [ -d "${wtdir}" ]; then + cd "${wtdir}" + else + if git branch -r --list 'origin/*' | grep -E "^\s+origin/${branch}$" > /dev/null 2>&1; then + git worktree add ${repo}@${branch} ${branch} && cd "${wtdir}" + fi + fi else - echo "${rrepo} doesn't look to be a git repository" + [ -d "${repo}" ] && cd "${repo}" fi - fi - [ -d "${repo}" ] && cd "${repo}" -} + } -gh() -{ - maybe_git_repo "https://github.com/${1}" -} + gh() + { + try_git "https://github.com/${1}" "${2:-master}" + } -bb() -{ - maybe_git_repo "https://bitbucket.org/${1}" -} + bb() + { + try_git "https://bitbucket.org/${1}" "${2:-master}" + } #+END_SRC ** haskell #+BEGIN_SRC sh :tangle (tangle/file ".profile" (bound-and-true-p haskell-p)) @@ -256,27 +301,10 @@ mk_nix_shell() > shell.nix; } -nix_env_setup() +# TODO: any of this useful to keep around? +nr() { - # The nix installer put something like this into the .profile. - # BAD INSTALLER NO COOKIE! - if [ -e ${HOME}/.nix-profile/etc/profile.d/nix.sh ]; then - . ${HOME}/.nix-profile/etc/profile.d/nix.sh; - export NIX_PATH=nixpkgs=${HOME}/src/github.com/NixOS/nixpkgs:staging=${HOME}/src/github.com/NixOS/nixpkgs/staging - export NIX_CFLAGS_COMPILE="-idirafter /usr/include" - export NIX_CFLAGS_LINK="-L/usr/lib" - export PKG_CONFIG_PATH="~/.nix-profile/lib/pkgconfig" - - NIX_GHC=$(type -p ghc > /dev/null 2>&1) - if [ -n "$NIX_GHC" ]; then - eval $(grep export "$NIX_GHC") - fi - fi - - nr() - { - nix-shell --run "$(echo $@)" - } + nix-shell --run "$(echo $@)" } nix-on() { @@ -299,9 +327,15 @@ if [ ! -e ${HOME}/.nonix ]; then fi #+END_SRC +The nix installer adds this which I don't want, $HOME is fully prefixed in what is added. + +#+BEGIN_SRC sh :tangle no +if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh # added by Nix installer +#+END_SRC + #+BEGIN_SRC sh :tangle (tangle/file ".profile" (bound-and-true-p nix-p)) -if [ ! -e ${HOME}/.nonix ]; then - nix_env_setup +if [ ! -e ${HOME}/.nonix ] && [ -e ~/.nix-profile/etc/profile.d/nix.sh ]; then + source ~/.nix-profile/etc/profile.d/nix.sh fi #+END_SRC @@ -393,35 +427,122 @@ export PATH Cray specific stuff. +Note the stash function uses the wrapper to try for project/repo first, and iff that fails then tries for the input a second time as user/repo. + #+BEGIN_SRC sh :tangle (tangle/file ".profile" (bound-and-true-p cray-p)) stash() { - maybe_git_repo "ssh://git@stash.us.cray.com:7999/${1}.git" || \ - maybe_git_repo "ssh://git@stash.us.cray.com:7999/~${1}.git" + try_git "ssh://git@stash.us.cray.com:7999/${1}.git" "${2:-master}" || \ + try_git "ssh://git@stash.us.cray.com:7999/~${1}.git" "${2:-master}" } - haste() + stopit () { - set -e - URL=http://buildservice.us.cray.com:7777/ - if [ ! -z "$@" ]; then - for x in "$@"; do - if [ -f "${x}" ]; then - curl -X POST -s -d "@${x}" ${URL}documents | awk -F '"' '{print "'$URL'"$4}'; - else - echo "file ${x} does not exist to upload" - fi - done + sudo pkill -fai -P1 microsoft + sudo pkill -fai -P1 ntpd + sudo killall Python + sudo killall java + } + + # Every week check to see if ad password will be close to expiring. + if [ -e ~/.password ]; then + pfile=~/.password + last=$(cat ${pfile}) + now=$(date +%s) + if [ $(( (now - last) > (60*60*24*7) )) -ne 0 ]; then + ~/bin/adexpire + echo "${now}" > ${pfile} + fi + fi + + # wats() + # { + # eval $(ioreg -n AppleSmartBatteryManager -r -l | grep -iE '\"(Voltage|InstantAmperage)\" =' | tr -d '"' | tr -d " ") + # printf "~ %.2f watts\n" $(( (Voltage/1000.0) * (InstantAmperage/1000.0) )) + # } + # eval $(system_profiler SPPowerDataType | grep -iE 'Amperage|Voltage' | sed -e 's| [(]m[AV][)][:] |=|g' | tr -d '-') + # printf "~ %.2f watts\n" $(( (Voltage/1000.0) * (Amperage/1000.0) )) + + chkupdate() + { + (sudo softwareupdate --list --all & + /Library/Application\ Support/Microsoft/MAU2.0/Microsoft\ AutoUpdate.app/Contents/MacOS/msupdate --list & + wait + ) + } + + updateitall() + { + (sudo softwareupdate --install --all --include-config-data + /Library/Application\ Support/Microsoft/MAU2.0/Microsoft\ AutoUpdate.app/Contents/MacOS/msupdate --install & + wait + ) + } + + # os_token() + # { + # token_sh=$(openstack token issue -c id -c project_id -f shell) + # os_rc=$? + # token_eval=$(echo "${token_sh}" | sed -e 's|project_id=|export OS_PROJECT_ID=|' -e 's|id=|export OS_TOKEN=|') + + # # strip out OS_ vars we don't want exposed any longer, force auth to using tokens + # if [ $os_rc ] ; then + # eval "$token_eval" + # export OS_AUTH_TYPE=token + # unset OS_PASSWORD + # unset OS_USER_DOMAIN_NAME + # else + # printf "nope %s rc: $d" "$token_sh" "$os_rc" >&2 + # fi + # } +#+END_SRC + +Ldapsearch aliases to make it easier to poke around in ldap. + +NOTE: most of these examples are just using filters on data in ldap + they also presume you're on the relevant vpn + +dump out a specific user in the cray ldap +cray "(sAMAccountName=$USER)" +examples: + +Get a managers employee number in hpe ldap +hpe "(cn=*eter*ojanic)" cn employeeNumber + +Then get all the email addresses of their reports +hpe "(managerEmployeeNumber=35016016)" cn mail + +#+BEGIN_SRC sh :tangle (tangle/file ".profile" (bound-and-true-p cray-p)) + alias cray='LDAPTLS_REQCERT=never ldapsearch -ZZ -x -h cfdc01.us.cray.com -b "OU=Users,OU=Cray Objects,DC=americas,DC=cray,DC=com" -s sub' + alias hpe='ldapsearch -LLL -x -H ldaps://hpe-pro-ods-ed.infra.hpecorp.net -b o=hp.com' +#+END_SRC + +silly functions to make using k8s in minikube a bit less annoying + +#+BEGIN_SRC sh :tangle (tangle/file ".profile" (bound-and-true-p cray-p)) + mk() + { + if [ $1 = "kubectl" ]; then + shift; + echo minikube kubectl -- $* + minikube kubectl -- $* else - cat /dev/stdin | curl -X POST -s -d "@-" ${URL}documents | awk -F '"' '{print "'$URL'"$4}'; + echo minikube $* + minikube $* fi - set +e } +#+END_SRC - stopit () +#+BEGIN_SRC sh :tangle (tangle/file ".profile" (bound-and-true-p cray-p)) + fixpock() { - killall -m '.*icrosoft.*' - sudo killall Python - sudo killall java + close Pock + open -a Pock + } + + leaving() + { + fixpock + hdiutil eject /Volumes/backup } #+END_SRC diff --git a/emacs.org b/emacs.org index b181c74..3daf5c3 100644 --- a/emacs.org +++ b/emacs.org @@ -411,11 +411,14 @@ Also have the scratch buffer be empty instead of have the derp message I never r *** fonts -List of fonts in order of preference. +List of fonts in order of preference. Set preferred font list when we're in a +gui emacs session. #+BEGIN_SRC emacs-lisp (defvar my/gui-fonts '( + "ComicCode" + "Comic Code" "PragmataPro" "Pragmata Pro" ;; Seems to register differently on osx than X "Source Code Pro" @@ -423,14 +426,9 @@ List of fonts in order of preference. "Monaco" ) ) -#+END_SRC - -Set preferred font list when we're in a gui emacs session. - -#+BEGIN_SRC emacs-lisp (with-no-warnings (when window-system - (if (find-font (font-spec :name (car my/gui-fonts))) + (if (find-font (font-spec :name (car my/gui-fonts))) (progn (set-frame-font (car my/gui-fonts)) (set-face-attribute 'default nil :height 180)) (progn (set-gui-font (cdr my/gui-fonts)))) @@ -460,6 +458,17 @@ Set preferred font list when we're in a gui emacs session. All the packages I use. +*** editorconfig + +If editorconfig is around use it. + +#+BEGIN_SRC emacs-lisp + (use-package editorconfig + :ensure t + :config + (editorconfig-mode 1)) +#+END_SRC + *** tramp #+BEGIN_SRC emacs-lisp @@ -655,7 +664,6 @@ Org-mode keybindings and settings, pretty sparse really. #+BEGIN_SRC emacs-lisp (use-package org - :ensure org-plus-contrib :bind (("C-c a" . org-agenda) ("C-c b" . org-iswitchb) ("C-c c" . org-capture) @@ -701,8 +709,8 @@ Org-mode keybindings and settings, pretty sparse really. (sh . t) ))) (add-hook 'after-init-hook (lambda () (org-reload))) - ) - ) + ) + ) (use-package org-bullets :ensure t :init @@ -733,6 +741,20 @@ Org-mode keybindings and settings, pretty sparse really. (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) ) ) + (use-package org-roam + :hook + (after-init . org-roam-mode) + :init + (custom-set-variables '(org-roam-directory "~/src/github.com/mitchty/dotfiles/")) + :bind (:map org-roam-mode-map + (("C-c n l" . org-roam) + ("C-c n f" . org-roam-find-file) + ("C-c n j" . org-roam-jump-to-index) + ("C-c n b" . org-roam-switch-to-buffer) + ("C-c n g" . org-roam-graph)) + :map org-mode-map + (("C-c n i" . org-roam-insert)))) + (use-package ob-async) #+END_SRC #+BEGIN_SRC emacs-lisp :tangle no @@ -793,7 +815,9 @@ Not tangled into the config intentionally. Auto complete functionality is nice to have. -#+BEGIN_SRC emacs-lisp +FIXME! + +#+BEGIN_SRC emacs-lisp :tangle no (use-package auto-complete :diminish auto-complete-mode :ensure t @@ -891,7 +915,9 @@ Highlight TODO/FIXME type messages in comments. *** projectile -#+BEGIN_SRC emacs-lisp +FIXME! + +#+BEGIN_SRC emacs-lisp :tangle no (use-package projectile :diminish projectile-mode :ensure t @@ -978,6 +1004,12 @@ Cause I have to use jira, sigh. ) #+END_SRC +*** rust-mode + +#+BEGIN_SRC emacs-lisp + (use-package rust-mode :commands rust-mode :mode ("\\*.rs\\'" . rust-mode) + :ensure t) +#+END_SRC *** python-mode Compress down python configuration a bit. @@ -989,24 +1021,6 @@ Compress down python configuration a bit. :ensure t :init (progn - (use-package jedi - :ensure t - :init - (progn - (jedi:install-server) - ) - :config - (progn - (custom-set-variables - '(jedi:complete-on-dot t) - '(jedi:install-imenu t) - ) - ) - :bind - (("M-." . jedi:goto-definition) - ("M-," . jedi:goto-definition-pop-marker) - ) - ) (use-package company-anaconda :ensure t :config @@ -1025,7 +1039,6 @@ Compress down python configuration a bit. (progn (add-hook 'python-mode-hook' (lambda () - (jedi:setup) (push '("lambda" . ?λ) prettify-symbols-alist) (push '("<=" . ?≤) prettify-symbols-alist) (push '(">=" . ?≥) prettify-symbols-alist) @@ -1165,10 +1178,9 @@ Make undo more useful, and treelike. #+BEGIN_SRC emacs-lisp (use-package undo-tree - :diminish undo-tree-mode :ensure t :init - (progn (global-undo-tree-mode)) + (global-undo-tree-mode) :config (progn (defadvice undo-tree-visualize (around undo-tree-split-side-by-side activate) "Split undo-tree side-by-side" @@ -1184,7 +1196,8 @@ Make undo more useful, and treelike. *** color-identifiers-mode -Color variables for easy identification, its like a rainbow puked over everything opened in prog-mode-hook. +Color variables for easy identification, its like a rainbow puked over +everything opened in prog-mode-hook. #+BEGIN_SRC emacs-lisp (use-package color-identifiers-mode @@ -1195,12 +1208,38 @@ Color variables for easy identification, its like a rainbow puked over everythin ) #+END_SRC -*** nix-mode +*** idle-highlight-mode + +Highlight a variable when you're selecting it, helps in reviewing code to see +where it exists. + +#+BEGIN_SRC emacs-lisp + (use-package idle-highlight-mode + :diminish idle-highlight-mode + :ensure t + :config + (add-hook 'prog-mode-hook 'idle-highlight-mode) + ) +#+END_SRC + +*** nix Instead of text might as well get a decent mode hook going here. #+BEGIN_SRC emacs-lisp + (use-package nixos-options :ensure t) + (use-package company-nixos-options :ensure t) +#+END_SRC + +#+BEGIN_SRC emacs-lisp :tangle no (use-package nix-mode :ensure t) + +(setq flycheck-command-wrapper-function + (lambda (command) (apply 'nix-shell-command (nix-current-sandbox) command)) + flycheck-executable-find + (lambda (cmd) (nix-executable-find (nix-current-sandbox) cmd))) +(add-to-list 'company-backends 'company-nixos-options) + #+END_SRC *** docker-mode @@ -1228,7 +1267,6 @@ Common mode defaults I think are sensible. #+BEGIN_SRC emacs-lisp (add-hook 'prog-mode-hook '(lambda () - (auto-complete-mode) ;; can't get this to work with use-package easily (interactive) (hl-line-mode) (whitespace-mode) diff --git a/git.org b/git.org index 1bdd1ca..8429005 100644 --- a/git.org +++ b/git.org @@ -45,68 +45,85 @@ All pager, all the time. Aliases so I can be lay zee. #+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p)) - [alias] - begin = !git init && git commit --allow-empty -m 'Initial empty commit' - up = !git pull --rebase && git push - wsd = diff --color-words --ignore-space-at-eol --ignore-space-change --ignore-all-space - wd = diff --color-words - fa = fetch --all - ci = commit - cia = commit --all - co = checkout - ds = diff --stat - ba = branch --all - b = branch - st = status --short --branch - s = status --short --branch --untracked-files=no - unstage = reset HEAD - tlog = log --graph --color=always --abbrev-commit --date=relative --pretty=oneline - hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative - slog = log --oneline --decorate - fixup = commit --fixup - squash = commit --squash - ri = rebase --interactive --autosquash - ra = rebase --abort - effit = reset --hard - bn = rev-parse --abbrev-ref HEAD - cp = log --no-merges --cherry --graph --oneline - # What commits differ between branches, note, equivalent commits are omitted. - # Use this with three dot operator aka master...origin/master - cpd = log --no-merges --left-right --graph --cherry-pick --oneline - # Same as ^ only equivalent commits are listed with a = sign. - cmd = log --no-merges --left-right --graph --cherry-mark --oneline - # git update with submodule update - sup = !git pull --rebase && git submodule update --init --recursive - # git clone with submodules - sc = !git clone --recursive $1 - # what files are getting updated a lot descending output - churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort -r | awk 'BEGIN {print "count,file"} {print $1 "," $2}' | egrep -v '^\\s+$' - # help the gc a bit and get a bit more space back for a local clone - trim = !git reflog expire --expire=now --all && git gc --prune=now - # default remote, note depends on the repo having been git cloned - defremote = !git branch -rvv | egrep 'HEAD' | awk '{print $1}' | sed -e 's|/HEAD||g' - # short sha - short = rev-parse --short - # branch commits on lhs compared to rhs, use via g bcs $(g bn) ^other/branch - bcs = log --pretty="%H" --first-parent --no-merges - find-merge = !sh -c "commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 | uniq -f1 -d | sort -n | tail -1 | cut -f2" - show-merge = !sh -c "merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge" - # push branch while setting the upstream to the default remote - pbr = !git push --set-upstream $(git defremote) $(git bn) - p = !sh -c 'git branch ${1:-$(git defremote)}pr$0@$(iso8601 -s) $(git ls-remote -q ${1:-$(git defremote)} | grep refs/pull-requests/$0/from | cut -c1-8)' - # kinda/sorta git pull -r without the git pull nonsense - # cleanmerged = !sh -c "git branch --merged | grep -Ev '^(. master|\*)' | xargs -n1 git branch -d" - prune = !sh -c 'git cleanmerged; git fetch -p; git trim' - # My defremote hack depends on $remote/HEAD to point to somewhere - # which it may not if the git repo wasn't cloned - fixhead = !sh -c "rem=${0:-origin} && branch=${1:-master} && git symbolic-ref refs/remotes/$rem/HEAD refs/remotes/$rem/${branch}" - # push branch while setting the upstream to the default remote - pbr = !git push --set-upstream $(git defremote) $(git bn) - p = !sh -c 'git branch ${1:-$(git defremote)}pr$0@$(iso8601 -s) $(git ls-remote -q ${1:-$(git defremote)} | grep refs/pull-requests/$0/from | cut -c1-8)' - # Pull all the commits missed from a git pull --depth N clone - unshallow = pull --unshallow - # Set the origin to not allow pushing, to be on the safe side. - nopush = remote set-url --push origin no_push + [alias] + begin = !git init && git commit --allow-empty -m 'Initial empty commit' + up = !git pull --rebase && git push + wsd = diff --color-words --ignore-space-at-eol --ignore-space-change --ignore-all-space + wd = diff --color-words + fa = fetch --all + ci = commit + cia = commit --all + co = checkout + ds = diff --stat + ba = branch --all + b = branch + st = status --short --branch + s = status --short --branch --untracked-files=no + unstage = reset HEAD + tlog = log --graph --color=always --abbrev-commit --date=relative --pretty=oneline + hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative + slog = log --oneline --decorate + fixup = commit --fixup + squash = commit --squash + ri = rebase --interactive --autosquash + ra = rebase --abort + effit = reset --hard + bn = rev-parse --abbrev-ref HEAD + cp = log --no-merges --cherry --graph --oneline + short = rev-parse --short + # git clone with submodules + sc = !git clone --recursive $1 + # git update with submodule update + sup = !git pull --rebase && git submodule update --init --recursive + wtl = worktree list + wtp = worktree prune + wta = worktree add + wtr = "!git worktree list --porcelain | grep -B2 \"branch refs/heads/$1\" | head -n1 | sed -e 's|worktree ||' #" + nwt = "!git worktree add $(git gr)@$1 $1 #" + bwt = "!git branch $1 ${2:-HEAD} && git nwt $1 #" + gr = "!git rev-parse --absolute-git-dir | sed -e 's|/[.]git.*||' #" + # Pull all the commits missed from a git pull --depth N clone + unshallow = pull --unshallow + # Set the origin to not allow pushing, to be on the safe side. + nopush = remote set-url --push origin no_push + # default remote, note depends on the repo having been git cloned + defremote = !git branch -rvv | egrep 'HEAD' | awk '{print $1}' | sed -e 's|/HEAD||g' + # push branch while setting the upstream to the default remote + pbr = !git push --set-upstream $(git defremote) $(git bn) + # ^ but forcefully + fpbr = !git push --set-upstream --force $(git defremote) $(git bn) + # what files are getting updated a lot descending output + churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort -r | awk 'BEGIN {print "count,file"} {print $1 "," $2}' | grep -Ev '^\\s+$' + # My defremote hack depends on $remote/HEAD to point to somewhere + # which it may not if the git repo wasn't cloned + fixhead = !sh -c "rem=${0:-origin} && branch=${1:-master} && git symbolic-ref refs/remotes/$rem/HEAD refs/remotes/$rem/${branch}" + + [alias] + cpd = log --no-merges --left-right --graph --cherry-pick --oneline + cmd = log --no-merges --left-right --graph --cherry-mark --oneline + bcs = log --pretty="%H" --first-parent --no-merges + + [alias] + # kinda/sorta git pull -r without the git pull nonsense + # cleanmerged = !sh -c "git branch --merged | grep -Ev '^(. master|\*)' | xargs -n1 git branch -d" + # help the gc a bit and get a bit more space back for a local clone + trim = !git reflog expire --expire=now --all && git gc --prune=now + prune = !sh -c 'git cleanmerged; git fetch -p; git trim' + # I don't remember what I used these for tbh, future mitch figure it out. + find-merge = !sh -c "commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 | uniq -f1 -d | sort -n | tail -1 | cut -f2" + show-merge = !sh -c "merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge" + + [alias] + # create a pull request branch based off a pull request, lets you git diff + # even if someone rebases a pull request. + p = !sh -c 'git branch ${1:-$(git defremote)}pr$0@$(iso8601 -s) $(git ls-remote -q ${1:-$(git defremote)} | grep refs/pull-requests/$0/from | cut -c1-8)' + rvers = !sh -c 'commitish=${0:-HEAD} && git describe --first-parent --tags --long --match="cray-*" $commitish | sed -e "s/^cray-//" -e "s/-/./" -e "s/-g.*//"' + + [alias] + rembranch = !sh -xc "remote=${1:-origin} && git ls-remote --symref -q $remote HEAD | head -n1 | awk '{print $2}' | sed -e 's|refs/heads/||'" + merged-remote = !sh -c 'remote=${0:-origin} && git branch --all --merged remotes/$remote/master | grep remotes/$remote | grep -E --invert-match \"(master|HEAD)\" | cut -d \"/\" -f 3-' + merged-local = !sh -c 'git branch --all --merged master | grep -E --invert-match \"(master|HEAD|remotes/)\" | cut -b 3-' + merged = !sh -c "remote=${0:-origin}; printf 'remote branches: %s\n' $remote >&2; git merged-remote $remote; printf 'local branches\n' >&2 && git merged-local" #+END_SRC ** github @@ -168,7 +185,14 @@ Don't use git:// (ssh) to connect to github. ** username/email -Default username and email to use if not overridden. +Default username and email to use if not overridden. Note, this only applies to +where I actually do any commits. + +My layout is ~/src/domain/... Not all domains might end up getting thrown in +here. Adjust what username/email gets used. Git 2.13+ only. Mostly for work +related stuff. + +TODO: Switch to my domain from google garbage for email. #+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p)) [user] @@ -176,6 +200,38 @@ Default username and email to use if not overridden. email = mitch.tishmack@gmail.com #+END_SRC +This silly text is here to make git merges easier for private branches. I got +sick of resolving silly merge conflicts. Let the fuzz detection figure it out. + +HUNK PADDING +HUNK PADDING +HUNK PADDING + +Only really use git lfs at work. + +#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p)) + [includeIf "gitdir:~/src/stash.us.cray.com"] + path = ~/.gitconfig-cray +#+END_SRC + +#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p)) + [user] + name = Mitch Tishmack + email = mtishmack@cray.com +#+END_SRC + +#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (and (bound-and-true-p git-p) (bound-and-true-p cray-p))) + [filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true +#+END_SRC + +END HUNK PADDING +END HUNK PADDING +END HUNK PADDING + * ~/.gitignore Common crap/build artifacts that git should always ignore. @@ -195,20 +251,3 @@ Common crap/build artifacts that git should always ignore. ,*.[oa] ,*.hi #+END_SRC - -* Cray overrides -** ~/.gitconfig -#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig-cray" (and (bound-and-true-p git-p) (bound-and-true-p cray-p))) - [user] - name = Mitch Tishmack - email = mtishmack@cray.com -#+END_SRC - -** includes - -By paths, adjust what username/email gets used. Git 2.13+ only. - -#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p)) - [includeIf "gitdir:~/src/stash.us.cray.com"] - path = ~/.gitconfig-cray -#+END_SRC diff --git a/nix.org b/nix.org index 8b1af2a..9244c48 100644 --- a/nix.org +++ b/nix.org @@ -15,7 +15,7 @@ Nix user config.nix setup. { packageOverrides = pkgs: with pkgs; let in rec { - custom-pinentry = pinentry.override { gtk2 = null; qt4 = null; ncurses = null; }; + custom-pinentry = pinentry.override { gtk2 = null; ncurses = null; }; custom-youtube-dl = python27Packages.youtube-dl.override { pandoc = null; }; default = buildEnv { @@ -25,10 +25,8 @@ Nix user config.nix setup. aria aspell aspellDicts.en - cabal-install cacert clang - clang-analyzer cloc cscope ctags @@ -37,48 +35,37 @@ Nix user config.nix setup. custom-youtube-dl diffutils docbook5 - duply emacs entr - gdbm - ghostscript gist gitAndTools.git-extras gitAndTools.gitFull gmp gnumake - gnupg - gnupg1compat gnutar gnutls + googler graphviz-nox haskellPackages.ShellCheck - haskellPackages.ghc-mod - haskellPackages.hasktags - haskellPackages.hindent - haskellPackages.hspec haskellPackages.pandoc htop imagemagick iperf jq keychain - lastpass-cli less llvm mercurial moreutils mosh mr - multitail - munge + ncdu openssl p7zip patchutils pbzip2 - pigz - pixz - pkgconfig + pkg-config + ponysay pv python27Packages.flake8 python27Packages.howdoi @@ -86,15 +73,18 @@ Nix user config.nix setup. python27Packages.pyflakes python27Packages.pylint python27Packages.virtualenv + restic + ripgrep rlwrap rsync rtags + shfmt silver-searcher sloccount sshpass - stack - texlive.combined.scheme-full + texlive.combined.scheme-basic tmux + transcrypt tree unzip upx @@ -102,6 +92,7 @@ Nix user config.nix setup. watch wget xz + yq # If I ever come up with some linux only stuff or figure out xhyve # ] ++ stdenv.lib.optionals stdenv.isLinux [ # ] ++ stdenv.lib.optionals stdenv.isDarwin [ diff --git a/options/C02ZD01LLVDR.el b/options/C02ZD01LLVDR.el new file mode 100644 index 0000000..8f6f5c9 --- /dev/null +++ b/options/C02ZD01LLVDR.el @@ -0,0 +1,15 @@ +;;-*-mode: emacs-lisp; coding: utf-8;-*- +;; File: mbp-mtishmack.el +;; Copyright: 2017 Mitch Tishmack +;; Description: options for cray ws +;;(setq testing t) +(setq macos-p t) +(setq nix-p t) +(setq tmux-p t) +(setq git-p t) +(setq emacs-p t) +(setq zsh-p t) +(setq mosh-p t) +(setq haskell-p t) +(setq perl-p t) +(setq cray-p t) diff --git a/tmux.org b/tmux.org index 738286d..9eeaae6 100644 --- a/tmux.org +++ b/tmux.org @@ -8,64 +8,158 @@ #+PROPERTY: header-args :comments no #+PROPERTY: header-args :replace yes -Tmux configuration. Pretty boring in most ways. +Tmux configuration + +Use vi mode for tmux keybindings. Means if we start emacs up, no conflicts for +keybinds. Also set aggressive resize so our panes resize somewhat sanely with +multiple clients. #+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) - # Setup vi mode by default set-window-option -g mode-keys vi set-window-option -g aggressive-resize on +#+END_SRC + +Use the only shell that matters for our login shell. Set our TERM to +xterm-256color as well. - # Force zsh to be a login shell +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) set-option -g default-command 'zsh -l' set-option -g default-terminal 'xterm-256color' +#+END_SRC - # Status line options, mainly coloring - set-window-option -g window-status-bg colour6 - set-window-option -g window-status-fg black - set-window-option -g window-status-current-bg white +Status line options. For the status line we want the selected window tabish +thing to be white background and black foreground. - # Selection highlight color - set-window-option -g mode-style bg=red,fg=black +Use the default coloring which is white on black. Helps make the current tab +rather obvious from color alone ignoring the * character. + +Additionally, setup the status lines so we have a mostly minimal setup on what +is displayed. Try to keep things as minimal as possible. - # Status line options - set-option -g status-bg black - set-option -g status-fg colour7 +Also note the status-interval is 7 seconds long, this is intentional as it +ensures that any skew on waking up/updating isn't visible. Yes I'm weird in that +if I specify 5 and don't get things updated every 0-4 seconds it annoys me. + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) + set-window-option -g window-status-current-style bg=white,fg=black + set-window-option -g window-status-style default + set-option -g window-status-format '#I #W#F' + set-option -g window-status-current-format '#I:#W#{?window_zoomed_flag, 🔍,}' + set-option -g status-style bg=black,fg=colour7 + set-option -g status-interval 7 set-option -g status-left-length 24 set-option -g status-left '' +#+END_SRC + +Right status just with Day HH:MM:SS to the right. + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) set-option -g status-right-length 13 set-option -g status-right "%a %H:%M:%S" - set-option -g status-interval 7 +#+END_SRC + +Right status with battery shenanigans. Only present on macos for now. + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) + set-option -g status-right-length 20 + set-option -g @batt_remain_minimal true + set-option -g @batt_icon_status_charged ' ' + set-option -g @batt_icon_status_charging '↑' + set-option -g @batt_icon_status_discharging '↓' + set-option -g @batt_icon_status_unknown '?' + set-option -g @batt_color_status_primary_discharging colour9 + set-option -g status-right "#{battery_color_fg}#{battery_icon_status}#[default] #{battery_color_charge_bg}#{battery_remain}#[default] %a %H:%M:%S" + + run-shell ~/src/github.com/tmux-plugins/tmux-battery/battery.tmux +#+END_SRC + +The highlight style is how tmux renders selected text. Black on red is what I +use to make it obvious what is being selected. + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) + set-window-option -g mode-style bg=red,fg=black +#+END_SRC + +Pane border options, mostly an attempt to mimic/ape the status line setup. + +Intent is we want to know what pane we're selected into, however we only set the +foreground so that if we are on a white on black, or black on white or some +other scheme we don't have a gaudy background for the panes. + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) + set-option -g pane-border-style fg=colour7 + set-option -g pane-active-border-style fg=colour2 +#+END_SRC - # Pane border options, mimics the status line coloring - set-option -g pane-border-bg colour15 - set-option -g pane-border-fg colour82 - set-option -g pane-active-border-bg colour15 - set-option -g pane-active-border-fg colour2 +TTY alert character stuff. Much like a phone, don't make a sound. Leave that +kinda gaudy sound beeps to boomers. - # Alert related things +Basically flash the message/status bar with a black on white message. + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) set-option -g visual-activity on set-option -g visual-bell on - set-option -g message-bg colour7 - set-option -g message-fg black + set-option -g message-style bg=colour7,fg=black +#+END_SRC + +Use the window title if available and update it if it changes. Aka, in +iterm2/Terminal.app on macos generally this is set to the active command or +shell. - # Pass through the window title and display it automatically on changes. +Can rename it to something else if we want as well. + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) set-option -g set-titles on set-option -g set-titles-string '#T' set-window-option -g automatic-rename on +#+END_SRC + +Custom key rebindings. - # Key rebinding to make things more au naturalle +PREFIX + R = Reload tmux configuration. + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) bind-key R \ source-file ~/.tmux.conf \;\ - display 'reloaded tmux config' + display 'reloaded ~/.tmux.conf' +#+END_SRC + +Note, this uses tmux 2.9 syntax now. Which is annoying af, used to be able to +just modify the fg/bg independently but now if you set the current style fg, it +presumes default for everything *GRRRR*. + +So if you have to care about the background have to check that as well. Current +strategy here is to dump out the window options and look for +window-status-current-style and yoink the existing bg if present. + +Essentially the foreground is changed to green when logging this pane. +Background is set to red when synchronizing. That's about it. + +PREFIX + o = L*o*g pane output to a file. +Saved with the iso8601 command for the name. Also change the foreground text to +green so we know we're logging. + +# FIXME - # Log pane output to a file, save with an iso8601 datestamp +#+BEGIN_SRC conf :tangle no bind-key o \ pipe-pane -o "cat >> $HOME/tmux-`iso8601`.log" \;\ - set-window-option window-status-current-fg green \; + if-shell \ + "tmux show-window-options | grep 'window-status-current-style' | grep fg=green'" \ + "set-window-option + "display 'stopping logging pane output' + set-window-option window-status-current-style fg=green +#+END_SRC +PREFIX + O = St*O*p logging pane output. Also reset the fg color back to default. + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) bind-key O \ pipe-pane \;\ - set-window-option window-status-current-fg default \; + set-window-option window-status-current-style default \; +#+END_SRC + +#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (bound-and-true-p tmux-p)) bind-key N new-session -t default @@ -78,14 +172,12 @@ Tmux configuration. Pretty boring in most ways. bind-key s \ if-shell \ "tmux show-window-options | grep 'synchronize-panes on'" \ - "set-window-option window-status-current-bg colour7; \ - set-window-option pane-active-border-fg colour2; \ - set-window-option pane-active-border-bg colour15; \ + "set-window-option window-status-current-style bg=white,fg=black; \ + set-window-option pane-active-border-style bg=colour15,fg=colour2; \ set-window-option synchronize-panes off; \ display 'synchronization off'" \ - "set-window-option window-status-current-bg red; \ - set-window-option pane-active-border-fg red; \ - set-window-option pane-active-border-bg colour15; \ + "set-window-option window-status-current-style bg=red,fg=black; \ + set-window-option pane-active-border-style bg=colour15,fg=red; \ set-window-option synchronize-panes on; \ display 'synchronizing'" @@ -93,12 +185,11 @@ Tmux configuration. Pretty boring in most ways. # something else that set synchronization. if-shell \ "tmux show-window-options | grep 'synchronize-panes on' || /bin/true" \ - "set-window-option window-status-current-bg red; \ - set-window-option pane-active-border-fg yellow; \ - set-window-option pane-active-border-bg red" + "set-window-option window-status-current-style bg=red; \ + set-window-option pane-active-border-style bg=red,fg=black" # Setup splits to be less annoying - bind-key \ split-window -h + bind-key \\ split-window -h bind-key - split-window -v # vi keybindings for pane navigation @@ -145,26 +236,9 @@ Tmux configuration. Pretty boring in most ways. display 'Mouse modes on'" #+END_SRC -Only set xclip for x setup. +Only set xclip for when x is in use #+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (and (bound-and-true-p tmux-p) (bound-and-true-p x-p))) bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer" bind C-y run "tmux save-buffer - | xclip -i" #+END_SRC - -Testing of battery stuff, defaults in general. - -#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (and (bound-and-true-p tmux-p) (bound-and-true-p testing-p))) - set-option -g status-right-length 21 - set-option -g status-right "#{battery_status_fg}#{battery_remain} #{battery_icon}#[fg=white] %a %H:%M:%S" - set-option -g @batt_charged_icon "✓" - run-shell ~/src/github.com/tmux-plugins/tmux-battery/battery.tmux -#+END_SRC - -And for macos, differ in that the battery charged icon is utf-8 really. TODO: do I need this really? - -#+BEGIN_SRC conf :tangle (tangle/file ".tmux.conf" (and (bound-and-true-p testing-p) (bound-and-true-p tmux-p) (bound-and-true-p macos-p))) - set-option -g status-right-length 20 - set-option -g status-right "#{battery_remain} #{battery_icon} %a %H:%M:%S" - run-shell ~/src/github.com/tmux-plugins/tmux-battery/battery.tmux -#+END_SRC diff --git a/z9999-cray.org b/z9999-cray.org index d95fbea..1fea04d 100644 --- a/z9999-cray.org +++ b/z9999-cray.org @@ -25,73 +25,96 @@ So I can find out when my ad password expires. Use gnus in emacs for email. Outside of normal emacs since its easier. #+BEGIN_SRC emacs-lisp :mkdirp yes :tangle-mode (identity #o600) :tangle (tangle/file ".gnus" (bound-and-true-p cray-p)) + (defvar custom-splits + '(| + ("Subject" ".*\\[confluence\\].*" "spammish/confluence") + ("Subject" ".*\\[JIRA\\].*" "spammish/jira") + (: "") + )) (use-package gnus :ensure t :config - (progn - (setq user-full-name "Mitch Tishmack" - user-mail-address "mtishmack@cray.com") - (setq gnus-select-method '(nnnil "")) - (setq gnus-secondary-select-methods '((nnml ""))) - (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) - (setq gnus-mime-display-multipart-related-as-mixed t) - (setq gnus-auto-select-first nil) - (setq gnus-summary-display-arrow nil) - (setq nnmail-split-methods 'nnmail-split-fancy) - (setq gnus-nntp-server nil - gnus-read-active-file nil - gnus-save-newsrc-file nil - gnus-read-newsrc-file nil - gnus-check-new-newsgroups nil) - (setq nnml-directory "~/.emacs.d/mail") - (setq message-directory "~/.emacs.d/mail") - - (setq gnus-select-method - '(nnimap "outlook" - (nnimap-address "outlook.office365.com") - (nnimap-server-port 993)) - message-send-mail-with-function 'smtpmail-send-it - send-mail-function 'smtpmail-send-it - ) - (setq-default - gnus-summary-line-format "[%U%R%z] %(%&user-date; %-15,15f %B%s%)\n" - gnus-user-date-format-alist '((t . "%Y-%m-%d")) - gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references - gnus-sum-thread-tree-root "" - gnus-sum-thread-tree-false-root "" - gnus-sum-thread-tree-indent " " - gnus-sum-thread-tree-single-indent "" - gnus-sum-thread-tree-single-leaf "┗▶" - gnus-sum-thread-tree-vertical "┃" - gnus-sum-thread-tree-leaf-with-other "┣▶") - (setq gnus-thread-sort-functions - '((not gnus-thread-sort-by-date) - (not gnus-thread-sort-by-number))) - (setq gnus-use-cache t) - (setq gnus-save-score t) - (setq gnus-use-adaptive-scoring '(word line)) - (setq gnus-adaptive-word-length-limit 5) - (setq gnus-adaptive-word-no-group-words t) - (setq gnus-default-adaptive-score-alist - '((gnus-unread-mark) - (gnus-ticked-mark (from 4)) - (gnus-dormant-mark (from 5)) - (gnus-del-mark (from -4) (subject -1)) - (gnus-read-mark (from 4) (subject 2)) - (gnus-expirable-mark (from -1) (subject -1)) - (gnus-killed-mark (from -1) (subject -3)) - (gnus-kill-file-mark) - (gnus-ancient-mark) - (gnus-low-score-mark) - (gnus-catchup-mark (from -1) (subject -1)))) - (setq nnmail-split-fancy - '(| - ("From" "\\(root\\|cron\\)@localhost" "system") - "normal")) - (setq nnimap­split­inbox "INBOX") - (setq nnimap­split­predicate "UNDELETED") - ) + (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) + ;; TODO: how to get this into :custom? + (setq-default gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references + gnus-sum-thread-tree-root "" + gnus-sum-thread-tree-false-root "" + gnus-sum-thread-tree-indent " " + gnus-sum-thread-tree-single-indent "" + gnus-sum-thread-tree-single-leaf "┗▶" + gnus-sum-thread-tree-vertical "┃" + gnus-sum-thread-tree-leaf-with-other "┣▶") + :custom + (user-full-name "Mitchell Tishmack") + (user-mail-address "mitchell.tishmack@hpe.com") + (gnus-secondary-select-methods '((nnml "private"))) + (nnml-directory "~/.emacs.d/mail") + (message-directory "~/.emacs.d/mail") + (gnus-select-method + '(nnimap "hpe" + (nnimap-address "outlook.office365.com") + (nnimap-server-port 993) + (nnimap-stream ssl) + (nnimap-streaming t) + (nnimap-split-methods 'nnmail-split-fancy) + (nnir-search-engine imap)) + message-send-mail-with-function 'smtpmail-send-it + send-mail-function 'smtpmail-send-it + ) + (gnus-mime-display-multipart-related-as-mixed t) + (gnus-auto-select-first nil) + (gnus-summary-display-arrow nil) + (nnmail-split-methods 'nnmail-split-fancy) + (gnus-summary-line-format "[%U%R%z] %(%&user-date; %-15,15f %B%s%)\n") + (gnus-user-date-format-alist '((t . "%Y-%m-%d"))) + (gnus-thread-sort-functions + '((not gnus-thread-sort-by-date) + (not gnus-thread-sort-by-number))) + (gnus-use-cache t) + (gnus-save-score t) + (gnus-use-adaptive-scoring '(word line)) + (gnus-adaptive-word-length-limit 5) + (gnus-adaptive-word-no-group-words t) + (gnus-default-adaptive-score-alist + '((gnus-unread-mark) + (gnus-ticked-mark (from 4)) + (gnus-dormant-mark (from 5)) + (gnus-del-mark (from -4) (subject -1)) + (gnus-read-mark (from 4) (subject 2)) + (gnus-expirable-mark (from -1) (subject -1)) + (gnus-killed-mark (from -1) (subject -3)) + (gnus-kill-file-mark) + (gnus-ancient-mark) + (gnus-low-score-mark) + (gnus-catchup-mark (from -1) (subject -1)))) + (nnimap­split­inbox "INBOX") + (nnimap­split­predicate "UNDELETED") + (nnmail-split-methods 'nnmail-split-fancy) + (nnimap-split-methods 'nnimap-split-fancy) + (nnimap-split-fancy custom-splits) + (nnmail-split-fancy custom-splits) ) + ;; (setq nnimap-split-methods + ;; '( + ;; ("INBOX/confluence" "^Subject:.*\\[confluence\\].*") + ;; ("INBOX/jira" "^Subject:.*\\[JIRA\\].*") + ;; ("INBOX/cronmail" "^From:.*\\(root\\|cron\\)@localhost") + ;; ("INBOX/default" "") + ;; )) + ;; (setq nnmail-split-methods + ;; '( + ;; ("confluence" "Subject:.*\\[confluence\\].*") + ;; ("jira" "Subject:.*\\[JIRA\\].*") + ;; ("cronmail" "From:.*\\(root\\|cron\\)@localhost") + ;; ("default" "") + ;; )) + ;; end essential...ish config is any of this crap needed? I think I just cribbed from wiegley too much tbh, + ;; TODO: dig through all this config entry by entry and get a proper understanding of each config item + ;; (setq gnus-nntp-server nil + ;; gnus-read-active-file nil + ;; gnus-save-newsrc-file nil + ;; gnus-read-newsrc-file nil + ;; gnus-check-new-newsgroups nil) #+END_SRC ** ~/bin/flushdns