Skip to content

Instantly share code, notes, and snippets.

View yoshida-mediba's full-sized avatar

[mediba] Hiroki Yoshida yoshida-mediba

View GitHub Profile
@yoshida-mediba
yoshida-mediba / after-update.applescript
Last active August 29, 2015 13:58
ActiveDirectoryのパスワードを日付で更新するスクリプト
(*
以下のようにAutomatorに設定する
1. シェルスクリプトを実行 (update-smbpasswd.sh)
2. AppleScriptを実行 (after-update.applescript)
3. ループ (ループして自動的に停止:30分)
*)
on run {input, parameters}
if input is not in {{}, {""}, ""} then
set AppleScript's text item delimiters to return
@yoshida-mediba
yoshida-mediba / send_rss_to_talknote.sh
Last active May 9, 2017 05:59
Talknote RSS送信スクリプト
#!/bin/bash
#
# send_rss_to_talknote.sh [Mail] [RSS]
#
# RSS Example:
# http://postd.cc/feed/
# http://b.hatena.ne.jp/hotentry/it.rss
#
function getRss() {
@yoshida-mediba
yoshida-mediba / yapc2015.sh
Last active August 29, 2015 14:23
YAPC 2015 Ticket checker
#!/bin/bash
URL=http://peatix.com/event/87412/view
XPATH='//*[@id="tix-249035"]'
if [[ -n $(curl -s "$URL" | xmllint --nowarning --html -xpath "$XPATH" - 2>/dev/null | fgrep 'SOLD OUT') ]]; then
echo "YAPC2015 SOLD OUT"
else
echo "YAPC2015 BUY NOW"
fi
@yoshida-mediba
yoshida-mediba / README.md
Last active July 31, 2017 01:50
日報入力支援スクリプト
@yoshida-mediba
yoshida-mediba / README.md
Last active January 7, 2016 08:34
コードコンテスト用 空き予定検索

コードコンテスト用 空き予定検索

コンセプト

  • 可能な限り短時間で完成させる
  • GoogleCalenderの複数の予定が読み込める
  • 分刻みのタイムテーブルを作成して予定を埋めていく事で空き時間の計算をする

依存ライブラリ

カレンダー

ES6つかってみたかったからかいてみたが、ES6感ってどうやったら出るかよくわかんない。

レギュレーション

ライブラリ使えない

結果

@yoshida-mediba
yoshida-mediba / backlog_talknote.sh
Last active September 13, 2016 06:55
BacklogからIssueをとってきてTalknoteに投げるスクリプト
#!/bin/bash
apiurl="https://example.backlog.jp/api/v2/"
project="1"
apikey="apikey"
jqbody=".[].summary, .[].assignee.name, .[].dueDate"
function sendMailTalknote() {
head="Content-Type: text/plain; charset=ISO-2022-JP";
from="From: notifier@example.com"

概要

複数のリポジトリのプルリクエストを見ていくのが大変なので、いっきにプルリクを出すやつ。   LabelでWIP付いてると無視、一度表示したのは二度出なくなる機能付き。

つかいかた

  1. インポートのやつをgo getする
  2. tokenとuserとreposを好きなのに変更
  3. go run