diff --git a/bin.org b/bin.org index a03bf45..68ed7f7 100644 --- a/bin.org +++ b/bin.org @@ -189,9 +189,11 @@ my $lookup = $input; if ( $lookup =~ /\d+[.]\d+[.]\d+[.]\d+/smx ) { $lookup = ( gethostbyaddr inet_aton($lookup), AF_INET )[0]; - die "Error: Unable to reverse lookup ip $input.\n" if ( $lookup eq q{} ); } +die "Error: Unable to reverse lookup ip $input.\n" + if ( !(defined $lookup) or $lookup eq q{} ); + my $ipv4 = gethostbyname $lookup; die "Error: $lookup doesn't have any known ip addresses\n" diff --git a/dotprofile.org b/dotprofile.org index 7a8cff4..8c5dfd7 100644 --- a/dotprofile.org +++ b/dotprofile.org @@ -42,11 +42,6 @@ _host=${_host:=${_uname_n}} #+BEGIN_SRC sh :tangle (tangle/file ".profile" (bound-and-true-p haskell-p)) PATH="${PATH}:${HOME}/.cabal/bin" #+END_SRC -** General -#+BEGIN_SRC sh :tangle "tmp/.profile" -PATH="${PATH}:${HOME}/bin:${HOME}/.local/bin" -export PATH -#+END_SRC * Functions ** General @@ -387,11 +382,17 @@ alias m=mosh alias tl='tmux ls' #+END_SRC +* Final PATH +#+BEGIN_SRC sh :tangle "tmp/.profile" +PATH="${PATH}:${HOME}/bin:${HOME}/.local/bin" +export PATH +#+END_SRC + * cray Cray specific stuff. -#+BEGIN_SRC sh :tangle (when (eq cray-p t) "tmp/.profile") +#+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" || \ @@ -415,4 +416,3 @@ haste() fi set +e } -#+END_SRC diff --git a/emacs.org b/emacs.org index a5495a2..e5f5f65 100644 --- a/emacs.org +++ b/emacs.org @@ -664,6 +664,7 @@ Org-mode keybindings and settings, pretty sparse really. :config (progn (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) + (when window-system (let* ((variable-tuple (cond ((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro")) ((x-list-fonts "Lucida Grande") '(:font "Lucida Grande")) ((x-list-fonts "Verdana") '(:font "Verdana")) @@ -681,6 +682,7 @@ Org-mode keybindings and settings, pretty sparse really. `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.5)))) `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.75)))) `(org-document-title ((t (,@headline ,@variable-tuple :height 1.5 :underline nil)))))) + ) (font-lock-add-keywords 'org-mode '(("^ +\\([-*]\\) " (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) @@ -919,7 +921,7 @@ So I write gooder. Me fail English? Thats unpossible. Compress down python configuration a bit. -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (use-package python :commands python-mode :mode ("\\.py\\'" . python-mode) @@ -987,12 +989,19 @@ Need to make haskell source be all pretty. :ensure t :config (progn + (use-package intero + :ensure t + :config + (progn + (add-hook 'haskell-mode-hook 'intero-mode) + ) + ) (use-package hindent :if (executable-find "hindent") :ensure t :config (progn - (add-hook 'haskell-mode-hook #'hindent-mode) + (add-hook 'haskell-mode-hook 'hindent-mode) ) ) (use-package flycheck-haskell :ensure t) @@ -1009,11 +1018,9 @@ Need to make haskell source be all pretty. :config (progn (autoload 'ghc-init "ghc" nil t) - (autoload 'ghc-debug "ghc" nil t) + (autoload 'ghc-debug "ghc" nil t) (add-hook 'haskell-mode-hook (lambda () - (ghc-init) - ) - ) + (ghc-init))) ) ) (add-hook 'haskell-mode-hook 'interactive-haskell-mode) @@ -1052,6 +1059,42 @@ Need to make haskell source be all pretty. ) #+END_SRC +*** idris-mode + +#+BEGIN_SRC emacs-lisp + (use-package idris-mode + :ensure t + :config + (progn + (add-to-list 'completion-ignored-extensions ".ibc") + (add-hook 'idris-mode-hook' + (lambda () + (push '("()" . ?∅) prettify-symbols-alist) + (push '("\\" . ?λ) prettify-symbols-alist) + (push '("pi" . ?π) prettify-symbols-alist) + (push '("=>" . ?⇒) prettify-symbols-alist) + (push '("->" . ?→) prettify-symbols-alist) + (push '("<-" . ?←) prettify-symbols-alist) + (push '("<=" . ?≤) prettify-symbols-alist) + (push '(">=" . ?≥) prettify-symbols-alist) + (push '("==" . ?≡) prettify-symbols-alist) + (push '("/=" . ?≢) prettify-symbols-alist) + (push '("!!" . "‼") prettify-symbols-alist) + (push '("&&" . ?∧) prettify-symbols-alist) + (push '("||" . ?∨) prettify-symbols-alist) + (push '("~>" . ?⇝) prettify-symbols-alist) + (push '("-<" . ?↢) prettify-symbols-alist) + (push '("not" . ?¬) prettify-symbols-alist) + (push '("forall" . ?∀) prettify-symbols-alist) + (push '("sqrt" . ?√) prettify-symbols-alist) + (push '("undefined" . ?⊥) prettify-symbols-alist) + (prettify-symbols-mode) + ) + ) + ) + ) +#+END_SRC + *** undo-tree Make undo more useful, and treelike. @@ -1096,6 +1139,21 @@ Instead of text might as well get a decent mode hook going here. (use-package nix-mode :ensure t) #+END_SRC +*** docker-mode + +#+BEGIN_SRC emacs-lisp + (use-package dockerfile-mode :defer t) +#+END_SRC + +*** cscope + +#+BEGIN_SRC emacs-lisp + (use-package xcscope + :defer t + :init (progn (cscope-setup)) + ) +#+END_SRC + * mode related *** common defaults @@ -1309,6 +1367,6 @@ Load this up last to allow for local customization if needed and to keep from cu #+END_SRC * Load any local definitions -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (load-file "~/.emacs.d/local.el") #+END_SRC diff --git a/nix.org b/nix.org index 12b5dda..007c241 100644 --- a/nix.org +++ b/nix.org @@ -88,8 +88,6 @@ Nix user config.nix setup. pigz pixz pkgconfig - poppler_utils - postgresql pv python27Packages.flake8 python27Packages.howdoi @@ -97,7 +95,6 @@ Nix user config.nix setup. python27Packages.pyflakes python27Packages.pylint python27Packages.virtualenv - readline rlwrap rsync rtags @@ -105,7 +102,6 @@ Nix user config.nix setup. sloccount sqlite sshpass - subversionClient texlive.combined.scheme-full tmux tree