Merge branch 'master' of git.jeremydormitzer.com:jdormit/dotfiles
This commit is contained in:
commit
701587d4ea
107
emacs/init.org
107
emacs/init.org
@ -162,12 +162,12 @@ Use the spacebar as a leader key in evil-mode's normal state and in various othe
|
|||||||
|
|
||||||
** Additional keybindings
|
** Additional keybindings
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(general-def 'normal "zM" #'hs-hide-level)
|
(general-def 'normal "zM" #'hs-hide-level :keymaps 'override)
|
||||||
(general-def 'normal "z=" #'text-scale-increase)
|
(general-def 'normal "z=" #'text-scale-increase :keymaps 'override)
|
||||||
(general-def 'normal "z-" #'text-scale-decrease)
|
(general-def 'normal "z-" #'text-scale-decrease :keymaps 'override)
|
||||||
(general-def 'normal "z0" #'text-scale-adjust)
|
(general-def 'normal "z0" #'text-scale-adjust :keymaps 'override)
|
||||||
(general-def 'normal view-mode-map "0" nil)
|
(general-def 'normal view-mode-map "0" nil :keymaps 'override)
|
||||||
(general-def 'normal messages-buffer-mode-map "SPC" leader-map)
|
(general-def 'normal messages-buffer-mode-map "SPC" leader-map :keymaps 'override)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Magit
|
* Magit
|
||||||
@ -251,9 +251,41 @@ Requires:
|
|||||||
(eval-when-compile (require 'subr-x))
|
(eval-when-compile (require 'subr-x))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Packages
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package deferred
|
||||||
|
:commands (deferred:next
|
||||||
|
deferred:nextc
|
||||||
|
deferred:error
|
||||||
|
deferred:cancel
|
||||||
|
deferred:watch
|
||||||
|
deferred:wait
|
||||||
|
deferred:$
|
||||||
|
deferred:loop
|
||||||
|
deferred:parallel
|
||||||
|
deferred:earlier
|
||||||
|
deferred:call
|
||||||
|
deferred:apply
|
||||||
|
deferred:process
|
||||||
|
deferred:process-buffer
|
||||||
|
deferred:wait-idle
|
||||||
|
deferred:url-retrieve
|
||||||
|
deferred:url-get
|
||||||
|
deferred:url-post
|
||||||
|
deferred:new
|
||||||
|
deferred:succeed
|
||||||
|
deferred:fail
|
||||||
|
deferred:callback
|
||||||
|
deferred:callback-post
|
||||||
|
deferred:errorback
|
||||||
|
deferred:errorback-post
|
||||||
|
deferred:try
|
||||||
|
deferred:timeout
|
||||||
|
deferred:process))
|
||||||
|
#+END_SRC
|
||||||
** Editing Elisp
|
** Editing Elisp
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(general-def 'motion emacs-lisp-mode "C-c C-c" #'eval-defun)
|
(general-def 'motion emacs-lisp-mode "C-c C-c" #'eval-defun :keymaps 'override)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Load path
|
** Load path
|
||||||
For machine or user specific libraries:
|
For machine or user specific libraries:
|
||||||
@ -1201,13 +1233,17 @@ Integrate Google calendar with org-mode:
|
|||||||
org-gcal-client-secret (password-store-get "lola-org-gcal-client-secret")
|
org-gcal-client-secret (password-store-get "lola-org-gcal-client-secret")
|
||||||
org-gcal-file-alist `(("jeremydormitzer@lola.com" . ,(get-calendar-file "lola-gcal.org"))
|
org-gcal-file-alist `(("jeremydormitzer@lola.com" . ,(get-calendar-file "lola-gcal.org"))
|
||||||
("jeremy.dormitzer@gmail.com" . ,(get-calendar-file "personal-gcal.org"))
|
("jeremy.dormitzer@gmail.com" . ,(get-calendar-file "personal-gcal.org"))
|
||||||
("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" . ,(get-calendar-file "j-n-gcal.org"))))
|
("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" . ,(get-calendar-file "j-n-gcal.org")))
|
||||||
(add-hook 'org-agenda-mode-hook #'org-gcal-fetch)
|
org-gcal-notify-p nil))
|
||||||
(defun org-agenda-redo-and-fetch-gcal (&optional all)
|
|
||||||
(interactive "P")
|
(add-hook 'org-agenda-mode-hook #'org-gcal-fetch)
|
||||||
(let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo)))
|
|
||||||
(deferred:nextc (org-gcal-fetch) cb)))
|
(defun org-agenda-redo-and-fetch-gcal (&optional all)
|
||||||
(general-def 'motion org-agenda-mode-map "gr" #'org-agenda-redo-and-fetch-gcal))
|
(interactive "P")
|
||||||
|
(let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo)))
|
||||||
|
(deferred:nextc (org-gcal-fetch) cb)))
|
||||||
|
|
||||||
|
(general-def '(normal motion) org-agenda-mode-map "gr" #'org-agenda-redo-and-fetch-gcal)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Projectile
|
* Projectile
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -3269,10 +3305,18 @@ Some functions to make my day job easier.
|
|||||||
(substitute-in-file-name (format "$WORKON_HOME/%s/bin/activate" venv))
|
(substitute-in-file-name (format "$WORKON_HOME/%s/bin/activate" venv))
|
||||||
callback))
|
callback))
|
||||||
|
|
||||||
(defun get-latest-log ()
|
(defun get-latest-lola-log (prefix)
|
||||||
(car (last (directory-files default-directory
|
(lambda ()
|
||||||
nil
|
(concat
|
||||||
"[[:digit:]-]+T[[:digit:]:]+\\.log"))))
|
"~/lola/logs/"
|
||||||
|
(car (last (directory-files "~/lola/logs"
|
||||||
|
nil
|
||||||
|
(concat prefix "[[:digit:]-]+T[[:digit:]:]+\\.log")))))))
|
||||||
|
|
||||||
|
(defun lola-log-file (prefix)
|
||||||
|
(format "~/lola/logs/%s%s.log"
|
||||||
|
prefix
|
||||||
|
(format-time-string "%Y-%m-%dT%H:%M:%S")))
|
||||||
|
|
||||||
(defun python-service-setup (venv &optional env-file)
|
(defun python-service-setup (venv &optional env-file)
|
||||||
(lambda (done)
|
(lambda (done)
|
||||||
@ -3296,9 +3340,9 @@ Some functions to make my day job easier.
|
|||||||
(format
|
(format
|
||||||
"gunicorn -c server/web/gunicorn.conf.py \
|
"gunicorn -c server/web/gunicorn.conf.py \
|
||||||
-b 127.0.0.1:7200 bin.start_web:init_and_create_flask_app\\(\\) \
|
-b 127.0.0.1:7200 bin.start_web:init_and_create_flask_app\\(\\) \
|
||||||
&> %s.log"
|
&> %s"
|
||||||
(format-time-string "%Y-%m-%dT%H:%M:%S"))))
|
(lola-log-file "lola-server-"))))
|
||||||
:file #'get-latest-log
|
:file (get-latest-lola-log "lola-server-")
|
||||||
:inhibit-process-filter t
|
:inhibit-process-filter t
|
||||||
:cwd "~/lola/lola-server"
|
:cwd "~/lola/lola-server"
|
||||||
:stop-signal 'int
|
:stop-signal 'int
|
||||||
@ -3324,10 +3368,10 @@ Some functions to make my day job easier.
|
|||||||
:args (lambda ()
|
:args (lambda ()
|
||||||
(list
|
(list
|
||||||
"-c"
|
"-c"
|
||||||
(format "python bin/start_web.py &> %s.log"
|
(format "python bin/start_web.py &> %s"
|
||||||
(format-time-string "%Y-%m-%dT%H:%M:%S"))))
|
(lola-log-file "travel-svc-"))))
|
||||||
:cwd "~/lola/lola-travel-service"
|
:cwd "~/lola/lola-travel-service"
|
||||||
:file #'get-latest-log
|
:file (get-latest-lola-log "travel-svc-")
|
||||||
:inhibit-process-filter t
|
:inhibit-process-filter t
|
||||||
:stop-signal 'int
|
:stop-signal 'int
|
||||||
:truncate-output t
|
:truncate-output t
|
||||||
@ -3337,10 +3381,17 @@ Some functions to make my day job easier.
|
|||||||
(prodigy-define-service
|
(prodigy-define-service
|
||||||
:name "travel-service celery worker"
|
:name "travel-service celery worker"
|
||||||
:tags '(lola)
|
:tags '(lola)
|
||||||
:command "python"
|
:command "bash"
|
||||||
:args '("bin/start_celery_workers.py"
|
:args (lambda ()
|
||||||
"-Q"
|
(list
|
||||||
"default,io_pool,cpu_pool,priority_io_pool,priority_cpu_pool")
|
"-c"
|
||||||
|
(concat "python "
|
||||||
|
"bin/start_celery_workers.py "
|
||||||
|
"-Q "
|
||||||
|
"default,io_pool,cpu_pool,priority_io_pool,priority_cpu_pool "
|
||||||
|
(format "&> %s" (lola-log-file "travel-svc-celery-")))))
|
||||||
|
:file (get-latest-lola-log "travel-svc-celery-")
|
||||||
|
:inhibit-process-filter t
|
||||||
:cwd "~/lola/lola-travel-service"
|
:cwd "~/lola/lola-travel-service"
|
||||||
:stop-signal 'int
|
:stop-signal 'int
|
||||||
:truncate-output t
|
:truncate-output t
|
||||||
|
Loading…
Reference in New Issue
Block a user