Skip to content

Instantly share code, notes, and snippets.

View oscarvarto's full-sized avatar

Oscar Vargas Torres oscarvarto

View GitHub Profile
@oscarvarto
oscarvarto / gist:0a4f197c0dbcc37a6f787534bcfa0be5
Created August 28, 2023 17:01
Trying to (mouse) click "Back to index" in Official modules documentation.
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
insert("[[" nil "]]")
(progn (setq buffer-file-name (buffer-file-name docs-buf)) (let ((org-inhibit-startup t)) (org-mode)) (set (make-local-variable 'org-link-abbrev-alist-local) parent-link-abbrevs) (insert "[[" link "]]") (set-buffer-modified-p nil) (org-link-open (org-element-context)))
(unwind-protect (progn (setq buffer-file-name (buffer-file-name docs-buf)) (let ((org-inhibit-startup t)) (org-mode)) (set (make-local-variable 'org-link-abbrev-alist-local) parent-link-abbrevs) (insert "[[" link "]]") (set-buffer-modified-p nil) (org-link-open (org-element-context))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (setq buffer-file-name (buffer-file-name docs-buf)) (let ((org-inhibit-startup t)) (org-mode)) (set (make-local-variable 'org-link-abbrev-alist-local) parent-link-abbrevs) (insert "[[" link "]]") (set-buffer-modified-p nil) (org-link-ope
@oscarvarto
oscarvarto / gist:5549cfd777795afd3ef61cd8f7b94ea5
Created August 28, 2023 16:20
Doom Emacs - System Information.
generated Aug 28, 2023 10:15:42
system "Garuda Linux" Linux 6.4.12-zen1-1-zen x86_64 pgtk
emacs 29.1 ~/.config/emacs/
doom 3.0.0-pre PROFILE=_@0 grafted, HEAD -> master, origin/master, origin/HEAD
7a75030 2023-08-21 18:17:05 +0200 ~/.config/doom/
shell /bin/bash
features ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB
@oscarvarto
oscarvarto / cannot-open-doc-el
Created August 28, 2023 16:14
Cannot open documentation Doom Emacs - Cannot find entry with ID
error("Cannot find entry with ID \"%s\"" "46d2058d-249e-45a7-a7a2-58bade48df65")
#<subr org-id-open>("46d2058d-249e-45a7-a7a2-58bade48df65" nil)
funcall(#<subr org-id-open> "46d2058d-249e-45a7-a7a2-58bade48df65" nil)
(prog1 (funcall fn id arg) (cond ((null search)) ((string-match-p "\\`[0-9]+\\'" search) (forward-line (string-to-number option))) ((string-match "^/\\([^/]+\\)/$" search) (let ((match (match-string 1 search))) (save-excursion (org-link-search search)) (if (re-search-forward match) (progn (goto-char (match-beginning 0)))))) ((org-link-search search))))
(progn (if --cl-rest-- (signal 'wrong-number-of-arguments (list '(id &optional search) (+ 2 (length --cl-rest--))))) (prog1 (funcall fn id arg) (cond ((null search)) ((string-match-p "\\`[0-9]+\\'" search) (forward-line (string-to-number option))) ((string-match "^/\\([^/]+\\)/$" search) (let ((match (match-string 1 search))) (save-excursion (org-link-search search)) (if (re-search-forward match) (progn (goto-char ...))))) ((org-link-search
@oscarvarto
oscarvarto / gist:204e9ce6244435bb725066b529644698
Created July 28, 2020 03:30
Output/log error message after opening haskell-language-server repo with VSCode
Starting GHCi with: "stack --no-terminal --color never repl --no-load ghcide:lib ghcide:exe:ghcide ghcide:exe:ghcide-bench ghcide:exe:ghcide-test-preprocessor ghcide:test:ghcide-tests ghcide:bench:benchHist haskell-language-server:lib haskell-language-server:exe:haskell-language-server haskell-language-server:exe:haskell-language-server-wrapper haskell-language-server:test:func-test haskell-language-server:test:wrapper-test"
(Under cwd /home/oscarvarto/gitRepos/haskell-language-server)
-> :set prompt ""
|> :set prompt-cont ""
ghci |
ghci | * * * * * * * *
ghci | Warning: There are cabal settings for this project which may prevent GHCi from loading your code properly.
ghci | In some cases it can also load some projects which would otherwise fail to build.
ghci |
ghci | -XOverloadedStrings will be used, but it can cause type ambiguity in code not usually compiled with it.
@oscarvarto
oscarvarto / gist:f294ff96432ba70b0c2f46dc2f8f2ea1
Created July 12, 2020 02:39
Error while running `cabal install` in docopt.hs' examples directory
NavalFate/Main.hs:7:18: error:
• Exception when trying to run compile-time code:
NavalFate/USAGE.docopt: openFile: does not exist (No such file or directory)
Code: template-haskell-2.14.0.0:Language.Haskell.TH.Quote.quoteExp
docoptFile "NavalFate/USAGE.docopt"
• In the quasi-quotation: [docoptFile|NavalFate/USAGE.docopt|]
|
7 | navalFateUsage = [docoptFile|NavalFate/USAGE.docopt|]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
$ stack build
Building all executables for `my-projext' once. After a successful build of all of them, only specified executables will be rebuilt.
my-projext> configure (lib + exe)
/home/oscarvarto/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
-- While building package my-projext-0.1.0.0 using:
/home/oscarvarto/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1 configure --user --package-db=clear --package-db=global --package-db=/home/oscarvarto/.stack/snapshots/x86_64-linux-nix/627d44f0e613b0677d8e0a330cc3a37ff543ad785d74f7e3e2145edd946c4499/8.6.5/pkgdb --package-db=/home/oscarvarto/haskellDev/my-projext/.stack-work/install/x86_64-linux-nix/627d44f0e613b0677d8e0a330cc3a37ff543ad785d74f7e3e2145edd946c4499/8.6.5/pkgdb --libdir=/home/oscarvarto/haskellDev/my-projext/.stack-wo
Got error while processing diagnostics: readCreateProcess: /nix/store/36al53k8r3ddqj1bz1kawxa3f3cdkilj-cabal-helper-0.9.0.0/bin/cabal-helper-wrapper "--with-ghc=ghc" "--with-ghc-pkg=ghc-pkg" "--with-cabal=cabal" "v1-style" "/home/oscarvarto/haskellDev/my-projext" "/home/oscarvarto/haskellDev/my-projext/dist" "package-db-stack" "flags" "compiler-version" "ghc-merged-pkg-options" "config-flags" "non-default-config-flags" "ghc-src-options" "ghc-pkg-options" "ghc-lang-options" "ghc-options" "source-dirs" "entrypoints" "needs-build-output" (exit 1): failed
* Hello
#+begin_src mermaid :file hello.png
sequenceDiagram
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
@oscarvarto
oscarvarto / home.nix
Last active November 19, 2019 06:49
Current Home Manager configuration
{ config, pkgs, ... }:
let
myEmacsConfig = pkgs.writeText "default.el" ''
(require 'package)
;; optional. makes unpure packages archives unavailable
(setq package-archives nil)
(setq package-enable-at-startup nil)
@oscarvarto
oscarvarto / configuration.nix
Created October 7, 2019 01:50
Current (2019-10-06) /etc/nixos/configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
imports =