Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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