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 | |
DATE=`date` | |
CLIENT_IP=`echo ${SSH_CLIENT} | cut -d " " -f 1` | |
HOST_IP=`curl inet-ip.info 2>/dev/null` | |
HOST_NAME=`hostname` | |
msg="${HOST_NAME}(${HOST_IP}) [${DATE}] ${USER}が${CLIENT_IP}から接続しました!!" | |
## output log | |
# echo $msg >> /tmp/login.log |
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
server { | |
listen 80; | |
# 8080.my.example.com.nginxhost.xip.io; | |
server_name "~^(?:(?<proxy_port>\d+)\.)?(?<proxy_host>(.+))\.nginxhost\.xip\.io$"; | |
access_log /var/log/nginx/dev.access.log; | |
client_max_body_size 100M; | |
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
import time | |
import numba | |
def matmul1(a, b): | |
lenI = a.shape[0] | |
lenJ = a.shape[1] | |
lenK = b.shape[1] | |
c = np.zeros((lenI, lenJ)) | |
for i in range(lenI): | |
for j in range(lenJ): |
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 -*- | |
import urllib | |
import urllib2 | |
import unirest | |
API_URL="https://dateinfoapi.appspot.com/v1" | |
hubot_url = "" | |
rid = "" | |
if __name__ == "__main__": |
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
FROM alpine:3.2 | |
MAINTAINER yuki-maeno | |
RUN apk --update add ruby ruby-bundler \ | |
&& rm -fr /var/cache/apk/* \ | |
&& gem install xml-simple --no-ri --no-rdoc | |
ADD server.rb /tmp/server.rb | |
EXPOSE 8000 |
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
FROM ubuntu:14.04 | |
MAINTAINER yuki-maeno | |
RUN echo "Asia/Tokyo" > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata \ | |
&& apt-get update \ | |
&& apt-get install -y git wget libc6-dev libssl-dev autoconf automake libtool g++ lua5.1 liblua5.1-0-dev ncurses-dev \ | |
&& cd /tmp \ | |
&& wget http://www.aerospike.com/download/client/c/3.1.25/artifact/ubuntu12 \ | |
&& tar zxvf ubuntu12 \ | |
&& cd aerospike-client-c-3.1.25.ubuntu12.04.x86_64 \ |
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
FROM cataska/hubot-slack | |
MAINTAINER Yuki Maeno | |
ADD send.coffee /home/yeoman/hubot/scripts/send.coffee | |
ENV SLACK_TOKEN XXXXX | |
WORKDIR /home/yeoman/hubot | |
CMD HUBOT_SLACK_TOKEN=${SLACK_TOKEN} bin/hubot --adapter slack >> /tmp/hubot.log 2>&1 |
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
console.log('Loading event'); | |
var aws = require('aws-sdk'); | |
exports.handler = function(event, context) { | |
var cluster = 'maeno-test' | |
var ecsService = 'test-service'; | |
var ecsRegion = 'ap-northeast-1'; | |
var maxCount = 3; | |
var ecs = new aws.ECS({region: ecsRegion}); |
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
{ | |
"template": "es-*", | |
"mappings": { | |
"fluentd":{ | |
"properties":{ | |
"geo_location":{ | |
"type": "geo_point" | |
}, | |
"all_path":{ | |
"type": "string", |
OlderNewer