https://qiita.com/yabeenico/items/15532c703974dc40a7f5 を超参考にさせてもらっています
まずはホストキーがないので生成
$ sudo ssh-keygen -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key
| # -*- coding: utf-8 -*- | |
| import json | |
| import requests | |
| import pyaudio | |
| host = '127.0.0.1' | |
| port = 50021 | |
| def vvox(text): |
| #!/bin/bash | |
| BASE=/sys/devices/platform/soc/soc:internal-regs/d0011000.i2c/i2c-0/0-003e/hwmon/hwmon0 | |
| target=${BASE}/fan1_target | |
| input=${BASE}/fan1_input | |
| if [ ! -z "$*" ]; then | |
| if [[ $1 =~ ^[0-9]+$ ]]; then | |
| echo $1 > ${target} | |
| fi |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # | |
| # つよさ予報からアストルティア防衛軍の全兵団襲撃を抽出 | |
| import requests | |
| from bs4 import BeautifulSoup | |
| base_url = 'https://hiroba.dqx.jp/sc/tokoyami/' | |
| r = requests.get(base_url, timeout=10) |
| #!/bin/bash | |
| # -*- coding: utf-8 -*- | |
| echo 'rm -f ./*.deb' | |
| curl -s https://developer.nvidia.com/cuda-downloads | pup | \ | |
| sed -e 's/.*jQuery.extend(Drupal.settings,\(.*\));/\1/p;d' | \ | |
| jq -r '.cuda_download_pages.releases["Linux/x86_64/WSL-Ubuntu/2.0/deb_local"].details' | \ | |
| pup '.cudaBashBlock text{}' |
| -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio/best[ext=mp4]/best' | |
| -o ~/Downloads/%(title)s.%(ext)s |
| --- a/ircbot.js | |
| +++ b/ircbot.js | |
| @@ -145,7 +145,7 @@ async function amedasget(posname) | |
| const day = ('0'+cur.getDate()).slice(-2); | |
| const hour = ('0'+cur.getHours()).slice(-2); | |
| const targetTime = `${year}${month}${day}_${hour}`; | |
| - // const targetIndex = `${year}${month}${day}${hour}0000`; | |
| + const targetBase = `${year}${month}${day}${hour}0000`; | |
| const responses = []; | |
| for ( key in point ) { |
https://qiita.com/yabeenico/items/15532c703974dc40a7f5 を超参考にさせてもらっています
まずはホストキーがないので生成
$ sudo ssh-keygen -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| import socket | |
| import ssl | |
| import pprint | |
| try: | |
| ssl.HAS_TLSv1_3 | |
| except AttributeError: |
| #!/bin/bash | |
| # -*- coding: utf-8 -*- | |
| OPENSSL_CMD=$(which openssl) | |
| if [[ $OSTYPE =~ ^darwin ]]; then | |
| OPENSSL_CMD=$(ls -1 /usr/local/Cellar/openssl*/*/bin/openssl | tail -1) | |
| if [ "x${OPENSSL_CMD}" = "x" ]; then | |
| echo "need to: brew install openssl" | |
| exit 1 | |
| fi | |
| fi |