- from toが第一引数, 第二引数で書ける
- デフォルトの対象ファイルがカレントからの再帰
- 表示がgit diff, patch形式
- デフォルトが上書き動作。オプションでdry-run(diffだけ出る)
$ ar from to -dry | tee x.patch
diff --git a/test.file b/test.file
index 0113cbc..94eae1f 100644| # ref: | |
| # * https://learn.microsoft.com/en-us/azure/event-grid/mqtt-client-microsoft-entra-token-and-rbac | |
| # * https://github.com/eclipse-paho/paho.mqtt.python/blob/master/src/paho/mqtt/properties.py | |
| from paho.mqtt.client import Client as MqttClient, MQTTv5 | |
| from paho.mqtt.properties import Properties as MqttProperties | |
| from paho.mqtt.packettypes import PacketTypes as MqttPacketTypes | |
| from azure.identity import DefaultAzureCredential |
| import os | |
| from azure.identity import DefaultAzureCredential | |
| from azure.mgmt.appcontainers import ContainerAppsAPIClient | |
| sub_id = os.environ.get("SUBSCRIPTION_ID") | |
| rg_id = os.environ.get("RESOURCE_GROUP_ID") | |
| app_name = os.environ.get("APP_NAME") | |
| client = ContainerAppsAPIClient(credential=DefaultAzureCredential(), subscription_id=sub_id) |
| from timeit import timeit | |
| forloop = """ | |
| arr = [] | |
| for i in range(10000): | |
| arr.append(i*i) | |
| """ | |
| listcomp = """ | |
| arr = [i*i for i in range(10000)] |
| import feedparser | |
| from datetime import datetime | |
| dt_fmt = "%a, %d %b %Y %H:%M:%S %Z" | |
| def rss2mm(feed_url, until, max_n=3): | |
| ret_lines = [] | |
| f = feedparser.parse(feed_url) | |
| for idx, e in enumerate(f["entries"]): |
| cmake_minimum_required(VERSION 3.4.1) | |
| project(hello-jni) | |
| set(OpenCV_DIR "/path/to/OpenCV-android-sdk/sdk/native/jni/abi-armeabi-v7a") | |
| find_package(OpenCV REQUIRED) | |
| set(CMAKE_CXX_FLAGS "-O2 -std=c++11 -Wno-format-security --include-directory-after /path/to/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi") | |
| add_library(hello-jni SHARED hello-jni.cpp) |
| $ docker run --rm --name docker-tmux -td -v $PWD/tmux.conf:/root/.tmux.conf squallcx/docker-tmux tmux new -A -s ttyd | |
| $ ttyd docker exec -ti docker-tmux tmux new -A -s ttyd |
| FROM centos:7 | |
| RUN yum groupinstall -y "Development tools" | |
| WORKDIR /src | |
| RUN git clone https://github.com/kyamagu/faiss-wheels.git &&\ | |
| cd faiss-wheels &&\ | |
| git submodule init &&\ | |
| git submodule update | |
| RUN yum install -y wget pcre pcre-devel &&\ | |
| wget https://downloads.sourceforge.net/swig/swig-4.0.1.tar.gz &&\ |
| FROM alpine | |
| RUN apk add --no-cache gcc g++ make automake autoconf pkgconfig git libevent-dev ncurses-dev byacc bsd-compat-headers | |
| RUN \ | |
| git clone https://github.com/tmux/tmux.git && \ | |
| cd tmux && \ | |
| ./autogen.sh && \ | |
| ./configure && \ | |
| make && \ | |
| make install |
| @startgantt | |
| project starts the 2020/1/1 | |
| -- milestones -- | |
| [マイルストーンA] as msA | |
| [マイルストーンB] as msB | |
| [マイルストーンC] as msC | |
| -- tasks -- | |
| [タスク1] as task1 |