Operation | Webdav | REST |
---|
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
;; | |
;; jump to thing on M-. | |
;; | |
(defun mu4e-jump-to-thing (u) | |
"jump to thing under point (should work with addresses, dates, tags)" | |
(interactive "P") | |
(let* | |
( | |
(type (string-remove-suffix ":" (first (split-string (thing-at-point '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
proxy_request = ->(env : HTTP::Server::Context) do | |
req = env.request | |
req.path = "some_prefix" + req.path | |
req.headers.delete("Accept-Encoding") | |
req.headers.delete("X-Auth-Token") | |
response = HTTP::Client.new( | |
"new_host", 443, true |
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
# coding: utf-8 | |
require "git"; | |
# open repo | |
repo = Git::Repo.open "./" | |
# get tree | |
tree = repo.head.to_commit.to_tree | |
paths = [] of String |
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 "spec" | |
macro on_all_child_classes(&block) | |
macro injection | |
{{block && block.body}} | |
end | |
macro inject | |
injection | |
macro inherited | |
injection |
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
import request from 'superagent'; | |
/* | |
* given files is an array of File Objects: | |
* | |
* sendAsHtmlForm("/api/posts", | |
* "post", {title: "a title", body. "a body"}, files) | |
* | |
*/ | |
function sendAsHtmlForm(url, method, json, files) { |