Skip to content

Instantly share code, notes, and snippets.

@shunkino
shunkino / makeDirectories.sh
Created November 1, 2018 05:17
For my hands-on about moloch
mkdir ${HOME}/es_storage
cd ${HOME}/es_storage
mkdir esdata1
mkdir esdata2
mkdir esdata3
mkdir esdata4
@shunkino
shunkino / elasticsearch_docker-compose.yml
Last active November 6, 2018 01:55
Elasticsearch cluster docker-compose for my work. Use ES 5.6.9
version: '2.2'
services:
kibana:
image: docker.elastic.co/kibana/kibana:5.6.9
container_name: kibana
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- 5601:5601
networks:
@shunkino
shunkino / elasticsearch.yaml
Last active November 2, 2018 06:02
Configuration of elasticsearch for my blog.
network.host: 0.0.0.0
http.cors.allow-credentials: true
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Access-Control-Allow-Headers,X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
@shunkino
shunkino / src_pubsub.js
Last active September 7, 2018 04:37
pubsub change
'use strict'
const promisify = require('promisify-es6')
const EventEmitter = require('events')
const eos = require('end-of-stream')
const isNode = require('detect-node')
const setImmediate = require('async/setImmediate')
const PubsubMessageStream = require('./utils/pubsub-message-stream')
const stringlistToArray = require('./utils/stringlist-to-array')
const moduleConfig = require('./utils/module-config')
@shunkino
shunkino / index.js
Last active September 7, 2018 03:46
extracted from the interface-ipfs-core
'use strict'
// var IPFS = require('ipfs-api')
var IPFS = require('../../src/')
var ipfs = IPFS()
function store () {
var toStore = document.getElementById('source').value
ipfs.files.add(Buffer.from(toStore), function (err, res) {
@shunkino
shunkino / perl_module.md
Last active November 2, 2019 01:57
Perl_Istack_sp_ptrが見つからないって言われる問題

Perlのモジュールが使えないって言われる問題

概要

Centos 7.3でdrbd-utilsのautogen.shを実行すると,Perl_Istack_sp_ptrが見つからないって言われる.

エラーメッセージ

/usr/bin/perl: symbol lookup error: /usr/local/lib64/perl5/auto/List/Util/Util.so: undefined symbol: Perl_Istack_sp_ptr

解決方法

@shunkino
shunkino / user_main.c
Created January 26, 2016 09:08
ADXL345 and ESP8266
#include "esp_common.h"
#include "i2c.h"
#include "freertos/FreeRTOS.h"
#include "lwip/sockets.h"
#include "lwip/dns.h"
#include "lwip/netdb.h"
#define SSID ""
#define PASS ""
#define TCP_PORT 3080
@shunkino
shunkino / adxl345.js
Last active March 6, 2017 03:09
ADXL345 driver for chirimen.
function changeToSignedInt(number) {
if (number >> 15) {
ret = 65536 - number;
return ret * -1;
} else {
return number;
}
}
var adxl345 = {

ESP8266チップで自作のプログラムを実行する

この記事は慶應義塾大学SFC村井&徳田研 Advent Calendar 2015の17日目です。

-- (多分)アドベントカレンダー内唯一のマイコンの話です。ESP8266というチップをご存知ですか?Wi-FiアンテナとTCP/IPプロトコルスタックが搭載されたモジュール(厳密には搭載されているSoCを指します)です。国内外で今年流行ってますね。流行ってるんです。今回はこれを利用して自作のプログラムを実行する方法を書こうと思います。目標はHello, worldです。無線関係ない・・・

今回はRTOS_SDKというSDKを利用してプログラムをコンパイルします。

背景

@shunkino
shunkino / .vimrc
Created November 5, 2015 07:17
my vimrc
"*****************************************************************************
"" NeoBundle core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif