1984年のUWF

久々に柔らかいネタ。

現在のプロレスや格闘技にまで多大な影響を及ぼしているUWF。新日本プロレスのクーデターをきっかけに、復讐に燃えたアントニオ猪木のマネージャー新間寿が1984年に立ち上げた団体だ。アントニオ猪木、タイガー・マスクこと佐山聡–、新間にとって遺恨はあるが新団体UWFにはふたりの役者がどうしても必要だった。UWF旗揚げに関わる男達の生き様を追うノンフィクション。佐山聡、藤原喜明、前田日明、髙田延彦……、彼らは何を夢見て、何を目指したのか。果たしてUWFとは何だったのか。この作品にタブーはない。筆者の「覚悟」がこの作品を間違いなく骨太なものにしている。

Numberの連載は適宜読んでいて面白かったので、購入。

UWFはリアルタイムでは見ておらず、Uインターの新日との交流戦を見たレベル。ただ、当時はゴング・週プロは毎週読んでいたので、パンクラス・藤原組・リングスが活動していたのも知ってはいた。また、高田延彦の

も読んでいたが、高田延彦✕金子達仁なので、情報は偏り気味。

本書がすごいのは、プロレス書籍にありがちな、当事者へのインタビューを中心とした叙情的な情緒的な偏った記述ではなく、周囲の人間へのインタビューや事実を中心として客観的にUWFを取り上げているところ。また、UWF立ち上げ時の経緯は、「泣き虫」とくらべて明るい。

格闘技かプロレスかの議論はYouTubeでUWFの試合を見れば、佐山聡と高田延彦の蹴りあいを見るだけでも、一目でプロレスとわかるが、それはK-1やPrideなどのリアルファイト(疑惑の試合もそれなりにあるが)があったから。

時代背景を見つつ、当時のビデオを見るのが必要だろう。当時としては夢の大きい団体だったことは間違いない。

技術書2016

ここ1年で買った技術書を整理してみた。

我ながらよく買ってる。しかし身になってない(苦笑。

諦めてEl capitanにGraphite

諦めて、おうちのEl capitanでせめてもの画面だけは見ようとしてみる。いきなりつまずく。

$vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing ffi (1.9.14), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.14'` succeeds before bundling.

gemインストールもNG。

$gem install ffi -v '1.9.14'
Fetching: ffi-1.9.14.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing ffi:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.14 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.14/ext/ffi_c/gem_make.out

Xcodeのコマンドラインツールを入れてみる。前もやった気がするが。

$ xcode-select --install
$ sudo xcodebuild -license
$ gem install ffi -v '1.9.14'
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.14
Parsing documentation for ffi-1.9.14
Installing ri documentation for ffi-1.9.14
1 gem installed

vagrant upしたら怒られた

$vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'mayflower/trusty64-puppet3' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'mayflower/trusty64-puppet3'
    default: URL: https://atlas.hashicorp.com/mayflower/trusty64-puppet3
==> default: Adding box 'mayflower/trusty64-puppet3' (v0.7.2) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/mayflower/boxes/trusty64-puppet3/versions/0.7.2/providers/virtualbox.box
==> default: Box download is resuming from prior download progress
==> default: Successfully added box 'mayflower/trusty64-puppet3' (v0.7.2) for 'virtualbox'!
==> default: Importing base box 'mayflower/trusty64-puppet3'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'mayflower/trusty64-puppet3' is up to date...
==> default: Setting the name of the VM: synthesize-master_default_1484155138036_88827
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 8443 is already in use
on the host machine.

To fix this, modify your current project's Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port:

  config.vm.network :forwarded_port, guest: 443, host: 1234

Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn't allow modifying port forwarding. You could
try 'vagrant reload' (equivalent of running a halt followed by an up)
so vagrant can attempt to auto-correct this upon booting. Be warned
that any unsaved work might be lost.

Vagrantfileを修正。ひとまず8445に。

config.vm.network :forwarded_port, guest: 443, host: 8445

起動できた!

 

grafanaインストール他

新規にEC2イメージを作ったところかたスタート。まずはVirtualBoxをインストール。色々と大ハマリ。結局、Oracleページよりrpmをダウンロードしてインストール

# yum install VirtualBox-5.1-5.1.12_112440_el7-1.x86_64.rpm  --skip-broken
(中略)
飛ばしました (依存性の問題):
  VirtualBox-5.1.x86_64 0:5.1.12_112440_el7-1                                   
  libXcursor.x86_64 0:1.1.14-2.1.9.amzn1                                        
  libXinerama.x86_64 0:1.1.2-2.7.amzn1                                          
  libXmu.x86_64 0:1.1.1-2.8.amzn1                                               
  libXt.x86_64 0:1.1.4-6.1.9.amzn1                                              
  libvpx.x86_64 0:1.2.0-1.0.amzn1  

【参考】skip-brokenとは

続いて、Vagrantインストール。こちらも、本家よりrpmを入手してインストール。続いてGraphite。

$ wget https://github.com/obfuscurity/synthesize/archive/master.zip
$ unzip master.zip
$ cd synthesize-master/
$ vagrant plugin install vagrant-vbguest
$ vagrant up
No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.

どうもVirtualBoxがVagrantから見えない・・・。色々はまったが、Amazon LinuxはXenで稼働しており、VirtualBoxはインストールできないとか。(仮想化上ではそもそもVirtualBoxが動かないとか)。Graphiteはソースを入手。

$git clone https://github.com/graphite-project/graphite-web.git
$git clone https://github.com/graphite-project/carbon.git
$git clone https://github.com/graphite-project/whisper.git
$git clone https://github.com/graphite-project/ceres.git

各フォルダでビルド。

python setup.py install

オフィシャルに従いもろもろ追加。

yum install python-devel cairo-devel libffi-devel

djangoをインストール

pip install Django==1.10.5

次は怒られた。

$ pip install cairocffi
You are using pip version 6.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting cairocffi
  Downloading cairocffi-0.7.2.tar.gz (75kB)
    100% |████████████████████████████████| 77kB 2.9MB/s 
    Complete output from command python setup.py egg_info:
    unable to execute 'gcc': No such file or directory
    unable to execute 'gcc': No such file or directory

まずはpipをアップグレードして、gccもインストール。他もろもろ。

$pip install --upgrade pip
$yum install gcc
$/usr/local/bin/pip install cairocffi
$/usr/local/bin/pip install django-tagging
$/usr/local/bin/pip install pytz
$/usr/local/bin/pip install pyparsing
$

いよいよDBセットアップがエラー

PYTHONPATH=/opt/graphite/webapp/ django-admin.py migrate --settings=graphite.settings --run-syncdb
/opt/graphite/webapp/graphite/settings.py:249: UserWarning: SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security
  warn('SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security')
Traceback (most recent call last):
  File "/usr/local/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 341, in execute
    django.setup()
  File "/usr/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/usr/local/lib/python2.7/site-packages/django/apps/config.py", line 199, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/graphite/webapp/graphite/account/models.py", line 16, in <module>
    from django.contrib.auth import models as auth_models
  File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/models.py", line 4, in <module>
    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/base_user.py", line 52, in <module>
    class AbstractBaseUser(models.Model):
  File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 119, in __new__
    new_class.add_to_class('_meta', Options(meta, app_label))
  File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 316, in add_to_class
    value.contribute_to_class(cls, name)
  File "/usr/local/lib/python2.7/site-packages/django/db/models/options.py", line 214, in contribute_to_class
    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
  File "/usr/local/lib/python2.7/site-packages/django/db/__init__.py", line 33, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 211, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 115, in load_backend
    return import_module('%s.base' % backend_name)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 28, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

MySQLが無いらしいのでインストール。python-mysqlを入れようとすると、

$pip install mysql-python
Collecting mysql-python
  Using cached MySQL-python-1.2.5.zip
Installing collected packages: mysql-python
  Running setup.py install for mysql-python ... error
    Complete output from command /usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9lfWr3/mysql-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-bKFVV6-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
    creating build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.linux-x86_64-2.7
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql55 -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1
mysql.c:44:23: fatal error: my_config.h: そのようなファイルやディレクトリはありません

大胆に以下をやったら、通った♡

$yum install mysql-*
pip install mysql-python
Collecting mysql-python
  Using cached MySQL-python-1.2.5.zip
Installing collected packages: mysql-python
  Running setup.py install for mysql-python ... done
Successfully installed mysql-python-1.2.5

次はスキーマ構築

PYTHONPATH=/opt/graphite/webapp/ django-admin.py migrate --settings=graphite.settings --run-syncdb

さあ起動と思ったらApacheが無かった。

$yum install httpd24 httpd24-tools
$yum install mod24_wsgi-py27
$pip install twisted

その後も公式を見ながら悪戦苦闘も断念。。。

Linuxでのタイムゾーン変更

現在の設定を確認、UTCになっている。

[root@www]# strings /etc/localtime
TZif2
TZif2
UTC0
[root@www]#

コピーを残してタイムゾーンを変更。変わった。

[root@www]# ln -sf  /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
[root@www]# strings /etc/localtime
TZif2
	JCST
TZif2
JCST
JST-9
[root@www]#

 

MacでCPUのスペックを確認する方法

家で使っているMBA(Mid 2013)ですが、買い替えをしたくてスペック調査。

bash-3.2# sysctl machdep.cpu.brand_string

machdep.cpu.brand_string: Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz

bash-3.2#

GeekBenchで見るとこんな感じ。MacBookPro 13inchが3500(シングルコア)なのでもう1世代我慢かなぁ。ちなみにMac Mini Mid 2011はシングルコアで2,824、マルチコアで8,067。

Amazon fire tv stickにkodiをインストールしてDVD ISOを見れるようにした件

ずーっと欲しかったソリューション。

これまではUniversalMediaServerを使ってたけれども、Amazon fire tv stickにkodiをインストール。ただ、Macのファイル共有との相性が悪くてNFSを利用。

http://kodi.wiki/view/NFS に記載の「-N flag is set, but shares still won’t work」でハマりました。SIPが効いていたのでファイル更新ができず・・・。

SIPロック解除して、更新。完了。

Mac OS X 10.11 changed the way the user is allowed to interact with certain system files, including anything in /System/Library/LaunchDaemons/ This is due to SIP (System Integrity Protection). Follow these steps to disable SIP, set the -N option in com.apple.nfsd.plist, and re-enable SIP

regzaでUSBハードディスクを使うときにハマった件

うちのRegza(DBR-Z160)で4TBのUSB HDD(BUFFALO HD-LC4.0U3/N ))を使うときにハマった件をまとめときます。結論は無事に使えました(汗

もともとはRegza用に買ったんですが、Regzaで利用する前に家の中のデータ移行を行うために、FAT32でフォーマットをかけたのが宜しく無かった模様。

1.FAT32でフォーマットしたディスクをRegzaに接続。

(俺)どうせ、フォーマットされるんだろうからディスクが認識されれば良いや。

(結果)ディスクの認識はOK。だけど初期化を始めると0%から進まず数秒後に「このディスクは初期化できません」エラー。

2.WindowsPCでNTFSにフォーマットしてリトライ→NGで状況変わらず。

3.Macでフォーマットしてリトライ→NGで状況変わらず。

4.Regzaのソフトウェア・アップデートをするも状況変わらず、

5.WindowsでBuffaloのDisk Formatter2でテレビ設定にしたところ、初期化成功。Buffaloのマニュアルには

テレビで初期化できるように、フォーマットしていない状態 に戻します。この設定にした場合は、テレビで初期化してくだ さい。WindowsやMacでは認識できません。

とあるが、、、Regzaはマニュアルには何も記載がないし、所詮Linuxなので、いくらでも強制的にフォーマットしれくれる気がするが謎のまま。。。

ひとまず一万強のお金をドブに捨てずに住んでよかった(汗

浦和レッズ変革の四年 ~サッカー新聞エルゴラッソ浦和番記者が見たミシャレッズの1442日

読み終えての率直な感想。もう少し、人物に踏み込んで、ノンフィクションのアプローチで突っ込んだインタビューがあると良かった〜。

タイトルの通り、新聞の番記者目線であるので、都度のインタビューが収録・取りまとめられているのは非常に良い。ミシャが来てからの特にトレーニング風景は臨場感があり、かつ選手のコメントが的確に拾えているので、ミシャ就任後の浦和の変化を裏付けるバックデータ本として適当。

ただ、それでもタイトルが取れていないようにラスト・ワン・マイルが見つからない浦和をせっかく書籍として振り返る機会だけに主義・主張がもう少し欲しかった。惜しい!

スタンフォードのストレスを力に変える教科書

たまには真面目な本を読んで見る。

体育会経験者のメンタルは文系のそれを凌駕する!が持論ですが、その根底を学術的な観点で説明してくれていたのが本書でした。

死にそうな筋トレ、死にそうなシゴキ、炎天下でも水が飲めない、そういった過酷な中で成長した実感があると、辛い中でもこれを乗り越えたら・・・という忍耐力は身につくと思ってたけれども、それは本書で述べられている「ストレスが良いものだ」と思っている人には健康で害が出ていない、という説そのもの。

そもそもストレスが悪いとされたのは、動物実験、それも身体的な苦痛を伴うところからスタートしたものであり、人間が感じる、対人関係などでは無い、という衝撃の紹介に加え、以下の節には驚かされた。

ひとまずは斜め読みしたが、多分何度も読み返すことになろう。

抵抗をやめればストレスはパワーの源になる

ほとんどの人は、プレッシャーのかかる状態ではリラックスするのがいちばんいい、と思っています、しかし(中略)本当はその逆であり(中略)、人生でもっとも重要な試験を控えた学生も、選手生活で最も過酷な競争に挑むアスリートも、ストレスを前向きに捉えることで、自信が強まり、パフォーマンスが向上します。

また、不安を受け入れると、困難にうまく対処できるようになり、体の反応までもが、典型的な「恐怖反応」から「勇気を生み出す反応」へと変化することも見ていきます。