Skip to content

Instantly share code, notes, and snippets.

@hakobera
hakobera / Gemfile
Last active December 14, 2016 09:52
Ruby と tumugi によるデータパイプライン構築
source "https://rubygems.org"
gem "tumugi", "~> 0.6.3"
@hakobera
hakobera / deis_run.py
Last active December 14, 2016 09:52
Helper script to run rails console on deis
#!/usr/bin/env python
import subprocess
import docker
import dockerpty
from os import path
import argparse
def get_hosts_list(filename):
hosts_list = []
@hakobera
hakobera / .gitignore
Created March 20, 2015 09:45
2015/3/21 時雨祭デモアプリ
node_modules
*.log
@hakobera
hakobera / hipchat.js
Last active August 29, 2015 14:13
HipChatClient for Google Apps Script
/**
* HipChat client for Google Apps Script.
* This code is based on node-hipchat https://github.com/nkohari/node-hipchat/blob/master/lib/hipchat.js
*/
(function(global) {
var HipChatClient = (function () {
HipChatClient.prototype.host = 'api.hipchat.com';
function HipChatClient(apikey) {
@hakobera
hakobera / gke_functions
Last active August 29, 2015 14:13
Shell function for Google Container Engine
#######################################################
# Google Container Engine helper functions
#
# Prerequisities
# - gcloud
# - jq
#######################################################
function create_network() {
network=$1
@hakobera
hakobera / Vagrantfile
Last active August 29, 2015 14:09
vagrant plane ubuntu 14.04 or 12.04
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
@hakobera
hakobera / ansible-td-agent.yml
Last active August 29, 2015 14:08
ansible playbook of td-agent2 for Ubuntu 14.04
---
# based on http://toolbelt.treasuredata.com/sh/install-ubuntu-trusty-td-agent2.sh
- name: add apt key
apt_key: url=http://packages.treasuredata.com/GPG-KEY-td-agent state=present
- name: add apt repository
apt_repository: repo='deb [arch=amd64] http://packages.treasuredata.com/2/ubuntu/trusty/ trusty contrib' state=present
- name: install td-agent
@hakobera
hakobera / bqgas-sample.gs.js
Created September 16, 2014 10:20
BQ GAS sample
/*
* dependencies:
* Momement: 'MHMchiX6c1bwSqGM1PZiW_PxhMjh3Sh48'
*/
/**
* @see https://developers.google.com/apps-script/reference/mail/mail-app
*/
function sendMail(recipients, subject, doc) {
var attachment = doc.getAs('application/pdf');