This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Fluent | |
class TailMultiexInput < Input | |
Plugin.register_input('tail_multiex', self) | |
def initialize | |
super | |
@paths = [] | |
@tails = {} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 |