Skip to content

Instantly share code, notes, and snippets.

Avatar

Takumi Sakamoto takus

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am takus on github.
  • I am takus (https://keybase.io/takus) on keybase.
  • I have a public key ASDcc39Zy8aSz1G8JQhpgJVMgKfe2Ee0ZCR2nuVgOX70Ago

To claim this, I am signing this object:

@takus
takus / fluent.conf
Created Jun 1, 2016
Configuration for monitoring Fluentd by Datadog
View fluent.conf
<match smartnews.user_activity>
type copy
<store>
type flowcounter
count_keys *
unit second
aggregate all
tag fluentd.flowcounter.smartnews.user_activity
@label @dogstatsd
</store>
@takus
takus / ic.coffee
Created Jul 5, 2016
Manage incidents with Incident Commandar System.
View ic.coffee
# Description:
# Manage incidents with Incident Commandar System.
# Commands:
# bot 110 ic me - Start an incident management and assign 'me' as the Incident Commandar
moment = require('moment')
module.exports = (robot) ->
robot.respond /110 ic me/i, (res) ->
View Dockerfile
FROM perl:latest
RUN cpanm install Starlet
ADD oversleep.psgi /oversleep.psgi
EXPOSE 5000
CMD ["plackup", "-p", "5000", "-s", "Starlet", "--max-workers=8", "/oversleep.psgi"]
View td-agent.conf
<source>
type forward
port 24224
</source>
<source>
type monitor_agent
port 24220
</source>
@takus
takus / Vagrantfile
Created Jul 26, 2013
Vagrantfile for chef cookbook test
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "opscode-centos-6.4"
config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box"
config.vm.network :private_network, ip: "192.168.33.10"
config.vm.provider :virtualbox do |vb|
@takus
takus / sigalrm.pl
Created Mar 26, 2013
Time::HiRes::alarm(0); しないと意図しない箇所で die する例
View sigalrm.pl
#!/usr/bin/env perl
use strict;
use warnings;
use POSIX qw(SIGALRM);
use Time::HiRes;
print "begin\n";
eval {
View install-homebrew.sh
#!/bin/sh
#### UNINSTALL MacPorts
# save installed package by MacPorts before uninstall
sudo port installed > ~/myports.log
# Uninstall MacPorts
# You should also remove /opt/local/bin & /opt/local/sbin in your PATH
sudo port -f uninstall installed
@takus
takus / mq_install.sh
Created Dec 3, 2012 — forked from iwata/mqh_install.sh
Installing MySQL5.1 & Q4M on MacOSX Lion
View mq_install.sh
#!/bin/zsh
MYSQL_VERSION=5.1.65
if [ `which perl` = "/usr/bin/perl" ]; then
echo -n -e "\e[1;31mUSING SYSTEM PERL OK? [y/n]\e[m: "
read ANSWER
if [ "$ANSWER" != "y" ]; then
exit 255
fi
@takus
takus / redmine2dailyreport.pl
Created Nov 30, 2012
generates daily report from redmine issues
View redmine2dailyreport.pl
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
binmode STDOUT, ":utf8";
use Config::Pit;
use Redmine::API;
use Encode;
You can’t perform that action at this time.