Skip to content

Instantly share code, notes, and snippets.

@sear-azazel
sear-azazel / post-commit.sh
Last active September 1, 2017 08:53
SubversionのコミットをMattermostへ通知する
#!/bin/sh
REPOS="$1"
REV="$2"
TXN_NAME="$3"
# ------------------------------
# Mattermost Setting
# ------------------------------
# チェンネル
@sear-azazel
sear-azazel / docker-compose.yml
Last active September 1, 2017 01:04
日本語版GitLabサーバをdocker-compose一発で立ち上げる ref: http://qiita.com/sear-azazel/items/c9407d34c8cc5f61de9b
gitlab-mysql:
restart: always
image: sameersbn/mysql:latest
container_name: gitlab-mysql
environment:
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
volumes:
# データ永続化のため、/srv/docker/gitlab/mysqlはよしなに
@sear-azazel
sear-azazel / node-red-flow.json
Last active March 31, 2017 01:24
Google Maps APIを用いて住所を取得するNode-REDのフローをエクスポート
[
{
"id": "6dbbe3cf.ae249c",
"type": "inject",
"z": "3da1702f.6ba46",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
@sear-azazel
sear-azazel / sensor.html
Last active January 18, 2017 04:32
Bluemix Node-REDでスマホを振ったらTweetするシステムを作る ref: http://qiita.com/sear-azazel/items/fef45567f87c300ac84c
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>加速度センサー</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
@sear-azazel
sear-azazel / WatsonManager.cs
Last active January 17, 2017 13:26
UnityでWatson API(Speech to TextとText to Speech)を用いるためのスクリプト ref: http://qiita.com/sear-azazel/items/3a0fcc31cb4eb3d06b71
using UnityEngine;
using System.Collections;
using IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1;
using IBM.Watson.DeveloperCloud.Services.SpeechToText.v1;
/// <summary>
/// Watson Manager.
/// </summary>
[RequireComponent(typeof(AudioSource))]
public class WatsonManager : MonoBehaviour
@sear-azazel
sear-azazel / GoogleTranslate.cs
Last active January 17, 2017 13:26
UnityでGoogle Translate APIを用いるためのスクリプト ref: http://qiita.com/sear-azazel/items/3a0fcc31cb4eb3d06b71
using SimpleJSON;
using UnityEngine;
using System.Collections;
/// <summary>
/// Google Translate.
/// </summary>
public class GoogleTranslate : MonoBehaviour
{
/// <summary>
@sear-azazel
sear-azazel / GameManager.cs
Last active January 17, 2017 13:25
UnityでBluemix Watson API(Speech to TextとText to Speech)とGoogle Translate APIを用いるためのスクリプト ref: http://qiita.com/sear-azazel/items/3a0fcc31cb4eb3d06b71
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1;
using System;
public delegate void CallBack(string text);
/// <summary>
/// Introduction.
@sear-azazel
sear-azazel / options.json
Last active January 10, 2017 16:23
Bluemix PHPにPDOやMySQLi、FTP、ZipArchiveなどの設定を拡張する ref: http://qiita.com/sear-azazel/items/199e766448b7b4719ed3
{
"PHP_EXTENSIONS": [ "bz2", "zlib", "curl", "mcrypt", "mbstring", "mysql", "pdo", "pdo_mysql", "fileinfo", "ftp", "zip" ]
}
var localMediaStream = null;
var localScriptProcessor = null;
audioData = []; // 録音データ
var onAudioProcess = function(e) {
var input = e.inputBuffer.getChannelData(0);
var bufferData = new Float32Array(bufferSize);
for (var i = 0; i < bufferSize; i++) {
bufferData[i] = input[i];
}