ChangeLog を書く際によく使われる英語をまとめました。
ほとんど引用です。
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
2020/5/31追記:
自分用のメモに書いていたつもりだったのですが、たくさんのスターを頂けてとても嬉しいです。
と同時に、書きかけで中途半端な状態のドキュメントをご覧いただくことになっており、大変心苦しく思っています。
このドキュメントを完成させるために、今後以下のような更新を予定しています。
2021/1/22追記:
use std::rc::Rc; | |
trait HKT<U> { | |
type C; // Current type | |
type T; // Type with C swapped with U | |
} | |
macro_rules! derive_hkt { | |
($t:ident) => { | |
impl<T, U> HKT<U> for $t<T> { |
#![feature(generic_associated_types)] | |
#[allow(dead_code)] | |
trait Functor { | |
type Unwrapped; | |
type Wrapped<B>: Functor; | |
fn map<F, B>(self, f: F) -> Self::Wrapped<B> | |
where | |
F: FnMut(Self::Unwrapped) -> B; |
githubへ登録 | |
=========== | |
git remote add origin git@github.com:<username>/<application_name>.git | |
git push origin master | |
初期設定 | |
======= | |
git config --global user.name "Foo Bar" | |
git config --global user.email "foo@bar.com" |
package code.webapp | |
import scala.collection.JavaConversions.seqAsJavaList | |
import org.apache.wicket.behavior.AttributeAppender | |
import org.apache.wicket.datetime.markup.html.form.DateTextField | |
import org.apache.wicket.extensions.validation.validator.RfcCompliantEmailAddressValidator | |
import org.apache.wicket.markup.html.basic.{ MultiLineLabel, Label } | |
import org.apache.wicket.markup.html.form.{ TextField, TextArea, SubmitLink, RadioGroup, Radio, PasswordTextField, FormComponent, Form, DropDownChoice, CheckGroup, Button } | |
import org.apache.wicket.markup.html.link.{ Link, BookmarkablePageLink } | |
import org.apache.wicket.markup.html.link.ExternalLink |
class Respond extends Service[Request, Response] with Logger { | |
def apply(request: Request) = { | |
try { | |
request.method -> Path(request.path) match { | |
case GET -> Root / "todos" => Future.value { | |
val data = Todos.allAsJson | |
debug("data: %s" format data) | |
Responses.json(data, acceptsGzip(request)) | |
} | |
case GET -> Root / "todos" / id => Future.value { |
Mastodon が他のインスタンスと情報交換をする OStatus API の使い方。使ってるだけのユーザは知る必要がない裏側の話。
Mastodon インスタンスに対して、RFC6415 が規定する /.well-known/host-meta
というパスを要求すると以下の XML が返ってくる.
<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Link rel="lrdd" type="application/xrd+xml" template="https://[MASTODON_HOST]/.well-known/webfinger?resource={uri}"/>
</XRD>
enum RetVal { | |
Num(u128), | |
Recursive(Box<dyn Fn() -> RetVal>), | |
} | |
fn trampoline(r: RetVal) -> u128 { | |
let mut r = r; | |
loop { | |
match &r { | |
RetVal::Recursive(func) => { |