Skip to content

Instantly share code, notes, and snippets.

View sh19910711's full-sized avatar

Hiroyuki Sano sh19910711

View GitHub Profile
@sh19910711
sh19910711 / GSoC2016.md
Created August 22, 2016 13:14
Ruby::GSoC2016::WebConsole
@sh19910711
sh19910711 / !git-contest.md
Last active January 3, 2016 23:38
git-contest specification drafts

test

path = require 'path'
yeoman = require 'yeoman-generator'
module.exports = class TestGenerator extends yeoman.generators.Base
constructor: (args, options, config) ->
yeoman.generators.Base.apply this, arguments
@on 'end', ->
@installDependencies skipInstall: options['skip-install']
@pkg = JSON.parse @readFileAsString path.join __dirname, '../package.json'
@sh19910711
sh19910711 / arch-linux-install.sh
Last active January 1, 2016 00:19
arch linux
# 2013-12-21
# test
@sh19910711
sh19910711 / .gitignore
Last active December 20, 2015 15:59
メモ
**/.*.swp
@sh19910711
sh19910711 / gist:5241225
Created March 25, 2013 22:03
メソッドのチェック
#include <iostream>
using namespace std;
struct TestA {
int needed_method() {
cout << "test" << endl;
return 0;
}
};
@sh19910711
sh19910711 / box2d-js-loadlist.txt
Created March 10, 2013 08:42
JavaScript用のbox2dをminifyするときに使う
./common/b2Settings.js
./common/math/b2Vec2.js
./common/math/b2Mat22.js
./common/math/b2Math.js
./collision/b2AABB.js
./collision/b2Bound.js
./collision/b2BoundValues.js
./collision/b2Pair.js
./collision/b2PairCallback.js
./collision/b2BufferedPair.js
@sh19910711
sh19910711 / thread.cpp
Created March 10, 2013 04:57
Boost.AsioでThreadを作る例
// compile: g++ -lboost_system -lboost_thread thread.cpp
#include <iostream>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
void test1() {
for ( int i = 0; i < 10; ++ i )
std::cout << "test 1" << std::endl;
}
@sh19910711
sh19910711 / client.cpp
Created March 10, 2013 04:34
UNIX-domain socketsを使ってClient/Serverする例
// compile: g++ -lboost_system client.cpp
#include <iostream>
#include <boost/asio.hpp>
const std::string SOCKET_NAME = "/tmp/socket";
int main(){
boost::asio::io_service io_service;
boost::asio::local::stream_protocol::socket socket(io_service);
boost::asio::local::stream_protocol::endpoint ep(SOCKET_NAME);