Skip to content

Instantly share code, notes, and snippets.

View legokichi's full-sized avatar
😇
neary heaven

Legokichi Duckscallion legokichi

😇
neary heaven
View GitHub Profile
@matope
matope / Dynamo: Amazonの高可用性Key-value Store.markdown
Last active November 18, 2022 17:54
Dynamo: Amazonの高可用性Key-value Store[和訳]
@pasberth
pasberth / macro-combinator.clj
Last active December 16, 2015 21:58
マクロコンビネータ in infixing.clj
(use 'infixing.core)
(defn >>= [l f] (apply concat (map f l)))
(def mzero (list))
(defn return [x] (list x))
(def macro-combinator-rule
(rules
(infix-map 11 := (fn [x a] (fn [b] `(let [~x ~a] ~b))))
(infix-map 0 :in (fn [m a] (m a)))
(ql:quickload :parenscript)
(ql:quickload :cl-who)
(ql:quickload :clack)
(in-package :ps)
(defvar *canvas-id* "alien-canvas")
(clack:clackup
(lambda (env)
(list 200
'(:content-type "text/html")
(list
@uupaa
uupaa / get.path.for.node.js.md
Last active December 5, 2023 11:18
node.js で絶対パスや相対パスを取得する方法 npm __dirname

node.js でパスを取得する方法についてのメモ

$ node ~/hoge/Foo.js/a.js

を実行したときに、

  • process.argv[1] から、node コマンドに指定された a.js のパス( ~/hoge/Foo.js/a.js )を取得できます
@inetic
inetic / async_result.cpp
Last active July 2, 2024 14:49
Example usage of boost::asio::async_result
// Example of how to use boost::asio::async_result
#include <iostream>
#include <boost/asio.hpp>
#if BOOST_VERSION >= 106600
template<typename CompletionToken>
typename boost::asio::async_result
<CompletionToken, void(boost::system::error_code, std::string)>::return_type
@doloopwhile
doloopwhile / gist:e808ddafe76f0dcefeee
Last active March 11, 2024 02:26
302 Found / 303 See Other / 307 Temporary Redirect

3つのリダイレクトの違い

実はGET(とHEAD)でリクエストされた時の動作は変わりません。 違いはPOST(やPUT/DELETE/OPTIONS)でリクエストされた時の動作です。

**"307 Temporary Redirect(一時的リダイレクト)"**は最初のURLでは実際の処理は行わず、リダイレクト先に改めてリクエストを出し直して欲しい時に使います。 したがって、最初のリクエストがPOSTであれば、 ブラウザはリダイレクト先にもPOSTを使います。 "301 Moved Permanently(恒久的リダイレクト)"の「一時的」版であると思えばよいでしょう。

@voluntas
voluntas / shiguredo_webrtc_sfu_log.rst
Last active July 1, 2024 14:08
時雨堂 WebRTC SFU Sora 開発ログ
@paf31
paf31 / quine.purs
Created February 20, 2015 21:11
PureScript Quine
module Main where
main = Debug.Trace.trace ("module Main where\n\n" ++ code ++ "\n where code = \"\"\"" ++ code ++ "\"\"\"")
where code = """main = Debug.Trace.trace ("module Main where\n\n" ++ code ++ "\n where code = \"\"\"" ++ code ++ "\"\"\"")"""
@sile
sile / 0_raft.md
Last active May 27, 2024 07:53
Raft(分散合意アルゴリズム)について
@voluntas
voluntas / mqtt.rst
Last active March 1, 2023 06:47
MQTT とはなんだったのか

MQTT とはなんだったのか

更新:2017-05-09
作者:@voluntas
バージョン:3.14
URL:http://voluntas.github.io/

MQTT をググって調べた人向け