Skip to content

Instantly share code, notes, and snippets.

module Fluent
class TailMultiexInput < Input
Plugin.register_input('tail_multiex', self)
def initialize
super
@paths = []
@tails = {}
end
$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile <not set> None None
access_key ****************HX6A shared-credentials-file
secret_key ****************25tX shared-credentials-file
region ap-northeast-1 config-file ~/.aws/config
$ AWS_DEFAULT_REGION=us-west-2 aws configure list
Name Value Type Location
@kikumoto
kikumoto / perl_entrance_score_1.pl
Created September 23, 2014 08:05
perl_entrance_score_1
my @persons = ($papix, $boolfool, $moznion, $binarian, $uzulla);
for my $person (@persons) {
my $sum = 0;
my @keys = keys %$person;
for my $key (@keys) {
if ($key eq "name" || $key eq "affiliation") {
next;
}
$sum += $person->{$key}
upstream myapp {
server unix:///home/rails/myapp/tmp/sockets/puma.socket;
}
server {
listen 80 default_server;
server_name myapp; # change to match your URL
server_tokens off;
root /home/rails/myapp/public; # I assume your app is located at this location
#!/bin/bash
#
# MyApp
# chkconfig: 2345 82 55
# processname: puma
# description: Runs puma for nginx integration.
# Include RedHat function library
. /etc/rc.d/init.d/functions
#!/usr/bin/env puma
# Start Puma with next command:
# RAILS_ENV=production bundle exec puma -C ./config/puma.rb
# uncomment and customize to run in non-root path
# note that config/gitlab.yml web path should also be changed
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
application_path = '/home/rails/myapp'
@kikumoto
kikumoto / retrieve_customer.rb
Last active December 18, 2015 07:49
WebPay sample. retrieve customer information.
# -*- coding: utf-8 -*-
require "stripe"
require "date"
Stripe.api_key = "test_secret_XXXXXXXXXXXXXXXXXXX"
Stripe.api_base = "https://api.webpay.jp"
customer = Stripe::Customer.retrieve("cus_c4F1nGgK7eEwegF")
@kikumoto
kikumoto / mod_log_config.c
Created November 9, 2012 07:21
backport from httpd-2.4.3
/* 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
*
* Unless required by applicable law or agreed to in writing, software