Skip to content

Instantly share code, notes, and snippets.

View amane-katagiri's full-sized avatar

Amane Katagiri amane-katagiri

View GitHub Profile
@amane-katagiri
amane-katagiri / activate.fish.patch
Last active February 19, 2020 00:59
Fix activate.fish of venv
--- old_venv/bin/activate.fish 2018-11-28 15:29:12.939054337 +0900
+++ new_venv/bin/activate.fish 2020-02-19 09:58:19.751090341 +0900
@@ -13,10 +13,12 @@ function deactivate -d "Exit virtualenv
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
functions -e fish_prompt
set -e _OLD_FISH_PROMPT_OVERRIDE
- functions -e fish_prompt
- set -e _OLD_FISH_PROMPT_OVERRIDE
- functions -c _old_fish_prompt fish_prompt
- functions -e _old_fish_prompt
This file has been truncated, but you can view the full file.
@ 単価…で/…につき
104 通信で用いられる『了解』の意を表す語
A answer / ampere
a. about / acre[s] / adjective
Triassic period (地質の年代で)三畳紀の / 二畳紀
A,a 〈C〉英語アルファベットの第1字 / 〈U〉(音階の)イ音,イ調 / 〈C〉《米》(学校の成績の)A
A.A. =AA / antiaircraft
a,an 《oneの弱い意味で》『一つの』,一人の / 《日本語では表現しない場合》 / 《日本語でも表現する場合》 / 『ある』(a certain) / 《同種類のものを代表してany, eachの弱い意味で》…『というもの[は]』,いずれの,どの / 《単位を表す語につけて》…『につき』,毎…(per) / 《しばしばof, atなどの後で》同じ(the same) / 《固有名詞につけて》…のような人,…という名の人,…家の人;…の作品(製品) / 《固有名詞の性格・特徴などを強調するとき》 / 《andで結んだ二つ以上の名詞につけて》 / 《名詞が同一の人・物をさす場合》…でも~でもある人(物) / 《名詞が別個の人・物をさす場合》…つきの,一組の…と~ / 《物質名詞につけて》一種の,一つの / 《抽象名詞につけその具体例・種類・行為などを表して》 / 《have,give,make,takeなどに続く動詞と同形の名詞につけて》1回の
A.B. B.A.
A.C. ante Christum 紀元前(before Christ)
@amane-katagiri
amane-katagiri / bash_trap_template.sh
Created September 26, 2017 09:33 — forked from sechiro/bash_trap_template.sh
Bash signal trap template. Bashでよく使うシグナルトラップのテンプレート。
#!/bin/bash
set -u # Check unset variables only
#set -ue # Check unset variables. Exit on error
LANG=C
# Trap signals
trap_HUP() {
echo "Trap HUP signal."
exit 1
}
@amane-katagiri
amane-katagiri / 203.178.132.107.txt
Last active September 26, 2017 16:28
信頼できる筋(?)
$ host 203.178.132.107
107.132.178.203.in-addr.arpa is an alias for 107.64.132.178.203.in-addr.arpa.
107.64.132.178.203.in-addr.arpa domain name pointer napt3.tsukuba.wide.ad.jp.
@amane-katagiri
amane-katagiri / get_broadcasters_list.sh
Last active January 11, 2018 03:52 — forked from muyesh/radiko.sh
radikoをlinuxで聞いたり録音したりするやつ
#!/bin/bash
# http://radiko.jp/index/ から放送局のリストを取得
curl -Ss "http://radiko.jp/index/" \
| xmllint --xpath '//div[@class="content__rwd rwd channel-list"]//a' --html - 2>/dev/null | sed -e 's#</a>#</a>\n#g' \
| sed -e 's#<a href="/index/##g' | sed -e 's#</a>##g' \
| sed -e 's#/\?">#\t#g'
@amane-katagiri
amane-katagiri / shall-i-collide.py
Last active January 21, 2018 17:28
Create a PDF file with the same SHA-1 hash that displays two different images.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Create a PDF file with the same SHA-1 hash that displays two different images.
Works Cited ...
* JPEG: Still Image Data Compression Standard
* http://hp.vector.co.jp/authors/VA032610/JPEGFormat/markers.htm
Inspired by ...
@amane-katagiri
amane-katagiri / detect_replace.py
Last active March 28, 2018 10:11
魚拓サービスはIPを書き換えているか?
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from http.server import HTTPServer, SimpleHTTPRequestHandler
class EchoHandler(SimpleHTTPRequestHandler):
def make_response(self):
table = str.maketrans("0123456789.:", "〇一二三四五六七八九、:")
real_address = "{}:{}".format(*self.client_address)
response = "You are: {}\n\n{}".format(real_address, str(self.headers))
@amane-katagiri
amane-katagiri / print_zj58
Last active November 17, 2018 10:40
ZJ-58で印刷(ImageMagickを必要)
#!/bin/bash -Cue
FONTSIZE='31'
PRINTER='ZJ-58'
if [ "$#" -lt 1 ]; then
echo "usage: $0 PRINT_TO_TEXT" 1>&2
exit 1
fi
if ! type convert 2>/dev/null 1>/dev/null || ! type identify 2>/dev/null 1>/dev/null; then
@amane-katagiri
amane-katagiri / youtube-info
Last active April 2, 2018 02:19
お歌を聴く
#!/bin/bash -Cue
if [ "$#" -lt 1 ]; then
echo "usage: $0 YOUTUBE_URL_TO_GET_INFO" 1>&2
exit 1
fi
curl -SsL "$1" | grep -oP '(?<=<title>).+(?=</title>)'
@amane-katagiri
amane-katagiri / yt-search.py
Created April 2, 2018 01:50 — forked from Igglybuff/yt-search.py
youtube-search
#!/usr/bin/python3
import urllib.request
import urllib.parse
import re
import sys
inargs = sys.argv
inargs.remove(inargs[0])
inargs = ' '.join(inargs)