Skip to content

Instantly share code, notes, and snippets.

View eggplants's full-sized avatar
🏠
Working from home

haruna eggplants

🏠
Working from home
View GitHub Profile
require "open-uri"
out=[]
file_ext="html"
[*400..550].each{|id|
print uid="s1811#{id.to_s}"
[*1..9].each{|i|[*1..10].each{|j|["","s"].each{|prot|
begin
url=%Q!http#{prot}://cgi.u.tsukuba.ac.jp/~#{uid}/cje/e#{i.to_s}-#{j.to_s}.#{file_ext}!
data=open(url)
out<<[uid,url] if data.status[0]=="200"
@eggplants
eggplants / 01-15.txt
Created September 10, 2019 11:32
SSH KEYS FOR EACH LEVEL SERVER
1 boJ9jbbUNNfktd78OOpsqOltutMc3MY1
2 CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9
3 UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK
4 pIwrPrtPN36QITSp3EQaw936yaFoFgAB
5 koReBOKuIDDepwhWk7jZC0RTdopnAYKh
6 DXjZPULLxYr17uwoI01bNLQbtFemEgo7
7 HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs
8 cvX2JJa4CFALtqS87jk27qwqGhBM9plV
9 UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR
10 truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk
@eggplants
eggplants / all-clone
Created October 8, 2019 19:26
githubから任意ユーザの全(Public)リポジトリをcloneするシェルスクリプト
#!/bin/bash
curl -s https://api.github.com/users/[github_userid]/repos|
grep html_url|
awk -F'"' '$0=$4'|
sort|uniq -u|
while read i
do git clone $i.git
done
@eggplants
eggplants / osaka.bash
Last active October 11, 2019 07:44
食べログの点数の{度数分布,平均値,中央値}を表示するおもちゃ
# [SETTING] #
#pref='osaka/'
#region=''
#scores=[]
#freq=0.1
#pagelimit=60
#scoreshow=false
$ ruby tabelog_score.rb
CURRENT TIME IS 2019-10-11 00:55:32 +0900.
PREF:osaka/, REGION_CODE:
@eggplants
eggplants / tabeallpref.rb
Created October 11, 2019 07:48
食べログ膳都道府県
require "open-uri"
require "time"
#PREF-DATA
preflist=[
"hokkaido","aomori","iwate",
"miyagi","akita","yamagata",
"fukushima","ibaraki","tochigi",
"gunma","saitama","chiba",
"tokyo","kanagawa","niigata",
#https://stackoverflow.com/questions/1697334/algorithm-for-solving-sudoku
from time import time
from re import search
from re import findall
from sys import argv
from os.path import isfile
print("""\
#########################################################################
#########################################################################
____ _ _ ____ ___ _ ___ _ ____ ___ _ __ _______ ____
@eggplants
eggplants / gem
Last active November 1, 2019 15:51
actioncable (5.2.3, 5.0.7.2, 5.0.6)
actionmailer (5.2.3, 5.0.7.2, 5.0.6)
actionpack (5.2.3, 5.0.7.2, 5.0.6)
actionview (5.2.3, 5.0.7.2, 5.0.6)
activejob (5.2.3, 5.0.7.2, 5.0.6)
activemodel (5.2.3, 5.0.7.2, 5.0.6)
activerecord (5.2.3, 5.0.7.2, 5.0.6)
activestorage (5.2.3)
activesupport (5.2.3, 5.0.7.2, 5.0.6)
addressable (2.6.0)
#!/bin/bash
cat<<'A'>>memo
#!/bin/sh
echo "[+]${@}\t`date +%Y-%m-%d `">>~/.memod
A
chmod 755 memo
sudo mv memo /usr/bin/
echo "cat ~/.memod">>.bashrc
memo てすと
bash
@eggplants
eggplants / yomi_check_mecab.bash
Last active November 8, 2019 12:47
mecabと拡張辞書のよみがなカラムにカタカナ以外が含まれている稀有な例のあぶり出し
s1811528@7C202-P015:~/Desktop/neo/juman+ipadic$ ls
Noun.adjv.csv Noun.hukusi.csv Noun.name.csv Noun.place.csv
Noun.adverbal.csv Noun.keishiki.csv Noun.number.csv Noun.proper.csv
Noun.csv Noun.koyuu.csv Noun.org.csv Noun.suusi.csv
Noun.demonst.csv Noun.nai.csv Noun.others.csv Noun.verbal.csv
s1811528@7C202-P015:~/Desktop/neo/juman+ipadic$ ls|while read i;do echo $i;cat $i|awk -F, '$0=$12'|ruby -e 'p (i=`dd`.split).delete_if{|_|_=~/^[ァ-ヿ]+$/}';done 2>/dev/null
Noun.adjv.csv
[]
Noun.adverbal.csv
[]
@eggplants
eggplants / end_ru_fullwidth.csv
Last active November 12, 2019 21:05
頭文字:{あ..わ}, 文字列長{2..10}
num case word yomi
1 あ2 ある ある
1 あ3 あひる 家鴨
2 あ3 あえる あえる
3 あ3 あさる 阿沙流
4 あ3 あひる あひる
5 あ3 あひる あひる
6 あ3 あきる 阿伎留
7 あ3 あまる あまる
8 あ3 あぜる あぜる