Skip to content

Instantly share code, notes, and snippets.

@ikikko
ikikko / tmux-ssh.sh
Created May 6, 2012 09:15
tmuxで、引数で与えられたホストごとにウィンドウを作成してssh接続するシェルスクリプト
#!/bin/bash
SESSION_NAME=tmux-ssh
INITIAL_WINDOW_NAME=tmux-ssh-window
### セッションの作成
tmux start-server
tmux new-session -d -n $INITIAL_WINDOW_NAME -s $SESSION_NAME
### 引数で与えられたホストにssh接続
@ikikko
ikikko / html.yml
Last active June 1, 2020 15:29
継続的原稿デリバリー
name: Make HTML CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
ikikko
@ikikko
ikikko / docker-compose.yml
Last active December 29, 2016 13:58
docker-hackmd customize
hackmdPostgres:
image: postgres
environment:
- POSTGRES_USER=hackmd
- POSTGRES_PASSWORD=hackmdpass
- POSTGRES_DB=hackmd
hackmd:
image: hackmdio/hackmd:0.4.6
environment:
- POSTGRES_USER=hackmd
@ikikko
ikikko / Gruntfile.js
Created October 14, 2013 07:47
Markdown + LiveReload on Grunt
module.exports = function(grunt) {
grunt.initConfig({
markdown: {
all: {
files: [
{
expand: true,
src: ['**/*.md', '!node_modules/**/*.md'],
ext: '.html'
}
@ikikko
ikikko / gist:2762287
Created May 21, 2012 13:22
Jenkinsのジョブ失敗時にビルドを保存するスクリプト(Groovy Postbuild Plugin用)
if (manager.build.result.isWorseOrEqualTo(hudson.model.Result.UNSTABLE)) {
manager.listener.logger.println("ビルドを保存します")
manager.build.keepLog()
}
@ikikko
ikikko / gist:1578299
Created January 8, 2012 13:05
Cacooの図一括削除スクリプト
import groovy.json.*
def API_KEY = 'XXXXXXXXXXXXXXXXXXXX'
def DIAGRAMS_URL = 'https://cacoo.com/api/v1/diagrams.json'
def DELETE_DIAGRAM_URL = 'https://cacoo.com/api/v1/diagrams/'
def slurper = new JsonSlurper()
def apiKeyParameter = "apiKey=${API_KEY}"
// 削除対象の図一覧の取得
@ikikko
ikikko / basicAuthenticationScript.groovy
Created July 16, 2011 13:41
Basic authentication Script for Script Security Realm
def url = 'http://example.com/'
Authenticator.default = {
[
// user
System.env.U,
// password
System.env.P.toCharArray()
]
} as Authenticator
@ikikko
ikikko / BacklogApiClient.groovy
Created March 20, 2011 18:55
Backlog APIのGroovyクライアントサンプルです。
@Grab(group='org.codehaus.groovy', module='groovy-xmlrpc', version='0.7')
@Grab(group='jivesoftware', module='smack', version='3.1.0')
import groovy.net.xmlrpc.XMLRPCServerProxy
// 設定内容
def SPACE = 'demo'
def USER_ID = 'demo'
def PASSWORD = 'demo'
@ikikko
ikikko / ReplaceJenkinsSetting.groovy
Created March 1, 2011 10:17
Jenkins上のAntプロパティを一括置換します
def VIEW = 'XXXXXXXX'
def REPLACE = 'XXXXXXXXX'
// ジョブ群
def items = hudson.model.Hudson.instance.getView(VIEW).items
items.each {
print "${it.name} : "
// ビルド環境 > Configure release build