Skip to content

Instantly share code, notes, and snippets.

View paperlefthand's full-sized avatar
🤤
I'm floating...

Miura Kosuke paperlefthand

🤤
I'm floating...
View GitHub Profile
@paperlefthand
paperlefthand / tweet-destroyer.py
Last active May 16, 2021 14:04
Tweet削除スクリプト(白魔法)
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys as keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select
import json
import time
import re
@paperlefthand
paperlefthand / linepost.js
Created May 23, 2020 13:31
LINE Messaging APIでpush通知を送るnode.jsスクリプト
const fs = require('fs')
const request = require('request')
const setting = JSON.parse(fs.readFileSync('./setting.json', 'utf8'))
const uids = setting['lineuids']
const token = setting['linetoken']
const options = {
uri: "https://api.line.me/v2/bot/message/push",
headers: {
@paperlefthand
paperlefthand / scholarnet.js
Last active May 9, 2021 04:37
奨学金返済状況スクレイピング(JavaScript)
const puppeteer = require('puppeteer')
const fs = require('fs')
const url = "https://scholar-ps.sas.jasso.go.jp/mypage/login_open.do"
const setting = JSON.parse(fs.readFileSync('./setting.json', 'utf8'))
const LOGIN_ID = setting['id']
const LOGIN_PASS = setting['password']
const UNIV_NUM = setting['univ_num']
const now = new Date();
@paperlefthand
paperlefthand / scholarnet.py
Last active April 3, 2021 05:47
奨学金返済状況スクレイピング(Python)
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select
import json
import time
URL = "https://scholar-ps.sas.jasso.go.jp/mypage/login_open.do"
@paperlefthand
paperlefthand / gz_to_csv.sh
Last active December 13, 2021 09:42
シェル芸
#!/bin/bash
# decompress *.gz files under current directory, and add extension names ".csv" each of them.
for f in `find . -name '*.gz'`;
do
name=${f%.gz};
gzip -d ${name}.gz;
mv ${name} ${name}.csv;
done
@paperlefthand
paperlefthand / Main.java
Created February 16, 2020 04:06
Javaでマルチスレッド
package com.example.multithread;
public class Main {
public static void main(String[] args) {
MultiThread mt1 = new MultiThread(1);
MultiThread mt2 = new MultiThread(2);
MultiThread mt3 = new MultiThread(3);
@paperlefthand
paperlefthand / config.yml
Created September 14, 2019 15:30
circleCIでAWS S3にファイルをアップロード
version: 2
# https://circleci.com/docs/2.0/deployment-integrations/#aws
# $ circleci config validate
# $ circleci local execute -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
jobs:
build:
docker:
- image: paperlefthand/docker-plantuml
@paperlefthand
paperlefthand / make_diagram.sh
Created September 14, 2019 15:15
plantumlで, umlディレクトリ配下の.umlファイルを全てdiagramに変換する.
#!/bin/bash
PLANTUML_PATH=$PWD/uml/plantuml.jar
for d in `find $PWD/uml -name '*.uml'`
do
java -jar $PLANTUML_PATH $d -charset UTF-8
done
@paperlefthand
paperlefthand / main.go
Created September 4, 2018 12:58
並行で発行したgoroutineをまとめ上げる処理
package main
import (
"fmt"
"sync"
)
func main() {
wg := &sync.WaitGroup{}
c := make(chan int, 10)
@paperlefthand
paperlefthand / main.go
Last active August 31, 2018 13:02
Goで3秒後にPrintln
package main
import (
"fmt"
"time"
)
func main() {
setTimeOut(3)
}