Skip to content

Instantly share code, notes, and snippets.

View suneo3476's full-sized avatar

suneo3476 suneo3476

  • Hamamatsu, Shizuoka, Japan
View GitHub Profile
@suneo3476
suneo3476 / log1.csv
Created July 7, 2015 13:44
教育情報システム論用に作成。http://ncode.syosetu.com/n8073cd/2/ のリプレイ文章をlog2csv.jsで読み込んでcsv出力する。Node0.10.26で動作確認。
0 綾鷹 点呼ー null null
1 灰猫 1 null null
2 眠兎 2 null null
3 紫葵 3 null null
4 H.H. ポン null null
0 綾鷹 くそwwww null null
3 紫葵 www null null
0 綾鷹 では始めたいと思います! null null
1 灰猫 はいー88888888888 null null
3 紫葵 ほーい(・ω・)ノ null null
@suneo3476
suneo3476 / file0.txt
Last active February 1, 2016 08:28
CentOS7でMediaWikiを公開する環境構築メモ ref: http://qiita.com/suneo3476/items/46ddbe4e6149443769ee
cmd install
@suneo3476
suneo3476 / sanaruko-lake-jis-mapping.html
Created June 16, 2015 18:23
Sanaruko Lake GIS Mapping
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>4group - Masato Fujimori</title>
<style media="screen">
body{
width:100%;
}
#map_canvas{
@suneo3476
suneo3476 / LitenerHell.js
Created June 10, 2015 12:21
リスナー地獄
/* marker[0]~[4] infowindow[0] は for 文で回したというのに…! */
google.maps.event.addListener(marker[0], 'click', function() {
infowindow[0].open(map,marker[0]);
});
google.maps.event.addListener(marker[1], 'click', function() {
infowindow[1].open(map,marker[1]);
});
google.maps.event.addListener(marker[2], 'click', function() {
infowindow[2].open(map,marker[2]);
@suneo3476
suneo3476 / mecabing.js
Created May 18, 2015 12:47
めかびんぐ
//mecab
var Mecab = require('mecab-async');
var mecab = new Mecab();
//fileread
var LineReader = require('./LineReader.js');
var reader = new LineReader('./tweets.txt');
//child_process
var child_process = require('child_process');
//main
@suneo3476
suneo3476 / mecabing.js
Created May 18, 2015 12:15
くっそおもい
while(reader.next()){ //ファイル読み込み、同期・非同期かんけいない
mecab.parse(reader.line,function(err,result){ //mecabかませる部分
if(result!==undefined)
console.log(result[0][1]+','+result[0][7]);
});
}
<?php
function preg_match_br(){
/* initialize */
$result = NULL;
/* back reference (group) */
preg_match ( '/sample_(reg)_exp/u' , $subject , $matches_array );
@suneo3476
suneo3476 / preg_match_1.php
Last active August 29, 2015 14:17
ex: preg_match(php)
<?php
function any_method(){
/* back reference (group) */
preg_match ( '/sample_(reg)_exp/u' , $subject , $matches_array );
/* extract (group) */
if ( isset( $matches_array[ 1 ] ) ) {
$result = $matches_array[ 1 ];
@suneo3476
suneo3476 / gist:a4a19f34bd1a65879f3f
Created November 20, 2014 10:00
オープンデータ利活用システムについて
一般住民がシステムを利用する時、デジタルデバイスで閲覧するだけでなく印刷・保存することが想定される。その場合、Googleマップデータの
@suneo3476
suneo3476 / ensei_bucket.js
Created May 3, 2014 07:00
バケツを最大限稼いで資源の消費を最小限にする遠征の組み合わせ "node ensei_bucket > ensei_bucket.txt" などする
//燃料、弾薬、鋼材、ボーキの時給理論値
var resourceSet = [
//鎮守府正面海域
[-32,120,0,0],
[-56,200,60,0],
[54,34,120,0],
[-31.2,72,0,0],
[111.67,133.33,13.33,13.33],
[-24,-24,0,120],
[-42,0,50,30],