Skip to content

Instantly share code, notes, and snippets.

View hylom's full-sized avatar

hylom hylom

View GitHub Profile
@hylom
hylom / gist:10098987
Created April 8, 2014 07:15
Mac OS Xでのアプリ&Bluetooth LEデバイス解析メモ
概要
* アプリのバイナリをEmacsで眺める
* otoolで逆アセンブル
* nmでシンボル情報を見る
* otoolでシンボルに対応するデータを見る
* /var/log/system.logでbluedの通信ログを見る
* bluetoothロガーで流れるパケットを見る
@hylom
hylom / mecab-ipadic.spec
Last active August 16, 2016 15:40
mecab-ipadic's spec file for rpmbuild
%define name mecab-ipadic
%define ver 2.7.0
%define date 20070801
%define release el6.4_1
Summary: IPA dictionary for MeCab
Summary(ja): MeCab用のIPA辞書
Name: %{name}
Version: %{ver}.%{date}
Release: %{release}
@hylom
hylom / mecab.spec
Created May 9, 2013 10:53
MeCab's spec file for rpmbuild
%define name mecab
%define version 0.996
%define release el6.4
Summary: Yet Another Part-of-Speech and Morphological
Name: %{name}
Version: %{version}
Release: %{release}
Source0: https://mecab.googlecode.com/files/mecab-%{version}.tar.gz
License: GPL/LGPL/BSD
@hylom
hylom / example-mongo-with-node.txt
Created April 14, 2013 18:42
load-from-mongodb.jsとstore-to-mongodb.jsの実行例
$ node store-to-mongodb.js ./test/sample.JPG
insert succeeded.
$ mongo test01
> db.images.find()
{ "filename" : "sample.JPG", "data" : BinData(0,"/9j/4AAQSkZJRgABAQEAtAC0AAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
$ node load-from-mongodb.js sample.JPG
@hylom
hylom / load-from-mongodb.js
Last active December 16, 2015 05:19
Sample code: Load binary data from MongoDB and save to file with Node.js
var fs = require('fs');
var path = require('path');
var mongodb = require('mongodb');
var BSON = mongodb.BSON;
var DB_HOST = 'localhost';
var DB_PORT = 27017
var DB_OPTION = {};
var DB_NAME = 'test01';
@hylom
hylom / store-to-mongodb.js
Last active November 28, 2021 10:27
Sample code: Store binary file to MongoDB with Node.js
var fs = require('fs');
var path = require('path');
var mongodb = require('mongodb');
var BSON = mongodb.BSON;
var DB_HOST = 'localhost';
var DB_PORT = 27017
var DB_OPTION = {};
var DB_NAME = 'test01';
@hylom
hylom / dotemacs.el
Last active December 14, 2015 12:39
My .emacs
;; -*- coding: utf-8 -*-
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(c-default-style (quote ((c-mode . "k&r") (c++-mode . "k&r") (java-mode . "java") (awk-mode . "awk") (other . "gnu"))))
'(case-fold-search t)
'(current-language-environment "English")