Skip to content

Instantly share code, notes, and snippets.

View abarth500's full-sized avatar

Shohei Yokoyama abarth500

  • Tokyo Metropolitan University
  • Tokyo Japan
View GitHub Profile
@abarth500
abarth500 / gist:90addb9083502244a38c
Created December 28, 2015 22:32
[ソーシャルビッグデータ演習] 演習1ディレクトリへ移動
cd node_modules\flickr-tag-crawler
@abarth500
abarth500 / create-dir.bat
Created December 28, 2015 21:57
[ソーシャルビッグデータ演習] 演習用ディレクトリの作成
cd c:\
mkdir sobig
cd sobig
var BBOX2Heatmap = require('bbox2headmap');
//Oktoberfest
BBOX2Heatmap([11.543283,48.12657,11.554785,48.137053]);
node bbox2heatmap/execute.js -B 11.543283,48.12657,11.554785,48.137053
npm install bbox2heatmap
@abarth500
abarth500 / .htaccess
Last active August 29, 2015 14:26
Mediawiki用 htaccess
#MediaWiki URL省略スタイル用htaccess
#extディレクトリは直接参照可能 (自作のPHPを置いたり等のため)
RewriteEngine on
RewriteRule ^/ext(.*)$ /ext$1 [L,QSA]
RewriteRule ^[^:]*\.(php|src|jpg|jpeg|png|gif|css|js|inc|swf|flv|phtml|pl|ico|html|shtml|zip|rar|svg|gz)$ - [L,NC]
RewriteRule ^index.php?title - [L]
RewriteRule ^(.*)\&(.*)$ /index.php?title=$1\%26$2 [L,QSA]
RewriteCond %{REQUEST_URI} (//+)
RewriteRule ^(.*)/(.*)$ /index.php?title=$1%1$2 [L,QSA]
@abarth500
abarth500 / gist:0a9ddda14d0c9e3b7aab
Last active June 27, 2016 09:52
[情報科学実験I] Webサーバの実装
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8080, '192.168.0.200');
console.log('Server running at http://192.168.0.200:8080/');
sudo dnf install nodejs npm
node -v
#v0.10.36のようなバージョン番号がでてきたらインストール成功
npm -v
#1.3.6のようなバージョン番号がでてきたらインストール成功
@abarth500
abarth500 / gist:6b3d270ef7940dae0869
Last active August 29, 2015 14:23
[情報科学実験I] MariaDBのrootパスワードリセット方法
# MariaDBのサービスを停める
sudo systemctl stop mariadb.service
#MariaDBをセーフモードで立ち上げる。
sudo mysqld_safe --skip-grant-tables &
#rootでログイン
mysql -u root
#rootのパスワードを設定(MariaDBのコマンドライン上で)
@abarth500
abarth500 / gist:b5180ce0d1186f9de86e
Created June 25, 2015 01:59
ソーシャルビッグデータ演習:クローリングされた写真データ
{"metadata":{
tags:["car","train"],
bbox:[
[-122.28,33.27,-113.43,42.26],
[-6.52,49.81,2.32,58.79]
]},
"data":[
{"id":"4233845758",
"owner":"51035555243@N01",
"secret":"b9604dafc0",