Skip to content

Instantly share code, notes, and snippets.

View toricls's full-sized avatar
🐔
Cock a doodle doo

Tori Hara toricls

🐔
Cock a doodle doo
View GitHub Profile
@toricls
toricls / kibana.sh
Last active February 26, 2016 23:05
Kibana 4 Init script for Amazon Linux
#!/bin/sh
### BEGIN INIT INFO
# Provides: kibana
# Required-Start: $local_fs $remote_fs $network
# Should-Start: $time
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Kibana 4
@toricls
toricls / .zshrc-docker-toolbox-simple-wrapper
Created September 8, 2015 06:32
Use Docker Toolbox with simple commands like boot2docker
#
# Add code below at the bottom of your zshrc/bashrc.
# You can use Docker Toolbox with simple commands like boot2docker.
# Notice: This script can handle only `default` machine.
#
# e.g.
# b2d start
# b2d ssh
# b2d stop
#
@toricls
toricls / dare.coffee
Last active October 14, 2015 04:02
誰がオフィスにいるのか知りたいあなたに贈る Slack x Hubot スクリプト
# Description:
# オフィスにいるっぽい人を知りたい、そんなあなた向けのスクリプト.
# Using the Slack API and an IP address of your office.
#
# Dependencies:
# "q": "1.4.1"
# "slack-api-client": "0.0.2"
#
# Configuration:
# HUBOT_SLACK_WEB_API_TOKEN - https://api.slack.com/web
@toricls
toricls / cwlogs.log
Created September 1, 2016 06:27
AWS Lambda Node.js 4.3 retry log by passing error object to callback
START RequestId: 94a083a4-700a-11e6-bd2f-39c6f7b14de8 Version: $LATEST
2016-09-01T06:09:02.914Z 94a083a4-700a-11e6-bd2f-39c6f7b14de8
{
"errorMessage": "fail"
}
END RequestId: 94a083a4-700a-11e6-bd2f-39c6f7b14de8
REPORT RequestId: 94a083a4-700a-11e6-bd2f-39c6f7b14de8 Duration: 0.73 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 16 MB
START RequestId: 94a083a4-700a-11e6-bd2f-39c6f7b14de8 Version: $LATEST
2016-09-01T06:09:59.216Z 94a083a4-700a-11e6-bd2f-39c6f7b14de8
{
@toricls
toricls / sam.yaml
Last active December 15, 2017 00:11
A 'Hello World' AWS SAM template (see transformed version here: https://gist.github.com/toricls/aa6866a0b2e59fd819cb69efd80bd2f2)
AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: A hello world application.
Resources:
# Lambda 関数を1つ定義して
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs6.10
@toricls
toricls / transformed.yaml
Created December 14, 2017 04:37
A transformed version of 'Hello World' AWS SAM template (see original version here: https://gist.github.com/toricls/7d078e6d25515f26b73bfa3a6f4f0ec5)
AWSTemplateFormatVersion: '2010-09-09'
Description: A hello world application.
Resources:
HelloWorldFunctionRole:
Type: 'AWS::IAM::Role'
Properties:
ManagedPolicyArns:
- 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
AssumeRolePolicyDocument:
Version: 2012-10-17
@toricls
toricls / auth.js
Created February 21, 2018 18:38
Very basic AWS Amplify auth in Vue (signup, signin, signout)
import Amplify, { Auth } from 'aws-amplify';
const types = {
AUTHENTICATE: 'AUTHENTICATE',
SIGNOUT: 'SIGNOUT',
SET_ATTRIBUTES: 'SET_ATTRIBUTES',
};
Amplify.configure({
Auth: {
@toricls
toricls / amazon-history.js
Created April 12, 2018 07:13 — forked from yociya/amazon-history.js
Amazonの注文履歴を年毎に集計して出力します 利用額 / 注文件数 / 最高額(1注文での) 使い方はコメントを参照
var historyUrl = 'https://www.amazon.co.jp/gp/css/order-history?orderFilter=year-$year$&startIndex=$index$';
function beforeSendHook(xhr){
xhr.setRequestHeader('X-Requested-With'
, {
toString: function(){
return '';
}
}
);

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

package main
import (
"time"
"gobot.io/x/gobot"
"gobot.io/x/gobot/platforms/dji/tello"
)
func main() {