- Conocer que es un
linter
y como funciona - Conocer
flymake
- Integrar
ruff
, linter depython
, enemacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system.activationScripts.applications.text = let | |
env = pkgs.buildEnv { | |
name = "system-applications"; | |
paths = config.environment.systemPackages; | |
pathsToLink = "/Applications"; | |
}; | |
in | |
pkgs.lib.mkForce '' | |
# Set up applications. | |
echo "setting up /Applications..." >&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let* ((status-line (buffer-substring-no-properties (line-beginning-position) (line-end-position))) | |
(status-code (nth 1 (split-string status-line " ")))) | |
(unless (string-equal status-code "201") | |
(user-error "There was a problem with GitHub API, try again later")) | |
(search-forward "\n\n") | |
(let* ((raw-response (buffer-substring-no-properties (point) (point-max))) | |
(data (json-parse-string raw-response)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my/gist-handle-response (response) | |
"Process content of RESPONSE and extract link." | |
(interactive) | |
(let* ((status-line (buffer-substring-no-properties (line-beginning-position) (line-end-position))) | |
(status-code (nth 1 (split-string status-line " ")))) | |
(unless (string-equal status-code "201") | |
(user-error "There was a problem with GitHub API, try again later")) | |
(search-forward "\n\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(puthash filename file files) | |
(puthash "files" files payload) | |
(let ((url-request-method "POST") | |
(url-request-extra-headers `(("Content-Type" . "application/json") ("User-Agent" . "gist.el") ("Authorization" . ,(concat "Bearer " oauth-token)))) | |
(url-request-data (json-encode payload))) | |
(url-retrieve "https://api.github.com/gists" 'my/gist-handle-response)))) | |
(defun my/gist-handle-response () | |
"Process content of RESPONSE and extract link." | |
(interactive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let ((url-request-method "POST") | |
(url-request-extra-headers `(("Content-Type" . "application/json") ("User-Agent" . "gist.el") ("Authorization" . ,(concat "Bearer " oauth-token)))) | |
(url-request-data (json-encode payload))) | |
(url-retrieve "https://api.github.com/gists" 'my/gist-handle-response)))) | |
(defun my/gist-handle-response (response) | |
"Process content of RESPONSE and extract link." | |
(let* ((status-line (buffer-substring-no-properties (line-beginning-position) (line-end-position))) | |
(status-code (nth 1 (split-string status-line " ")))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(unless (not (string-equal status-code 201)) | |
(user-error "There was a problem with GitHub API, try again later")) | |
(search-forward "\n\n") | |
(let* ((raw-response (buffer-substring-no-properties (point) (point-max))) | |
(data (json-parse-string raw-response)) | |
(gist-link (gethash "html_url" data))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(puthash "content" content file) | |
(puthash filename file files) | |
(puthash "files" files payload) | |
(message (json-encode payload)) | |
(let ((url-request-method "POST") | |
(url-request-extra-headers `(("Content-Type" . "application/json") ("User-Agent" . "gist.el") ("Authorization" . ,(concat "Bearer " oauth-token)))) | |
(url-request-data (json-encode payload))) | |
(url-retrieve "https://api.github.com/gists" 'my/gist-handle-response)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'tree-sitter) | |
(require 'seq) | |
(require 'cl-lib) | |
;;TODO: mapp grammar for other langauges and complete grammar for haskell | |
(setq modes-mapping '((haskell-mode . (exp_apply exp_infix exp_in exp_cond exp_literal)))) | |
(defun expr-at-point () | |
"Highlight expression at point." | |
(interactive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function svg2png(svgContent, width, height, callback) { | |
// svgContent should be in base64 | |
let svgData = svgContent; | |
let canvas = document.createElement("canvas"); | |
let context = canvas.getContext("2d"); | |
canvas.width = width; | |
canvas.height = height; | |
let image = new Image(); |
NewerOlder