毎回忘れるのでメモ。
$ wget https://curl.haxx.se/ca/cacert.pem -O /home/linuxbrew/.linuxbrew/etc/openssl/cert.pem
#!/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) |
#!/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) |
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
とか
#!/usr/bin/perl -l | |
# -*- coding: utf-8 -*- | |
use strict; | |
use warnings; | |
my $word = $ARGV[0]; | |
exit unless $word; | |
use NKF; | |
use LWP::UserAgent; |
#ssmjp参加者 Advent Calendar 2016 - Adventar 13日目です。
普段は「どうやったら監視できるか」「どうやったら運用が楽になる監視ができるか」ということを考えながら内製の監視システムを作成しています。
どーしても発売後すぐ予約したかったので、ふにふにとスクリプトを書いた。
#!/bin/bash
$ go get github.com/go-gomail/gomail | |
$ cd $GOPATH/github.com/go-gomail/gomail/ | |
$ git fetch origin v2:v2 | |
$ git checkout v2 | |
$ mkdir -p $GOPATH/gopkg.in | |
$ cp -a $GOPATH/github.com/go-gomail/gomail $GOPATH/gopkg.in/gomail.v2 | |
$ go get gopkg.in/gomail.v2 | |
$ go get github.com/future-architect/vuls |