- https://github.com/yuk7/CentWSL
- get release CentOS7.zip
- mkdir somewhere(ex. %USERPROFILE%\AppData\Local\WSL\CentOS7), unpack (CentOS7.exe, rootfs.tar.gz) and run CentOS7.exe (install)
- run CentOS7.exe (launch root)
- adduser user
- gpasswd -a user wheel
- visudo -> NOPASSWD
- exit
- CentOS7.exe config --default-user user
- CentOS7.exe config --default-uid 1000
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
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| import socket | |
| import ssl | |
| import pprint | |
| try: | |
| ssl.HAS_TLSv1_3 | |
| except AttributeError: |
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
| #!/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 |
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
| #!/bin/bash | |
| # -*- coding: utf-8 -*- | |
| # $HOME/.dqxpresence format | |
| # { | |
| # "slack_token": "xoxp-xxxx", | |
| # "id": 667538238772, | |
| # "icon_emoji": ":dot_slime:" | |
| # } | |
| # id は https://hiroba.dqx.jp/sc/character/${user_id} です。マイページ全体の公開設定が『制限なしで公開』になっている必要があります。 | |
| slack_token=$(cat $HOME/.dqxpresence | jq -r .slack_token) |
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
| #!/bin/bash | |
| # -*- coding: utf-8 -*- | |
| # 東京アメッシュの画像を取得して合成 | |
| now=$(date +%s) | |
| BASE_URL=https://tokyo-ame.jwa.or.jp | |
| MAP=/map/map000.jpg | |
| MSK=/map/msk000.png | |
| # https://tokyo-ame.jwa.or.jp/mesh/000/201906071525.gif | |
| rfm=$(date --date=@$((now / (5 * 60) * 5 * 60 - 5 * 60)) +%Y%m%d%H%M) |
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
| for f in $(curl -s https://www.asahi.com/articles/ASL4J669JL4JUEHF016.html | sed -e 's,^<td class="link"><a href="\(.*.pdf\)".*$,\1,p;d'); do wget $f; done |
https://api.slack.com/custom-integrations/legacy-tokens チームのトークンを発行(これは自分用になります)
/usr/bin/curl -s -X POST -d 'token=YourToken' -d "profile={\"display_name\":\"ほげほげ\"}" https://slack.com/api/users.profile.set
とか
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
| #!/usr/bin/perl -l | |
| # -*- coding: utf-8 -*- | |
| use strict; | |
| use warnings; | |
| my $word = $ARGV[0]; | |
| exit unless $word; | |
| use NKF; | |
| use LWP::UserAgent; |