#ローカルとリモートのブランチ名を変更する
以下、ブランチ名を hoge から foo に変更する例
- ローカルのブランチ名変更
git branch -m hoge foo
- リモートのブランチを消す
#ローカルとリモートのブランチ名を変更する
以下、ブランチ名を hoge から foo に変更する例
git branch -m hoge foo
#!/usr/bin/env python3 | |
import json | |
import textwrap | |
from urllib import request, error | |
LOCATION_CODE = 130000 | |
JMA_URI = ( | |
f"https://www.jma.go.jp/bosai/forecast/data/overview_forecast/{LOCATION_CODE}.json" | |
) |
#!/bin/bash | |
# convert .tex exported from emacs to .docx | |
# works with below: | |
# - pandoc 2.9.2.1 | |
# - pandoc-citeproc 0.17 | |
# - pandoc-crossref v0.3.6.2 | |
cd $(dirname $0)/src | |
exp_docx_path=../docx/$(date +%Y%m%d%H%M).docx |
#!/usr/bin/env bash | |
set -euo pipefail | |
( | |
trap 'tput cnorm;tput init; exit' SIGINT SIGTERM | |
# preparation | |
clear | |
tput civis | |
sleep 1.5 | |
# vertical pos | |
v() { |
# for log-time-ascii: no | |
[PARSER] | |
Name unbound | |
Format regex | |
Regex ^\[(?<time>[\d]*)\] (?<process>[\D]*)\[(?<pid>[\d]*):(?<tid>[\d]*)\] (?<message_type>[\D]*): (?<message>.*) | |
Time_Key time | |
# for log-time-ascii: yes | |
[PARSER] | |
Name unbound_utc |
echo -e "
e38090e5a0b1e5918ae38091
0d0ae382a2e383b3e38389e383ade382a4e38389e381af
e7949fe381a8e6adbbe38292e7b9b0e3828ae8bf94e38199e5ad98e59ca8e381a7e38182e3828be38082
" `# end of the A part` "0d0a" "
e38090e5a0b1e5918ae380910
d0ae8bcaae5bbbbe381aee980a3e98e96e3818ce38282e3819fe38289e38199e381aee381afe38081e
#!/usr/bin/env emacs --script | |
(if (eq system-type 'darwin) | |
(dolist (fpath (split-string (shell-command-to-string "pbpaste") "\n" t)) | |
(let* ((output (replace-regexp-in-string "\\(?:\\.\\w+\\)?$" ".jpg" fpath)) | |
(cmd (format "sips -s format jpeg -s formatOptions 80 \'%s\' --out \'%s\'" | |
fpath output))) | |
(when (and (file-exists-p fpath) | |
(string-match-p "\\.png\\'" fpath)) | |
(princ (format "=> cocnvert: %s\n" fpath)) |
#!/usr/bin/env hy | |
(defn fizzbuzz_match_map [num] | |
(print (.join | |
"\n" | |
(map (fn [i] | |
(match #((% i 3) (% i 5)) | |
#(0 0) "FizzBuzz" | |
#(0 _) "Fizz" | |
#(_ 0) "Buzz" |
#!/usr/bin/env emacs --script | |
(defun fizzbuzz (num) | |
(princ (mapconcat | |
#'(lambda (i) | |
(cond | |
((= 0 (% i 3) | |
(% i 5)) "FizzBuzz") | |
((= 0 (% i 3)) "Fizz") | |
((= 0 (% i 5)) "Buzz") |
#!/usr/bin/env hy | |
(import sys) | |
(import tiktoken) | |
(require hyrule [defmain]) | |
(defmain [] | |
(len (. (tiktoken.encoding_for_model "gpt-4") | |
(encode (sys.stdin.read)))))) |