Skip to content

Instantly share code, notes, and snippets.

@ryo-murai
ryo-murai / jenkins_ad_rolebased.md
Last active April 1, 2020 06:19
Jenkins Active Directory連携とロールベース認可

JenkinsでActive Directory連携とロールベース認可をする覚書

plugins

Active Directory

  • Jenkinsの管理 > グローバルセキュリティ・・ > ユーザ情報: Active Directoryを選択
  • Specify custom Active Directory domain name: check
  • Domain Name: ドメイン名を入力(例: example.com)
@ryo-murai
ryo-murai / jenkins_ad_rolebased.md
Created April 1, 2020 06:06
Jenkins Active Directory連携とロールベース認可

JenkinsでActive Directory連携とロールベース認可をする覚書

plugins

Active Directory

  • Jenkinsの管理 > グローバルセキュリティ・・ > ユーザ情報: Active Directoryを選択
  • Specify custom Active Directory domain name: check
  • Domain Name: ドメイン名を入力(例: example.com)
@ryo-murai
ryo-murai / export_gitbuket_issues.sh
Created January 24, 2019 09:47
GitBucketのissueを静的閲覧用HTMLにする
#!/bin/sh
repo_url=$1
last_issue_num=$2
issues_url="${repo_url}/issues"
gb_host=`echo "$repo_url" | sed 's/^\(http:\/\/[^\/]\+\)\/.*$/\1/'`
gb_host_esc=$(echo "${gb_host}" | sed 's/\//\\\//g')
function print_args () {

Karabiner-Elements config

  • keyboard: Filco Majestouch ten-keyless (JIS layout)
  • MacOS: Mojave 10.14.2

Karabiner-Elements

Simple Modifications

From key To Key
@ryo-murai
ryo-murai / tashizan.py
Created December 24, 2018 00:12
足し算
def question(a, b, nWrong = 0):
s = input("%d + %d = " % (a, b))
if int(s) == a + b:
print("正解")
return True
else:
print("ちがいます")
if nWrong < 2:
print("もう一度")
@ryo-murai
ryo-murai / shell_tricks.md
Last active December 25, 2018 06:31
シェル芸メモ

忘れないように。というか、忘れてもいいように

  • extract Nth line
# extract 5th line from <file>
sed '5!d' $file
  • count num of specific words per lines
@ryo-murai
ryo-murai / deploy-gradle-project-on-heroku.md
Created February 10, 2017 09:53
herokuにgradleのプロジェクトをデプロイするときに気をつけること
  • gradle wrapperを実行して、生成されたファイルもgit管理する
    • Spring Initializrで作った雛型には既に含まれているので実行不要
  • heroku側で ./gradlew stageでビルドされるので、stageタスクを定義する
  • SpringBootだと認識された場合は ./gradlew build -x testが実行されるので追加不要
@ryo-murai
ryo-murai / deploy-heroku-without-toolbelt.md
Created February 10, 2017 09:49
heroku toolbeltなしでデプロイまでできる
  • dashboardの New -> Create new appから名前などを入力して新しくアプリを作成
  • Settingsタブの Heroku Git URLにあるURLがリモートリポジトリ
    • 例: https://git.heroku.com/app-name-xxxxx.git
  • このリポジトリのmasterブランチにpushすればデプロイ開始
git remote add heroku https://git.heroku.com/app-name-xxxxx.git
git push heroku master
@ryo-murai
ryo-murai / googledevapi.md
Last active April 1, 2016 08:42
Google Developer API
@ryo-murai
ryo-murai / herokuapi.md
Last active September 12, 2015 01:19
Heroku API

Heroku REST API Examples


See Heroku Platform API for details.

  • Config Vars
  • Get
curl -n -X GET https://api.heroku.com/apps/${APP_NAME}/config-vars \