Skip to content

Instantly share code, notes, and snippets.

View bigwheel's full-sized avatar

k.bigwheel (kazufumi nishida) bigwheel

View GitHub Profile
@bigwheel
bigwheel / scalaほしいものリスト.md
Created October 29, 2014 11:00
scalaほしいものリスト
  • specs2よりベターなテストフレームワーク
    • より具体的に言うとrspecのようにnestしても同じように書ける一貫性が欲しい(テストの構造化をより自由に行うため)
  • rubyのwebmockのようなhttp mock server
  • テストフレームワークとシームレスに結合できるタイプのものがほしい。WireMockはrequestのmatchingの自由度が低すぎる
@bigwheel
bigwheel / greasemonkey.js
Last active December 1, 2023 08:12
ajaxページ用tampermonkeyテンプレート
// ==UserScript==
// @name 適当な名前
// @namespace https://github.com/bigwheel とか
// @version 1.0
// @description this is description
// @author 著者
// @match https://github.com/* 適応したいURLをワイルドカードで
// @grant GM_xmlhttpRequest SCPやらajaxのクロスドメイン問題を避けるためにこれを使おう
// ==/UserScript==

概要

校内カースト最底辺のギークが協力者を得て知恵を絞り、ジョックを倒してクインビーを獲得するサクセスストーリー。 ペットの青いたぬきがマスコットとして人気を博した。

著者

藤子F不二雄

登場人物

package utils.specs2
import org.specs2.main.SmartDiffs
import play.api.libs.json._
import scala.util.Success
import scala.util.Try
object JsonProcessableDiffs extends SmartDiffs {
private[this] def toJsObectOption(map: Map[String, JsValue]) = if (map.isEmpty)
import com.sksamuel.elastic4s.ElasticClient
import com.sksamuel.elastic4s.ElasticDsl._
import com.sksamuel.elastic4s.ElasticsearchClientUri
import org.elasticsearch.common.settings.ImmutableSettings
import org.elasticsearch.node.NodeBuilder._
import scala.collection.JavaConverters._
object Main {
private def transportClient = {
val settings = ImmutableSettings.settingsBuilder.
// ==UserScript==
// @name Github milestone enhanced issue list
// @namespace https://github.com/bigwheel
// @version 1.0
// @description this is description
// @author bigwheel
// @match http://github.o-in.dwango.co.jp/*
// @grant GM_xmlhttpRequest
// @require http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js
// ==/UserScript==
[error] RemoteTransportException: : [node03][inet[/192.168.1.3:9300]][indices:data/read/search] (TransportSearchTypeAction.java:233)
[error] org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:233)
[error] org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$1.onFailure(TransportSearchTypeAction.java:179)
[error] org.elasticsearch.search.action.SearchServiceTransportAction$6.handleException(SearchServiceTransportAction.java:249)
[error] org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:185)
[error] org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:175)
[error] org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:125)
[error] org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
[error] org.el
@bigwheel
bigwheel / configure_password_on_all_servers.sh
Created April 27, 2016 07:20
暫定的にパスワードを振られたアカウントを多数受領したときに、一括で自分のパスワードへ変える方法(ttyが有効になっていてsudo権限がありsshpassがインストールされている前提)
#!/usr/bin/env bash
set -ex
ip_list=()
ip_list+=("192.168.1.1")
ip_list+=("192.168.1.2")
ip_list+=("192.168.1.3")
ip_list+=("192.168.1.4")
% AWS_DEFAULT_PROFILE=dev-shared-provisioning-script-deployer ./create_ami.sh
amazon-ebs output will be in this color.
==> amazon-ebs: Force Deregister flag found, skipping prevalidating AMI Name
==> amazon-ebs: No AMI was found matching filters: {
==> amazon-ebs: Filters: [
==> amazon-ebs: {
==> amazon-ebs: Name: "root-device-type",
==> amazon-ebs: Values: ["ebs"]
==> amazon-ebs: },
{
"builders": [
{
"type": "amazon-ebs",
"ssh_pty": "true",
"region": "ap-northeast-1",
"source_ami_filter": {
"filters": {
"architecture": "x86_64",
"name": "amzn-ami-hvm-*.0.20*-ebs,amzn-ami-hvm-*.1.20*-ebs,amzn-ami-hvm-*.2.20*-ebs,amzn-ami-hvm-*.3.20*-ebs,amzn-ami-hvm-*.4.20*-ebs,amzn-ami-hvm-*.5.20*-ebs,amzn-ami-hvm-*.6.20*-ebs,amzn-ami-hvm-*.7.20*-ebs,amzn-ami-hvm-*.8.20*-ebs,amzn-ami-hvm-*.9.20*-ebs",