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
mkdir -p ~/job-draft | |
cd ~/job-draft | |
max_page=64 | |
mkdir -p open | |
for i in `seq $max_page`; do wget "https://job-draft.jp/users/search/career/open?page=$i&user_search%5Bopen_career%5D=1" -O open/$i.html; done | |
sudo apt install -y python3-lxml |
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
setInterval(async () => { | |
if (await fetch('https://www.pref.osaka.lg.jp/iryo/osakakansensho/happyo.html').then(r=>r.text()).then(html=>html.includes('0714'))) new Notification("こんにちは!") | |
}, 10000) |
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
document.body.addEventListener('keydown', e => { | |
const el = [...document.querySelectorAll('.QuestionTxt')].find(qt=>!qt.querySelector('li.on')) | |
if (e.key === 'ArrowLeft') { | |
el.querySelector('a img[alt="○"]').click() | |
el.querySelector('[alt="次の問題へ"]').click() | |
} else if (e.key === 'ArrowRight') { | |
el.querySelector('a img[alt="×"]').click() | |
el.querySelector('[alt="次の問題へ"]').click() | |
} |
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
* * * * * mkdir -p wimax && wget http://192.168.179.1/index.cgi/index_contents -O wimax/$(date --iso-8601=s).html |
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
text = document.all['question-prompt'].textContent + ' ' + document.querySelector('[aria-labelledby="question-prompt"]').textContent | |
text = text.replaceAll('ComputeEngine', 'コンピュートエンジン').replaceAll('Pub / Sub', 'パブサブ').replaceAll('Cloud', 'クラウド').replaceAll('Memorystore', 'メモリーストア') | |
const temp1 = await fetch('http://localhost:50021/audio_query?' + new URLSearchParams({speaker: 1, text}), {method: 'POST'}).then(r=>r.text()) | |
var audioCtx = new AudioContext(); | |
var audioFile = fetch('http://localhost:50021/synthesis?speaker=1', {method: 'POST', headers: {'content-type': 'application/json'}, body: temp1}).then(response => response.arrayBuffer()).then(buffer => audioCtx.decodeAudioData(buffer)).then(buffer => { | |
var track = audioCtx.createBufferSource(); | |
track.buffer = buffer; | |
track.connect(audioCtx.destination); | |
track.start(0); | |
}); |
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
gcloud compute instances create apache --project=qwiklabs-gcp-01-f460d1d402e5 --zone=us-central1-a --machine-type=e2-medium --network-interface=network-tier=PREMIUM,subnet=default --metadata=startup-script=apt-get\ update$'\n'apt-get\ install\ apache2\ -y,enable-oslogin=true --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=174796956123-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --tags=http-server --create-disk=auto-delete=yes,boot=yes,device-name=apache,image=projects/debian-cloud/global/images/debian-11-bullseye-v20220519,mode=rw,size=10,type=projects/qwiklabs-gcp-01-f460d1d402e5/zones/us-central1-a/diskTypes/pd-balanced --no-shielded-secure-boot --shielded-vtpm --shielded-integrity |
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 parse = url => fetch(url).then(r=>r.text()).then(html=>new DOMParser().parseFromString(html,'text/html')) | |
const docs = [await parse('https://www.cloudskillsboost.google/catalog?skill-badge%5B%5D=skill-badge')] | |
while(docs.at(-1).querySelector('[rel="next"]')) docs.push(await parse(docs.at(-1).querySelector('[rel="next"]')?.href)) | |
const questUrls = docs.flatMap(doc => [...doc.querySelectorAll('[href^="/quests/"]')]).map(a => a.href) | |
const questDocs = [] | |
for await (const questUrl of questUrls) questDocs.push(await parse(questUrl)) | |
questDocs.flatMap(doc => [...doc.querySelectorAll('h3>[href^="/focuses"]')]).filter(a=>a.textContent.includes('チャレンジラボ')).map(a=>a.textContent) |
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
gcloud container clusters create gmp-cluster --num-nodes=3 --zone=us-central1-c | |
gcloud container clusters get-credentials gmp-cluster --zone=us-central1-c | |
kubectl create ns gmp-test | |
kubectl -n gmp-test apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/prometheus-engine/v0.2.3/examples/example-app.yaml | |
kubectl -n gmp-public edit operatorconfig config | |
wget https://gist.github.com/GitHub30/337a58a4332f815876de4a82e9bd34f5/raw/d7f9e34dcbb27a86ac96b62aa785e82609f915ff/op-config.yaml | |
export PROJECT=$(gcloud config get-value project) | |
gsutil mb -p $PROJECT gs://$PROJECT | |
gsutil cp op-config.yaml gs://$PROJECT |
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
cd /work/dm | |
sed -i s/SET_REGION/us-east1/g prod-network.yaml | |
gcloud deployment-manager deployments create prod-network --config=prod-network.yaml | |
gcloud config set compute/zone us-east1-b | |
gcloud container clusters create kraken-production-882 \ | |
--num-nodes 2 \ | |
--network kraken-prod-vpc \ |
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
sudo tee /etc/NetworkManager/dispatcher.d/99-portal <<'EOT' | |
#!/bin/bash | |
[ "$CONNECTIVITY_STATE" = "PORTAL" ] || exit 0 | |
wget --save-cookies cookies.txt -O- https://service.wi2.ne.jp/wi2auth/redirect >> portal.log | |
grep service.wi2.ne.jp cookies.txt && wget --load-cookies cookies.txt -O- https://service.wi2.ne.jp/wi2auth/xhr/login --post-data '{"login_method":"onetap","login_params":{"agree":"1"}}' >> portal.log | |
EOT | |
sudo chmod +x /etc/NetworkManager/dispatcher.d/99-portal |