Skip to content

Instantly share code, notes, and snippets.

View buzztaiki's full-sized avatar

Taiki Sugawara buzztaiki

View GitHub Profile
@buzztaiki
buzztaiki / serverspec-winrm-practice.md
Last active August 29, 2015 13:57
serverspec + WinRM 手習いのメモ
@buzztaiki
buzztaiki / fabric-on-centos.md
Last active August 29, 2015 13:57
CentOS6.5でfabricを動かす

結論: pycryptoを2.5に落とせ。

やったこと。

fab deploy とかしたらこんなことを言われた

Traceback (most recent call last):

File "/usr/bin/fab", line 9, in

@buzztaiki
buzztaiki / lsnoun
Last active August 29, 2015 13:57
ファイルにある名詞を抽出して眺めてみる
#!/bin/bash
cat - | mecab -N2 \
| grep -e '名詞' \
| grep -ve '名詞,.*\(数\|接続\)' \
| grep -ve '[a-zA-Z]' \
| awk -F'\t' '{print $1}' \
| sort | uniq -c
@buzztaiki
buzztaiki / PKGBUILD
Created April 2, 2014 20:14
solr PKGBUILD
# Maintainer: Julien Gormotte <julien@gormotte.info>
pkgname=solr
pkgver=4.5.1
pkgrel=3
pkgdesc="Popular, blazing fast open source enterprise search platform from the Apache Lucene project"
arch=(any)
license=('Apache')
url="http://lucene.apache.org/solr/"
depends=(java-environment)
@buzztaiki
buzztaiki / solrconfig.xml
Last active August 29, 2015 13:58
solrconfig.xml for trac advanced search on arch
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
print(<<EOF);
aaaaaaaa
bbbbbbbbb
cccccccccc
EOF
@buzztaiki
buzztaiki / pp.groovy
Created May 1, 2014 17:11
groovyでpretty print
_pp = { println new groovy.json.JsonBuilder(it).toPrettyString() }
[List, Map].each {it.metaClass.pp = {_pp(delegate)}}
def x = ["x":1, "y":[1,2,3]]
x.pp()
@buzztaiki
buzztaiki / tracbrowser.groovy
Last active August 29, 2015 14:00
JenkinsのScript Console用スニペット
// gitのbrowserとしてtracを指定する
Jenkins.instance.with {
jobNames.collect {getJob(it)}
.findAll{it.getProperty(TracProjectProperty)?.tracWebsite != null}
.findAll{it.scm?.type == "hudson.plugins.git.GitSCM"}
.each{
println it.name
it.scm.browser = new hudson.plugins.trac.TracGitRepositoryBrowser()
it.save()
@buzztaiki
buzztaiki / trac-plugin-rakefile.rb
Created May 14, 2014 15:55
Tracのプラグイン開発のときに使えそうなRakefile
require 'open-uri'
TRAC = File.expand_path('~/opt/trac')
TRAC_VERSION = ">=1.0"
TRAC_PORT = 5678
TRAC_LOGO = 'https://dl.dropboxusercontent.com/s/332tsy8usmpmynm/trac_logo.png'
# TRAC = File.expand_path('~/opt/trac-0.12')
# TRAC_VERSION = '==0.12'
@buzztaiki
buzztaiki / gist:1006669df4d36bdb5d58
Created May 16, 2014 17:02
javaのXXオプションのデフォルト値を全部出す
$ java -XX:+PrintFlagsFinal


[Global flags]
    uintx AdaptiveSizeDecrementScaleFactor          = 4               {product}
    uintx AdaptiveSizeMajorGCDecayTimeScale         = 10              {product}
    uintx AdaptiveSizePausePolicy                   = 0               {product}
    uintx AdaptiveSizePolicyCollectionCostMargin    = 50              {product}
    uintx AdaptiveSizePolicyInitializingSteps       = 20              {product}