Skip to content

Instantly share code, notes, and snippets.

@mechamogera
mechamogera / Readme.md
Created Oct 5, 2012
C++言語で簡単なRuby拡張ライブラリを書いてみた
View Readme.md

この拡張ライブラリの使用手順

  • このサンプルをダウンロードして解凍したディレクトリで以下を実行
 $ ruby extconf.rb
 $ make
 $ ruby test.rb

ファイルについて

@mechamogera
mechamogera / OrbitControls.js
Last active Jul 13, 2019
THETAのDualfisheye動画をthree.jsで視聴するためのサンプル
View OrbitControls.js
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
* @author erich666 / http://erichaines.com
*/
/*global THREE, console */
// This set of controls performs orbiting, dollying (zooming), and panning. It maintains
@mechamogera
mechamogera / receving-mail-server.json
Last active Dec 18, 2018
メール受信環境を構築するCloudFormationテンプレート
View receving-mail-server.json
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Mail server for receiving",
"Parameters" : {
"MailServerDomain" : {
"Type" : "String",
"Default" : "mail.example.com",
"Description" : "mail server domain"
},
@mechamogera
mechamogera / rsa_key_test.rb
Last active Sep 23, 2018
公開鍵を用いた暗号化、秘密鍵を用いた復号化テスト用rubyスクリプト
View rsa_key_test.rb
require 'openssl'
require 'base64'
# openssl genrsa -out ./id_rsa で作成
private_key = nil
File.open("id_rsa") do |f|
private_key = OpenSSL::PKey::RSA.new(f)
end
# openssl rsa -in id_rsa -pubout -out id_rsa_pub で作成
@mechamogera
mechamogera / awslogs.conf
Last active Aug 7, 2018
CloudWatch Logsサンプル設定
View awslogs.conf
#
# ------------------------------------------
# CLOUDWATCH LOGS AGENT CONFIGURATION FILE
# ------------------------------------------
#
# --- DESCRIPTION ---
# This file is used by the CloudWatch Logs Agent to specify what log data to send to the service and how.
# You can modify this file at any time to add, remove or change configuration.
#
# NOTE: A running agent must be stopped and restarted for configuration changes to take effect.
@mechamogera
mechamogera / Gemfile
Last active Mar 15, 2018
AWSの簡易S3アップロードRubyスクリプト
View Gemfile
# A sample Gemfile
source "https://rubygems.org"
gem 'aws-sdk'
gem 'mime-types'
@mechamogera
mechamogera / Gemfile
Last active May 20, 2016
Zabbix APIをRubyから利用する場合どのライブラリが良いのか調べてみる
View Gemfile
# A sample Gemfile
source "https://rubygems.org"
gem 'rubix'
gem 'zabbixapi'
gem 'zabby'
gem 'zbxapi'
@mechamogera
mechamogera / Gemfile
Last active Mar 18, 2016
Github Organizationのメンバー一覧を取得するRubyスクリプト
View Gemfile
# A sample Gemfile
source "https://rubygems.org"
gem 'github_api'
gem 'highline'
gem 'trollop'
@mechamogera
mechamogera / index.html
Last active Feb 29, 2016
Pepperのイベントをjavascriptで受け取る(localサーバーからだとできなくてS3に配置するとできた)
View index.html
<html>
<head>
<meta charset="UTF-8" />
<title>Pepper event catch test</title>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="libs/qimessaging/1.0/jquery.min.js"></script>
<script src="libs/qimessaging/1.0/qimessaging.js"></script>
<script>
var session = new QiSession("10.247.85.167");
@mechamogera
mechamogera / Readme.md
Created Feb 26, 2016
Webカメラの映像をgoogle cloud visionに送信サンプル