summary refs log tree commit diff
path: root/emacs/elisp/my-work.el
blob: f0c59d81ee870b4c4a3d131214a8c097ba12801b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
;;; my-work.el --- Functions related to work
;;; Commentary:
;;; Code:

(defun my/check-work-machine-p ()
  "Return t if this is a work machine."
  (string-match "HQ\\.*" (system-name)))

(defun my/work-code-search ()
  "Search code on sourcegraph for a given language."
  (interactive)
  (let ((language (completing-read
                   "Language: "
                   '("Ruby" "Python"  "Go")))
        (code (read-string "Code: ")))
    (browse-url
     (concat "https://sourcegraph.rbx.com/search?q=context:global+lang:" language
             "+" code))))

(provide 'my-work)
;;; my-work.el ends here