Skip to content

Instantly share code, notes, and snippets.

View munepom's full-sized avatar

munepom munepom

View GitHub Profile
@munepom
munepom / send_to_slack_channel.sh
Created October 11, 2018 08:38
Slack へ BOT 投稿してくれるくん
#!/bin/sh
# Post to Slack
CHANNEL="#monologue"
USERNAME="webhookbot"
ICON=":ghost:"
while getopts c:i:u: OPT
do
@munepom
munepom / copy_jenkins_job.sh
Created October 11, 2018 08:34
Jenkins Job を別 Jenkins へコピーできるくん
#!/bin/bash
ORG_ADDRESS=
ORG_PORT=
TARGET_ADDRESS=
TARGET_PORT=
ORG_USER=hogehoge
ORG_PASSWORD=secret
ORG_APIKEY=yourkey
@munepom
munepom / encode_guess.pl
Created October 11, 2018 08:28
Perl の Encode::Guess を利用して、ファイルの文字エンコーディングを確認してくれるくん
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Encode::Guess qw/cp932 euc-jp 7bit-jis utf8/; #文字コードの候補を指定して use する
my $file = shift;
my $fh;
@munepom
munepom / eternal_running_container
Created May 9, 2018 18:05
ずっとバックグラウンドでコンテナ起動していたいあなたへ (シグナルトラップで停止しやすい)
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
@munepom
munepom / copy_jenkins_job.sh
Created December 9, 2016 09:12
Jenkins のジョブをコピってくれるくん
#!/bin/bash
BASE_JOB_NAME=TestJob
NEW_JOB_NAME=TestJob
BASE_JOB_SERVER=http://base-jenkins.example.com
NEW_JOB_SERVER=http://new-jenkins.example.com
JENKINS_USER=${USER}
JENKINS_API_KEY=$(cat ~/.new_job_server_jenkins_api_key)
test!