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
[root test]# ansible-playbook -C test.yml | |
[WARNING]: provided hosts list is empty, only localhost is available. Note that | |
the implicit localhost does not match 'all' | |
PLAY [test playbook] *********************************************************** | |
TASK [Gathering Facts] ********************************************************* | |
ok: [localhost] | |
TASK [Install packages] ******************************************************** |
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/sh | |
#何かあったときにスクリプトが止まるように | |
set -eu | |
#環境変数 | |
days=100 | |
search_dir="/home/user/log/" | |
backup_dir="/home/user/backup/`date +"%Y%m%d"`" |
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
exports.handler = (context, event, callback) => { | |
// メモ:事前にFunctions->設定->npmでdialogflowを導入しておく必要がある | |
// メモ:gcpよりService account keyのjsonを手に入れAssetsで「プライベート」でアップロードしておく | |
console.log('Event: ' + JSON.stringify(event)); | |
//事前にkintone-nodejs-sdkをnpmでインストールする | |
const kintone = require('kintone-nodejs-sdk'); | |
//kintoneAPIトークンによる認証・各種設定 | |
let appID = kintoneのアプリのIDをいれてね!; |
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
exports.handler = (context, event, callback) => { | |
// メモ:事前にFunctions->設定->npmでdialogflowを導入しておく必要がある | |
// メモ:gcpよりService account keyのjsonを手に入れAssetsで「プライベート」でアップロードしておく | |
console.log('Event: ' + JSON.stringify(event)); | |
// DialogFlow エージェント・認証の指定 | |
const projectId = 'すきなエージェントの名前をいれてね!'; | |
let keypath = Runtime.getAssets()['すきなエージェントと関連付けられたkeyファイルを指定してね!'].path; | |
process.env.GOOGLE_APPLICATION_CREDENTIALS = keypath; | |
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 cv2 | |
import sys | |
import os | |
import subprocess | |
def detect_motion(cap): | |
avg = None | |
while(cap.isOpened()): | |
ret, frame = cap.read() | |
frame = cv2.flip(frame, -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
#!/usr/bin/env python3 | |
# Copyright 2017 Google LLC | |
# | |
# Licensed 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 | |
# |
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 cv2 | |
import sys | |
import os | |
cascade_path = os.path.join(os.path.dirname(__file__),'haarcascade_frontalface_default.xml') | |
face_cascade = cv2.CascadeClassifier(cascade_path) | |
def detect_face(cap): | |
while(cap.isOpened()): | |
ret, frame = cap.read() |
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 cv2 | |
import sys | |
import os | |
import subprocess | |
cascade_path = os.path.join(os.path.dirname(__file__),'haarcascade_frontalface_default.xml') | |
face_cascade = cv2.CascadeClassifier(cascade_path) | |
def detect_face(cap): | |
while(cap.isOpened()): |
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
;キーマップ変更 | |
#UseHook | |
;無変換をいろいろカスタマイズ | |
vk1D::Send,{vk1D} | |
vk1D & a:: Send, ^a | |
vk1D & b:: Send, ^b | |
vk1D & c:: Send, ^c | |
vk1D & d:: Send, ^d | |
vk1D & e:: Send, ^e |
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/sh | |
set -eu | |
#Incoming WebHooksのURL | |
WEBHOOKURL="https://hooks.slack.com/services/XXXXXXXXXX" | |
#メッセージを保存する一時ファイル | |
MESSAGEFILE=$(mktemp -t webhooks.XXXXX) | |
trap " | |
rm ${MESSAGEFILE} |
NewerOlder