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 [lsyear, lslong] = [{year: 'numeric'}, {dateStyle: 'long'}].map(o => | |
d => d && d.toLocaleString("ja-JP-u-ca-japanese", o)); | |
const isolong = d => d && d.toISOString().slice(0, "yyyy-mm-dd".length); | |
const d = new Date(643, 0, 1); | |
let prevy, prevd; | |
for (let i = 0; i < 1300; i++) { | |
//console.debug(lslong(d)); | |
const y = lsyear(d); | |
if (y !== prevy) { |
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 |
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 | |
set -e | |
ver=local1 | |
if [ $# != 1 ]; then | |
echo $0: one argument of .deb needed >&2 | |
exit 1 | |
fi |
NewerOlder