This file contains hidden or 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
| # Modified by Tadashi Saito (@tadd), 2022 | |
| # https://gist.github.com/tadd/72fd6cd1efa41ea5b4e38a1cce9c7ad5 | |
| # | |
| # ipsj.cls を upLaTeX 用にしてみる(源ノ明朝・源ノ角ゴシックを使う) | |
| # https://gist.github.com/trueroad/c44312923bf02226c2274388941d0453 | |
| # | |
| # ipsj.cls は pLaTeX 専用のようなのですが、 | |
| # 試しに upLaTeX で使えるようにした up-ipsj.cls を作ってみました。 | |
| # upLaTeX なので pLaTeX では難しかった源ノ明朝・源ノ角ゴシックの利用が | |
| # できるようになります。 |
This file contains hidden or 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
| #line-edit | |
| ^A home | |
| ^E end | |
| ^P up | |
| ^N down # Overriding! | |
| ^F right | |
| ^B left | |
| ^K kill-line | |
| ^D delete |
This file contains hidden or 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
| # Usage: sh gen-git-pushj-instead-of.sh github.com-name [gitlab.com-name] >>~/.gitconfig | |
| # Then: | |
| # git clone gist:711a1f04cd89e488fb08ef562e045f43 # or | |
| # git clone gh:ruby/ruby | |
| _url() | |
| { | |
| printf "[url \"git@$2:${3:+$3/}\"]\n\tinsteadOf = $1:\n" | |
| } |
This file contains hidden or 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
| #!/bin/bash -eu | |
| argv="$(sed -E 's/(^| )-f\b/\1--force-with-lease/g' <<<$@)" | |
| exec git push ${argv} |
This file contains hidden or 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
| type -t git-$1 >/dev/null && exec git-$1 "${@:2}" || git "$@" |
This file contains hidden or 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
| #!/bin/sh | |
| # First of all, there is one bad news: you cannot update everything in this script. | |
| # Below is my current status and methods. | |
| # | |
| # * System pacakges: apt update && apt upgrade | |
| # * Firmware: fwupdgmr refresh && fwupdgmr update | |
| # * Chrome, Firefox, and Thunderbird: they won't be updated unless booted (maybe?) | |
| # if you installed binary from upstreams | |
| # * Emacs itself: using distro's package |
This file contains hidden or 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
| const [localeYear, localeLongDate] = [{year: 'numeric'}, {dateStyle: 'long'}].map(o => | |
| d => d?.toLocaleString("ja-JP-u-ca-japanese", o)); | |
| const isoDate = d => d?.toISOString().slice(0, "yyyy-mm-dd".length); | |
| const d = new Date(643, 0, 1); // 643-01-01 | |
| const n = 365 * 4; // ~ 4 years | |
| let yPrev, dPrev; | |
| for (let i = 0; i < n; i++) { | |
| const y = localeYear(d); | |
| if (y !== yPrev) { |
This file contains hidden or 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
| # Only for those who are too lazy to write `self` at the end of their methods | |
| def tapper(m) | |
| Module.new do | |
| define_method(m) do |*a, **k, &b| | |
| tap { super(*a,**k, &b) } | |
| end | |
| end | |
| end |
This file contains hidden or 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
| GNU AFFERO GENERAL PUBLIC LICENSE | |
| Version 3, 19 November 2007 | |
| Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> | |
| Everyone is permitted to copy and distribute verbatim copies | |
| of this license document, but changing it is not allowed. | |
| Preamble | |
| The GNU Affero General Public License is a free, copyleft license for |
NewerOlder