Add site
8
.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/_site
|
||||
/.sass-cache
|
||||
/node_modules/
|
||||
/npm-debug.log
|
||||
/.jekyll-metadata
|
||||
/images/crushed
|
||||
/.bundle
|
||||
/vendor/bundle/
|
20
.textlintrc
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"rules": {
|
||||
"max-ten": true,
|
||||
"no-start-duplicated-conjunction": {
|
||||
"interval": 2
|
||||
},
|
||||
"no-dropping-the-ra": true,
|
||||
"common-misspellings": true,
|
||||
"preset-japanese": {
|
||||
"sentence-length": false
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
"whitelist": {
|
||||
"allow": [
|
||||
"/{%.+?%}/"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
6
.travis.yml
Normal file
@ -0,0 +1,6 @@
|
||||
language: node_js
|
||||
node_js: stable
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM ruby:2.3
|
||||
|
||||
WORKDIR /usr/src/app/
|
||||
|
||||
# see http://stackoverflow.com/questions/38453963/gitlab-ci-setup-error-could-not-find-a-javascript-runtime
|
||||
RUN apt-get update && apt-get install nodejs -y
|
||||
|
||||
COPY Gemfile /usr/src/app/
|
||||
RUN bundle install
|
3
Gemfile
Normal file
@ -0,0 +1,3 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'github-pages', '124', group: :jekyll_plugins # workaround https://github.com/github/pages-gem#usage
|
205
Gemfile.lock
Normal file
@ -0,0 +1,205 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (4.2.7)
|
||||
i18n (~> 0.7)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
colorator (1.1.0)
|
||||
ethon (0.10.1)
|
||||
ffi (>= 1.3.0)
|
||||
execjs (2.7.0)
|
||||
faraday (0.13.1)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffi (1.9.18)
|
||||
forwardable-extended (2.6.0)
|
||||
gemoji (3.0.0)
|
||||
github-pages (124)
|
||||
activesupport (= 4.2.7)
|
||||
github-pages-health-check (= 1.3.1)
|
||||
jekyll (= 3.3.1)
|
||||
jekyll-avatar (= 0.4.2)
|
||||
jekyll-coffeescript (= 1.0.1)
|
||||
jekyll-default-layout (= 0.1.4)
|
||||
jekyll-feed (= 0.9.1)
|
||||
jekyll-gist (= 1.4.0)
|
||||
jekyll-github-metadata (= 2.3.1)
|
||||
jekyll-mentions (= 1.2.0)
|
||||
jekyll-optional-front-matter (= 0.1.2)
|
||||
jekyll-paginate (= 1.1.0)
|
||||
jekyll-readme-index (= 0.0.4)
|
||||
jekyll-redirect-from (= 0.12.1)
|
||||
jekyll-relative-links (= 0.3.0)
|
||||
jekyll-sass-converter (= 1.5.0)
|
||||
jekyll-seo-tag (= 2.1.0)
|
||||
jekyll-sitemap (= 1.0.0)
|
||||
jekyll-swiss (= 0.4.0)
|
||||
jekyll-theme-architect (= 0.0.3)
|
||||
jekyll-theme-cayman (= 0.0.3)
|
||||
jekyll-theme-dinky (= 0.0.3)
|
||||
jekyll-theme-hacker (= 0.0.3)
|
||||
jekyll-theme-leap-day (= 0.0.3)
|
||||
jekyll-theme-merlot (= 0.0.3)
|
||||
jekyll-theme-midnight (= 0.0.3)
|
||||
jekyll-theme-minimal (= 0.0.3)
|
||||
jekyll-theme-modernist (= 0.0.3)
|
||||
jekyll-theme-primer (= 0.1.7)
|
||||
jekyll-theme-slate (= 0.0.3)
|
||||
jekyll-theme-tactile (= 0.0.3)
|
||||
jekyll-theme-time-machine (= 0.0.3)
|
||||
jekyll-titles-from-headings (= 0.1.4)
|
||||
jemoji (= 0.8.0)
|
||||
kramdown (= 1.13.2)
|
||||
liquid (= 3.0.6)
|
||||
listen (= 3.0.6)
|
||||
mercenary (~> 0.3)
|
||||
minima (= 2.0.0)
|
||||
nokogiri (= 1.6.8.1)
|
||||
rouge (= 1.11.1)
|
||||
terminal-table (~> 1.4)
|
||||
github-pages-health-check (1.3.1)
|
||||
addressable (~> 2.3)
|
||||
net-dns (~> 0.8)
|
||||
octokit (~> 4.0)
|
||||
public_suffix (~> 2.0)
|
||||
typhoeus (~> 0.7)
|
||||
html-pipeline (2.7.1)
|
||||
activesupport (>= 2)
|
||||
nokogiri (>= 1.4)
|
||||
i18n (0.8.6)
|
||||
jekyll (3.3.1)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
jekyll-sass-converter (~> 1.0)
|
||||
jekyll-watch (~> 1.1)
|
||||
kramdown (~> 1.3)
|
||||
liquid (~> 3.0)
|
||||
mercenary (~> 0.3.3)
|
||||
pathutil (~> 0.9)
|
||||
rouge (~> 1.7)
|
||||
safe_yaml (~> 1.0)
|
||||
jekyll-avatar (0.4.2)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-coffeescript (1.0.1)
|
||||
coffee-script (~> 2.2)
|
||||
jekyll-default-layout (0.1.4)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-feed (0.9.1)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-gist (1.4.0)
|
||||
octokit (~> 4.2)
|
||||
jekyll-github-metadata (2.3.1)
|
||||
jekyll (~> 3.1)
|
||||
octokit (~> 4.0, != 4.4.0)
|
||||
jekyll-mentions (1.2.0)
|
||||
activesupport (~> 4.0)
|
||||
html-pipeline (~> 2.3)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-optional-front-matter (0.1.2)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-paginate (1.1.0)
|
||||
jekyll-readme-index (0.0.4)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-redirect-from (0.12.1)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-relative-links (0.3.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-sass-converter (1.5.0)
|
||||
sass (~> 3.4)
|
||||
jekyll-seo-tag (2.1.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-sitemap (1.0.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-swiss (0.4.0)
|
||||
jekyll-theme-architect (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-cayman (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-dinky (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-hacker (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-leap-day (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-merlot (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-midnight (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-minimal (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-modernist (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-primer (0.1.7)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-slate (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-tactile (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-theme-time-machine (0.0.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-titles-from-headings (0.1.4)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-watch (1.5.0)
|
||||
listen (~> 3.0, < 3.1)
|
||||
jemoji (0.8.0)
|
||||
activesupport (~> 4.0)
|
||||
gemoji (~> 3.0)
|
||||
html-pipeline (~> 2.2)
|
||||
jekyll (>= 3.0)
|
||||
json (1.8.6)
|
||||
kramdown (1.13.2)
|
||||
liquid (3.0.6)
|
||||
listen (3.0.6)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9.7)
|
||||
mercenary (0.3.6)
|
||||
mini_portile2 (2.1.0)
|
||||
minima (2.0.0)
|
||||
minitest (5.10.3)
|
||||
multipart-post (2.0.0)
|
||||
net-dns (0.8.0)
|
||||
nokogiri (1.6.8.1)
|
||||
mini_portile2 (~> 2.1.0)
|
||||
octokit (4.7.0)
|
||||
sawyer (~> 0.8.0, >= 0.5.3)
|
||||
pathutil (0.16.0)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (2.0.5)
|
||||
rb-fsevent (0.10.2)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
rouge (1.11.1)
|
||||
safe_yaml (1.0.4)
|
||||
sass (3.5.2)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
sawyer (0.8.1)
|
||||
addressable (>= 2.3.5, < 2.6)
|
||||
faraday (~> 0.8, < 1.0)
|
||||
terminal-table (1.8.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
thread_safe (0.3.6)
|
||||
typhoeus (0.8.0)
|
||||
ethon (>= 0.8.0)
|
||||
tzinfo (1.2.3)
|
||||
thread_safe (~> 0.1)
|
||||
unicode-display_width (1.3.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
github-pages (= 124)
|
||||
|
||||
BUNDLED WITH
|
||||
1.15.4
|
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Yasuaki Uechi (https://uechi.io)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
29
README.md
Normal file
@ -0,0 +1,29 @@
|
||||
# uechi.io [](https://travis-ci.org/uetchy/uetchy.github.io)
|
||||
|
||||
## Build
|
||||
|
||||
```
|
||||
script/bootstrap
|
||||
script/server
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
```
|
||||
docker-compose build
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
## Test
|
||||
|
||||
```
|
||||
npm install
|
||||
npm test
|
||||
```
|
||||
|
||||
## Publish
|
||||
|
||||
```
|
||||
git commit -m "New article"
|
||||
git push
|
||||
```
|
45
_config.yml
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
title: uechi.io
|
||||
timezone: Asia/Tokyo
|
||||
collections:
|
||||
posts:
|
||||
title: Posts
|
||||
output: true
|
||||
uploads:
|
||||
title: Uploads
|
||||
output: true
|
||||
defaults:
|
||||
- scope:
|
||||
path: ''
|
||||
type: posts
|
||||
values:
|
||||
layout: post
|
||||
permalink: "/blog/:year/:month/:day/:title"
|
||||
description: Random posts from @uetchy.
|
||||
url: https://uechi.io
|
||||
email: y@uechi.io
|
||||
twitter:
|
||||
username: uetschy
|
||||
github:
|
||||
username: uetchy
|
||||
logo: "/images/icon.png"
|
||||
highlighter:
|
||||
excerpt_separator: "#"
|
||||
google_analytics: UA-28919359-12
|
||||
gems:
|
||||
- jekyll-redirect-from
|
||||
- jekyll-sitemap
|
||||
- jekyll-seo-tag
|
||||
- jekyll-feed
|
||||
- jemoji
|
||||
include:
|
||||
- _pages
|
||||
exclude:
|
||||
- README.md
|
||||
- LICENSE
|
||||
- CNAME
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
- package.json
|
||||
- script
|
||||
- vendor
|
0
_data/.keep
Normal file
0
_drafts/.keep
Normal file
12
_drafts/deconvolutiontohu-bufalsehamouyameyou.markdown
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Deconvolutionと呼ぶのはもうやめよう
|
||||
date: 2017-03-05 13:44:00 +09:00
|
||||
---
|
||||
|
||||
深層学習において、Convolutional Layer (畳み込み層)とは、あるシェイプのテンソルをそれ以下のサイズに縮約する性質のレイヤーです。一方でDeconvolution Layer (逆畳み込み層)とは、[Jonathan Long, et al](https://arxiv.org/abs/1411.4038)の論文で提案されたレイヤーで、あるシェイプのテンソルをそれ以上のサイズに拡大する性質を持ちます。
|
||||
|
||||
ところが実際のところ、このレイヤーはTransposed Convolution Layer (転置畳み込み層)と呼ぶべきです。なぜかを以下に示します。
|
||||
|
||||
> Upsampling is backwards strided convolution. (アップサンプリングは
|
||||
|
||||
[Stack Exchange](http://datascience.stackexchange.com/questions/6107/what-are-deconvolutional-layers)での議論を踏まえると
|
13
_drafts/deep-learning-travel-guide.markdown
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
title: Deep Learning Travel Guide
|
||||
date: 2017-02-27 01:28:00 +09:00
|
||||
---
|
||||
|
||||
## Online Courses
|
||||
|
||||
- Coursera Machine Learning
|
||||
- fast.ai
|
||||
- Udacity
|
||||
|
||||
## Books
|
||||
|
11
_drafts/gst-a-powerful-pal-for-ghq.markdown
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
title: 'gst: a powerful pal for ghq'
|
||||
date: 2017-06-02 23:02:00 +09:00
|
||||
---
|
||||
|
||||
[gst](https://github.com/uetchy/gst) is tiny and simple but powerful pal for [ghq](https://github.com/motemen/ghq).
|
||||
|
||||
Have you ever imagined what if you know which commits are unpushed or which changes are uncommitted yet, for all of the repositories you have cloned on your machine?
|
||||
|
||||
You might want to check out my ongoing project `gst`:
|
||||
it might help you to know what ongoing changes are remained to be committed or pushed among entire your local repositories.
|
11
_includes/footer.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{ site.google_analytics }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
32
_includes/head.html
Normal file
@ -0,0 +1,32 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<link rel='shortcut icon' href='{{ site.baseurl }}/images/favicon.ico'/>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ site.baseurl }}/images/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" href="{{ site.baseurl }}/images/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="{{ site.baseurl }}/images/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="mask-icon" href="{{ site.baseurl }}/images/safari-pinned-tab.svg" color="#5bbad5">
|
||||
|
||||
<link rel='stylesheet' href='{{ site.baseurl }}/css/index.css'>
|
||||
|
||||
{% seo %}
|
||||
{% feed_meta %}
|
||||
|
||||
<!-- Normalize.js -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" />
|
||||
|
||||
<!-- Highlight.js -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/go.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/scss.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/lua.min.js"></script>
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad()
|
||||
</script>
|
||||
|
||||
<!-- Main CSS -->
|
||||
<link rel="stylesheet" href="/css/index.css">
|
||||
</head>
|
19
_includes/header.html
Normal file
@ -0,0 +1,19 @@
|
||||
<header class="header">
|
||||
<a class="logo" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
||||
<nav>
|
||||
<ul class="menu">
|
||||
<li class="menu__item">
|
||||
<a href="/author">Author</a>
|
||||
</li>
|
||||
<li class="menu__item">
|
||||
<a href="/wallpaper">Wallpaper</a>
|
||||
</li>
|
||||
<li class="menu__item">
|
||||
<a href="https://twitter.com/{{ site.twitter.username }}">Twitter</a>
|
||||
</li>
|
||||
<li class="menu__item">
|
||||
<a href="https://github.com/{{ site.github.username }}">GitHub</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
10
_layouts/default.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{% include head.html %}
|
||||
|
||||
<body>
|
||||
{% include header.html %}
|
||||
{{ content }}
|
||||
{% include footer.html %}
|
||||
</body>
|
||||
</html>
|
56
_layouts/post.html
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<section>
|
||||
<article class="article">
|
||||
<hgroup class="article__metadata">
|
||||
<h2 class="article__title">{{ page.title }}</h1>
|
||||
<h3 class="article__pubdate"><time pubdate>{{ page.date | date: '%B %d, %Y' }}</time></h3>
|
||||
</hgroup>
|
||||
<div class="article__content">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
<!-- Social buttons -->
|
||||
<div id="fb-root"></div>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
<div class="article__social">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-size="large">Tweet</a>
|
||||
<div class="fb-like" data-layout="button" data-action="like" data-size="large" data-show-faces="false" data-share="true"></div>
|
||||
</div>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<!-- Include MathJax -->
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
tex2jax: {
|
||||
inlineMath: [['$','$'], ['\\(','\\)']],
|
||||
displayMath: [['$$','$$'], ['\[','\]']],
|
||||
processEscapes: false,
|
||||
processEnvironments: false,
|
||||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'a']
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- <script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Queue(function() {
|
||||
// Fix <code> tags after MathJax finishes running. This is a
|
||||
// hack to overcome a shortcoming of Markdown. Discussion at
|
||||
// https://github.com/mojombo/jekyll/issues/199
|
||||
var all = MathJax.Hub.getAllJax(), i;
|
||||
for(i = 0; i < all.length; i += 1) {
|
||||
all[i].SourceElement().parentNode.className += ' has-jax';
|
||||
}
|
||||
});
|
||||
</script> -->
|
||||
<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_SVG">
|
||||
</script>
|
26
_pages/404.html
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: Page Not Found
|
||||
permalink: "/404.html"
|
||||
excerpt: ''
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{% include head.html %}
|
||||
<style>
|
||||
h1 {
|
||||
font-size: 12em;
|
||||
font-weight: 100;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
{% include header.html %}
|
||||
<section class='page-section error-page'>
|
||||
<div class='container-narrow text-center py-md-8'>
|
||||
<h1>404</h1>
|
||||
<p class="lead">This page could not be found</p>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
20
_pages/author.md
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Author
|
||||
permalink: "/author"
|
||||
layout: post
|
||||
---
|
||||
|
||||
I'm **Yasuaki Uechi**, a graduate student studying about timeseries data analysis. I was born in Okinawa, Japan in 1994 and have been living in Kanagawa.
|
||||
|
||||
# Contact
|
||||
|
||||
Reach me at `uechi@sfc.keio.ac.jp`.
|
||||
|
||||
# Facts
|
||||
|
||||
- Irish music addict: Not only listening to music, also playing Tin whistle, Irish fiddle and Bodhrán.
|
||||
- Photograph: taking a photograph while traveling around the globe.
|
||||
|
||||
# Current activities
|
||||
|
||||
- Graduate school of Keio University.
|
42
_pages/index.html
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
permalink: "/"
|
||||
layout:
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{% include head.html %}
|
||||
|
||||
<body>
|
||||
<div class="metro">
|
||||
<h1><a class="logo" href="{{ site.baseurl }}/">{{ site.title }}</a></h1>
|
||||
<nav>
|
||||
<ul class="menu">
|
||||
<li class="menu__item">
|
||||
<a href="/author">Author</a>
|
||||
</li>
|
||||
<li class="menu__item">
|
||||
<a href="/wallpaper">Wallpaper</a>
|
||||
</li>
|
||||
<li class="menu__item">
|
||||
<a href="https://twitter.com/{{ site.twitter.username }}">Twitter</a>
|
||||
</li>
|
||||
<li class="menu__item">
|
||||
<a href="https://github.com/{{ site.github.username }}">GitHub</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<section>
|
||||
{% for post in site.posts %}
|
||||
<article class="article-list__item">
|
||||
<h2 class="article-list__item__title"><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h2>
|
||||
<!-- <time class="article-list__item__pubdate" pubdate>{{ post.date | date: '%B %d, %Y' }}</time> -->
|
||||
<article class="article-list__item__excerpt">{{ post.excerpt | strip_html | truncate: 140, "..." }}</article>
|
||||
<a class="article-list__item__button" href="{{ post.url | prepend: site.baseurl }}">Read more</a>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% include footer.html %}
|
||||
</body>
|
||||
</html>
|
23
_pages/typeface.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
title: Typeface Design Kit
|
||||
permalink: "/typeface"
|
||||
layout: post
|
||||
---
|
||||
|
||||
<div style="text-align: center">
|
||||
<img src="{{ site.baseurl }}/images/typeface/thumbnail.png" />
|
||||
</div>
|
||||
|
||||
## Handwriting Typeface Template for Alphabet A-Z
|
||||
[Download (.pdf)]({{ site.baseurl }}/images/typeface/Typeface_A-Z.pdf)
|
||||
|
||||
## Handwriting Typeface Template for Hiragana (ひらがな)
|
||||
[Download (.pdf)]({{ site.baseurl }}/images/typeface/Typeface_Hiragana.pdf)
|
||||
|
||||
## Typeface Design Kit (.sketch)
|
||||
|
||||
[Download (.zip)]({{ site.baseurl }}/images/typeface/TypefaceDesignKit.zip)
|
||||
|
||||
## License
|
||||
|
||||
MIT License
|
35
_pages/wallpaper.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: Wallpaper
|
||||
permalink: "/wallpaper"
|
||||
layout: post
|
||||
---
|
||||
|
||||
Right-click and choose __Save Image__ to download wallpapers designed for OS X.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Monochrome
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
60
_posts/2013-07-07-install-julius-with-homebrew.md
Normal file
@ -0,0 +1,60 @@
|
||||
---
|
||||
title: OSXに音声解析エンジンJuliusを入れる with Homebrew
|
||||
date: 2013-07-07 09:00:00 +09:00
|
||||
---
|
||||
|
||||
Homebrewを使ってmacOSに音声解析エンジンJuliusをインストールします。
|
||||
|
||||
# 前提
|
||||
|
||||
OS X用のパッケージ管理ツール Homebrew がインストールされている必要がある。
|
||||
|
||||
インストール方法は[こちら](http://www.engineyard.co.jp/blog/2012/homebrew-os-xs-missing-package-manager/)を参照。
|
||||
|
||||
# インストール
|
||||
|
||||
デフォルトのHomebrewリポジトリにJuliusは含まれていないので、[homebrew-nlp](https://github.com/uetchy/homebrew-nlp) をtapする。
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ brew tap uetchy/nlp
|
||||
```
|
||||
|
||||
Tapし終わったら、`julius`と`julius-dictation-kit`をインストールする。
|
||||
|
||||
```bash
|
||||
$ brew install julius julius-dictation-kit
|
||||
```
|
||||
|
||||
これで Julius と Juliusディクテーションキットがインストールされた。
|
||||
|
||||
ディクテーションキットの場所は `brew --prefix julius-dictation-kit` コマンドで調べられる。
|
||||
|
||||
後は、上記の `brew --prefix` コマンドでディクテーションキット内の **main.jconf** と **am-gmm.jconf** のパスを調べて `julius` に渡すことで音声認識が出来るようになる。
|
||||
|
||||
```bash
|
||||
$ julius \
|
||||
-C `brew --prefix julius-dictation-kit`/share/main.jconf \
|
||||
-C `brew --prefix julius-dictation-kit`/share/am-gmm.jconf
|
||||
```
|
||||
|
||||
上記のコマンドでJuliusはGMMモードで待機状態になり、喋った内容をリアルタイムで音声認識してくれるようになる。
|
||||
|
||||
Juliusをより精密なDNNモードで起動したい場合は以下のように、**am-gmm.jconf** を **am-dnn.jconf** に変更するだけだ。
|
||||
|
||||
```bash
|
||||
$ julius \
|
||||
-C `brew --prefix julius-dictation-kit`/share/main.jconf \
|
||||
-C `brew --prefix julius-dictation-kit`/share/am-dnn.jconf
|
||||
```
|
||||
|
||||
ディクテーションキットに関するドキュメントは下記のコマンドから参照可能だ。
|
||||
|
||||
```bash
|
||||
$ open `brew --prefix julius-dictation-kit`/share/doc
|
||||
```
|
||||
|
||||
### 実行中の様子
|
||||
|
||||

|
93
_posts/2013-11-05-osx-http-proxy.md
Normal file
@ -0,0 +1,93 @@
|
||||
---
|
||||
title: OS Xのネットワーク環境に合わせてHTTP_PROXYを切り替えるシェルスクリプト
|
||||
date: 2013-11-05 00:00:00 Z
|
||||
---
|
||||
|
||||

|
||||
|
||||
大学のネットワークに接続している時だけプロキシを設定したい時がある。
|
||||
|
||||
Macのネットワーク環境は`networksetup -getcurrentlocation`コマンドで取得することが出来るので、
|
||||
|
||||
__.zshrc__ 辺りに以下のシェルスクリプトを書いておけばTerminalで新しいタブを開いた時に自動でプロキシを設定してくれるはずである。
|
||||
|
||||
```bash
|
||||
proxy=proxy.hogehoge.ac.jp
|
||||
switch_trigger=大学
|
||||
|
||||
if [ "`networksetup -getcurrentlocation`" = "$switch_trigger" ]; then
|
||||
export HTTP_PROXY=$proxy
|
||||
export FTP_PROXY=$proxy
|
||||
...以下省略
|
||||
fi
|
||||
```
|
||||
|
||||
## Gitのプロキシ設定も書き換えたい
|
||||
|
||||
Gitはhttp_proxyを見てくれないのでリモートリポジトリにpush出来なくて困ることがあった。そこでhttp_proxyと一緒にGitのプロキシ設定も書き換えるようにしたい。
|
||||
|
||||
Gitのプロキシは以下のコマンドで設定出来る。`--global`の代わりに`--system`を使っても良い。
|
||||
|
||||
```bash
|
||||
git config --global http.proxy $proxy
|
||||
git config --global https.proxy $proxy
|
||||
git config --global url."https://".insteadOf git://
|
||||
```
|
||||
|
||||
逆に `git config` から設定を削除したい場合は`git config --gobal --unset {item}`を使えば良い。
|
||||
|
||||
先ほどのコマンドと組み合わせることで最終的なコードは以下のようになる。
|
||||
|
||||
```bash:switch_proxy.sh
|
||||
proxy=proxy.hogehoge.ac.jp:80
|
||||
switch_trigger=大学
|
||||
|
||||
function set_proxy() {
|
||||
export http_proxy=$proxy
|
||||
export HTTP_PROXY=$proxy
|
||||
export ftp_proxy=$proxy
|
||||
export FTP_PROXY=$proxy
|
||||
export all_proxy=$proxy
|
||||
export ALL_PROXY=$proxy
|
||||
export https_proxy=$proxy
|
||||
export HTTPS_PROXY=$proxy
|
||||
|
||||
git config --global http.proxy $proxy
|
||||
git config --global https.proxy $proxy
|
||||
git config --global url."https://".insteadOf git://
|
||||
}
|
||||
|
||||
function unset_proxy() {
|
||||
unset http_proxy
|
||||
unset HTTP_PROXY
|
||||
unset ftp_proxy
|
||||
unset FTP_PROXY
|
||||
unset all_proxy
|
||||
unset ALL_PROXY
|
||||
unset https_proxy
|
||||
unset HTTPS_PROXY
|
||||
|
||||
git config --global --unset http.proxy
|
||||
git config --global --unset https.proxy
|
||||
git config --global --unset url."https://".insteadOf
|
||||
}
|
||||
|
||||
if [ "`networksetup -getcurrentlocation`" = "$switch_trigger" ]; then
|
||||
echo "Switch to proxy for university network"
|
||||
set_proxy
|
||||
else
|
||||
unset_proxy
|
||||
fi
|
||||
```
|
||||
|
||||
このコードを __.zshrc__ に保存して適当なターミナルで新しいセッションを開くと、`switch_trigger`で指定されたネットワーク環境下にいる時だけプロキシを通すことが出来る。
|
||||
|
||||
既に開いているセッションに対してプロキシを適用する方法がわからなかった。
|
||||
|
||||
Workaroundとして、コードを __~/.switch_proxy__ 辺りに置いて、
|
||||
|
||||
```bash:~/.zshrc
|
||||
alias nswitch=~/.switch_proxy
|
||||
```
|
||||
|
||||
と`.zshrc`に書いておくことで、`nswitch`とタイプしてプロキシを切り替えられるようになる。
|
25
_posts/2013-12-05-qiita-alfred-workflow.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
title: Qiitaでストックした記事をインクリメンタルサーチするAlfred 2 Workflow
|
||||
date: 2013-12-05 00:00:00 Z
|
||||
---
|
||||
|
||||
コードを書いている時に、ストックしておいたQiitaの記事を検索したくなるシーンが最近増えてきた気がする。
|
||||
|
||||
そこで、以前作った[Qiitaの記事をインクリメンタルサーチするAlfred 2 Workflow](http://qiita.com/o_ame/items/f23e75bfc11e9e7b3a08)に、ストックした投稿を検索するコマンドを追加した。
|
||||
|
||||

|
||||
|
||||
> [Githubリポジトリ](https://github.com/uetchy/alfred-qiita-workflow)から[ダウンロード](https://github.com/uetchy/alfred-qiita-workflow/archive/master.zip)
|
||||
|
||||
## 使い方
|
||||
|
||||
1. `qiita setup <username> <password>`でQiitaのアクセストークンを取得
|
||||
2. `qiita stocks <query>`でストックした記事の検索
|
||||
3. `qiita search <query>`で普通の検索
|
||||
|
||||
## まとめ
|
||||
|
||||
今度はRubyで書きなおして日本語も受け付けるように修正したので、需要はともかく個人的にかなり使いやすくなった気がする。
|
||||
|
||||
~~なお、このWorkflowはRuby 2.0.xで動作するので必然的にOS X Mavericksが必要になってくる。~~
|
||||
__Ruby 1.9.xでも動作するように書きなおしたので古いOS Xでも動くようになった。__
|
31
_posts/2014-03-14-rails-assets-cli.md
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
title: Rails Assetsのパッケージをコマンドラインから検索する
|
||||
date: 2014-03-14 09:00:00 +09:00
|
||||
---
|
||||
|
||||
[Rails Assets](https://rails-assets.org/) はBowerパッケージをBundlerで管理出来る便利なサービスである。
|
||||
|
||||
ウェブサイトにアクセスして、Rails Assetsに登録されているパッケージを検索するのは面倒なのでCLIから検索したい。そのためには`gem search --source {url}`オプションを利用したら良い。
|
||||
|
||||
```bash
|
||||
$ gem search {package-name} --source https://rails-assets.org | grep "^rails-assets-"
|
||||
```
|
||||
|
||||
`gem search` はsourceを指定しているにも関わらず RubyGems.org のパッケージも引っかかってしまうのでRails Assetsのプレフィックスで抽出している。
|
||||
|
||||
### シェルスクリプト
|
||||
|
||||
```bash:rails-assets.sh
|
||||
#!/bin/sh
|
||||
# Usage: rails-assets [package-name] [-a]
|
||||
|
||||
gem search $1 $2 --source https://rails-assets.org | grep "^rails-assets-"
|
||||
```
|
||||
|
||||
もっと簡単に、シェル関数を定義することも出来る。
|
||||
|
||||
```bash:~/.zshrc
|
||||
rails-assets(){
|
||||
gem search $1 $2 --source https://rails-assets.org | grep "^rails-assets-"
|
||||
}
|
||||
```
|
85
_posts/2014-05-30-dokku-with-dockland.md
Normal file
@ -0,0 +1,85 @@
|
||||
---
|
||||
title: Run dokku with Dockland
|
||||
date: 2014-05-30 00:00:00 Z
|
||||
---
|
||||
|
||||
ローカルからheroku-toolbeltライクにdokkuコマンドを叩くdockland gemをリリースした。
|
||||
|
||||
Github: [uetchy/dockland](https://github.com/uetchy/dockland)
|
||||
|
||||
## インストール方法
|
||||
|
||||
```bash
|
||||
gem install dockland
|
||||
```
|
||||
|
||||
## 使い方
|
||||
|
||||
### 普通のやり方
|
||||
|
||||
まずは普通にdokkuコマンドを叩く。
|
||||
|
||||
`ssh -t dokku@example.com <command> <app-name> <options>`でリモートのdokkuコマンドを直接叩ける。
|
||||
|
||||
```bash
|
||||
$ ssh -t dokku@example.com config:set sushi-app KEY1=VALUE
|
||||
-----> Setting config vars and restarting sushi-app
|
||||
KEY1: VALUE
|
||||
-----> Releasing sushi-app ...
|
||||
-----> Release complete!
|
||||
-----> Deploying sushi-app ...
|
||||
-----> Deploy complete!
|
||||
```
|
||||
|
||||
しかしこれではホスト名やアプリ名を毎回打ち込む羽目になって大変だ。
|
||||
|
||||
### docklandのやり方
|
||||
|
||||
docklandで同じことをやる。
|
||||
|
||||
```bash
|
||||
$ cd sushi-app # ローカルのプロジェクトリポジトリに移動
|
||||
|
||||
$ git config remote.dokku.url # プッシュ先を確認しておく
|
||||
dokku@example.com:sushi-app
|
||||
|
||||
$ dockland config:set KEY1=VALUE # 叩く時はコマンドとオプションだけ
|
||||
-----> Setting config vars and restarting sushi-app
|
||||
KEY1: VALUE
|
||||
-----> Releasing sushi-app ...
|
||||
-----> Release complete!
|
||||
-----> Deploying sushi-app ...
|
||||
-----> Deploy complete!
|
||||
|
||||
$ dockland config
|
||||
=== sushi-app config vars ===
|
||||
KEY1: VALUE
|
||||
```
|
||||
|
||||
このように dockland が `git config` をパースして必要な情報を自動で収集してくれるので、コマンドがシンプルになる。
|
||||
|
||||
ついでに、
|
||||
|
||||
```bash:.zshrc
|
||||
alias dokku='dockland'
|
||||
```
|
||||
|
||||
という具合にaliasを張っておけば、まるでリモートで`dokku`を実行している感覚でローカルから`dokku`コマンドを触ることが出来る。
|
||||
|
||||
```bash
|
||||
$ cd rails-app
|
||||
$ dokku logs
|
||||
[2014-05-29 15:38:56] INFO WEBrick 1.3.1
|
||||
[2014-05-29 15:38:56] INFO ruby 2.1.2 (2014-05-08) [x86_64-linux]
|
||||
[2014-05-29 15:38:56] INFO WEBrick::HTTPServer#start: pid=10 port=5000
|
||||
〜〜〜
|
||||
```
|
||||
|
||||
## 結論
|
||||
### 良い所
|
||||
|
||||
- リモートのdokkuコマンドを叩きたい時はプロジェクトのGitリポジトリに入ってdocklandコマンドを叩くだけで良い
|
||||
|
||||
### 悪いところ
|
||||
|
||||
- 実装が綺麗じゃないすぎる
|
48
_posts/2014-09-23-homebrew-osx-knp.md
Normal file
@ -0,0 +1,48 @@
|
||||
---
|
||||
title: HomebrewでmacOSに構文解析システムKNPを入れる
|
||||
date: 2014-09-23 09:00:00 +09:00
|
||||
---
|
||||
|
||||
HomebrewでmacOSに構文解析システムKNPをインストールします。
|
||||
|
||||
# 前提
|
||||
|
||||
OS X用のパッケージ管理ツール Homebrew がインストールされている必要がある。
|
||||
|
||||
インストール方法は[こちら](http://www.engineyard.co.jp/blog/2012/homebrew-os-xs-missing-package-manager/)
|
||||
|
||||
# インストール
|
||||
|
||||
デフォルトのHomebrewリポジトリにKNPは含まれていないので [homebrew-nlp](https://github.com/uetchy/homebrew-nlp) をtapする。
|
||||
|
||||
|
||||
```bash
|
||||
brew tap uetchy/nlp
|
||||
```
|
||||
|
||||
Tapし終わったら、`knp`をインストールする。knpが依存している形態素解析システム`juman`とデータベース`tinycdb`はHomebrewによって自動でインストールされる。その内の`juman`は上記の __oame/nlp__ Tapによって提供されている。
|
||||
|
||||
```bash
|
||||
brew install knp
|
||||
```
|
||||
|
||||
固有表現解析を行いたい場合は __--with-crf++__ オプションを付けてインストールする。このオプションを付けると、依存解決のために`crf++`も同時にインストールされる。
|
||||
|
||||
```bash
|
||||
brew install knp --with-crf++
|
||||
```
|
||||
|
||||
KNPのインストールにはありえないくらい時間が掛かる。
|
||||
|
||||
# チェック
|
||||
|
||||
インストールが終わったら動作チェックをする。
|
||||
|
||||
```bash
|
||||
$ juman < test.txt | knp
|
||||
# S-ID:1 KNP:4.11-CF1.1 DATE:2014/09/23 SCORE:-19.04210
|
||||
今日は──┐
|
||||
良い──┤
|
||||
天気です。
|
||||
EOS
|
||||
```
|
87
_posts/2014-10-27-brew-cask-downloader.md
Normal file
@ -0,0 +1,87 @@
|
||||
---
|
||||
title: homebrew-caskを単純なダウンローダーとして使う
|
||||
date: 2014-10-27 09:00:00 +09:00
|
||||
---
|
||||
|
||||

|
||||
|
||||
homebrew-caskを単純なダウンローダーとして使う。
|
||||
|
||||
# 理由
|
||||
|
||||
1. __pkg形式__ で配布されているアプリケーションはインストール時にオプションをカスタマイズ出来ることが多い。
|
||||
2. にも関わらず`brew cask install`を使うと、それらのオプションを選べずにインストールされてしまい悲しい。
|
||||
3. そこで、`brew cask`でfetchまでは自動化して、インストール自体は手動でやろう(スマートではないが。)
|
||||
|
||||
# 方法
|
||||
|
||||
## 準備
|
||||
|
||||
以下のようなシェルスクリプトを書いて、__/usr/local/bin/brew-smash__ など任意の実行パスに配置し、`chmod +x /path/to/brew-smash`等で実行権限を与える。
|
||||
|
||||
```bash:/usr/local/bin/brew-smash
|
||||
#!/bin/sh
|
||||
# Usage: brew smash app-name
|
||||
|
||||
if [ -z "$1" ] ; then
|
||||
echo "Usage: brew smash app-name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "Casks" ] ; then
|
||||
KEEP_CLEAN=true
|
||||
else
|
||||
KEEP_CLEAN=false
|
||||
fi
|
||||
|
||||
HOMEBREW_CACHE=. brew cask fetch "$1"
|
||||
|
||||
if [ "$KEEP_CLEAN" = true ] ; then
|
||||
rm -r "Casks"
|
||||
fi
|
||||
```
|
||||
|
||||
もしくは直接ダウンロードしても良い。
|
||||
|
||||
```bash
|
||||
$ curl https://gist.githubusercontent.com/uetchy/eb625f922eff16eb404b/raw/brew-smash.sh -o /usr/local/bin/brew-smash
|
||||
$ chmod +x /usr/local/bin/brew-smash
|
||||
```
|
||||
|
||||
## 実際に使う
|
||||
|
||||
以下のように`brew smash`コマンドを叩く
|
||||
|
||||
```bash
|
||||
$ brew smash send-to-kindle
|
||||
==> Fetching resources for Cask send-to-kindle
|
||||
==> Downloading https://s3.amazonaws.com/sendtokindle/SendToKindleForMac-installer-v1.0.0.220.pkg
|
||||
######################################################################## 100.0%
|
||||
==> Success! Downloaded to -> ./send-to-kindle-1.0.0.220.pkg
|
||||
```
|
||||
|
||||
# シェルスクリプトの解説
|
||||
|
||||
難しいことはやってないが、`brew cask fetch`コマンドはキャッシュ先に__Casks__ディレクトリを生成するので、それを除去している。また、元々カレントディレクトリにCasksという名前のディレクトリがある場合、それを削除してしまわないようにしている。
|
||||
|
||||
# 本当にやりたかったこと
|
||||
|
||||
こういう機能いれてくれ
|
||||
|
||||
```bash
|
||||
$ brew cask install virtualbox
|
||||
|
||||
==> Fetching resources for Cask virtualbox
|
||||
|
||||
==> Downloading http://download.virtualbox.org/virtualbox/4.3.18/VirtualBox-4.3.18-96516-OSX.dmg
|
||||
|
||||
###### ################################################################## 100.0%
|
||||
|
||||
==> Cask virtualbox has installation options
|
||||
|
||||
==> Do you need to install 'Oracle VM VirtualBox Command Line Utilities'? [y/n]
|
||||
|
||||
==> y
|
||||
|
||||
==> Success!
|
||||
```
|
59
_posts/2014-12-03-sketch-plugin-stickygrid-ja.md
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
title: Sketch 3 plugin 'StickyGrid'
|
||||
date: 2014-12-03 09:00:00 +09:00
|
||||
---
|
||||
|
||||
選択したシェイプのポイントをグリッドに吸い付かせるプラグインStickyGridを作りました。
|
||||
|
||||

|
||||
|
||||
Vectorツールで軽くスケッチしてからこのプラグインを適用することで、簡単に幾何学的なオブジェクトを作ることが出来る。
|
||||
|
||||

|
||||
|
||||
# インストール
|
||||
|
||||
[リリースページ](https://github.com/uetchy/Sketch-StickyGrid/releases/latest)からzipアーカイブをダウンロードし、__StickyGrid.sketchplugin__ をダブルクリックしてインストールする。
|
||||
|
||||
もし、より_CLI-way_がお好みであれば、以下のコマンドでもインストールすることが出来る。
|
||||
|
||||
```bash
|
||||
cd $HOME/Library/Application Support/com.bohemiancoding.sketch3/Plugins
|
||||
git clone https://github.com/uetchy/Sketch-StickyGrid.git
|
||||
```
|
||||
|
||||
# 使い方
|
||||
|
||||
吸い付かせたいシェイプを1つ、または複数選択して __`ctrl` + `⌘` + `G`__ を押すと、パスがグリッドの交差点に吸い付く。
|
||||
|
||||
ショートカット以外にも、メニューから__Plugins > Sketch-StickyGrid > Snap to Grid__を選んでも良い。
|
||||
|
||||
シェイプはもちろん、グルーピングされたシェイプも、逆にシェイプポイントだけでも吸い付く。
|
||||
|
||||

|
||||
|
||||
# プラグインの開発にあたって
|
||||
|
||||
## プラグインのデバッグ
|
||||
|
||||
デバッギングには[Sketch-DevTools](https://github.com/turbobabr/sketch-devtools)を使っていましたが、最新版のSketchでは使えなくなってしまった。
|
||||
|
||||
その代わりにMac標準アプリの __Console.app__ を使う方法が公式デベロッパーサイトの記事 [Debugging - Sketch Developer](http://developer.sketchapp.com/code-examples/debugging/) で紹介されている。
|
||||
|
||||
スクリプト内で`log`関数を呼び出すと、Console.appにログが出力される。
|
||||
|
||||
```js
|
||||
log(context.document.gridSize);
|
||||
```
|
||||
|
||||
## ドキュメントの情報源
|
||||
|
||||
ドキュメントは公式デベロッパーサイト [Sketch Developer](http://developer.sketchapp.com) があるものの、パス編集に関するドキュメントは全くなかった。
|
||||
|
||||
そこで、[class-dump](http://stevenygard.com/projects/class-dump/) を使って Sketch.app のヘッダーファイルを抽出し、ひたすら __目grep__ をしてシェイプ操作とグリッドに関するAPIを探し出し、プラグインの実装に役立てた。
|
||||
|
||||
また、先人によって公開されている数多のSketchプラグインのソースを見ることも、開発の助けになった。
|
||||
|
||||
# 結論
|
||||
|
||||
苦行僧じみたSketchプラグインの開発には __class-dump__ と __Console.app__ が必携。
|
59
_posts/2014-12-03-sketch-plugin-stickygrid.md
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
title: Sketch 3 plugin 'StickyGrid'
|
||||
date: 2014-12-03 09:00:00 +09:00
|
||||
---
|
||||
|
||||
For practicing Sketch plugin development, I created __StickyGrid__ to let shape points sticked with grids.
|
||||
|
||||

|
||||
|
||||
Draw something in rough and apply this plugin then you'll get geometric shapes at ease.
|
||||
|
||||

|
||||
|
||||
# How to install
|
||||
|
||||
From [GitHub releases](https://github.com/uetchy/Sketch-StickyGrid/releases/latest), Download a zipped archive then unarchive it then double click __StickyGrid.sketchplugin__ so you are prepared for using StickyGrid.
|
||||
|
||||
Loving _CLI-way_ than anything, You also want to run those commands to get the same thing.
|
||||
|
||||
```bash
|
||||
cd $HOME/Library/Application Support/com.bohemiancoding.sketch3/Plugins
|
||||
git clone https://github.com/uetchy/Sketch-StickyGrid.git
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
At first, selecting __`ctrl` + `⌘` + `G`__ を押すと、パスがグリッドの交差点に吸い付く。
|
||||
|
||||
ショートカット以外にも、メニューから__Plugins > Sketch-StickyGrid > Snap to Grid__を選んでも良い。
|
||||
|
||||
シェイプはもちろん、グルーピングされたシェイプも、逆にシェイプポイントだけでも吸い付く。
|
||||
|
||||

|
||||
|
||||
# プラグインの開発にあたって
|
||||
|
||||
## プラグインのデバッグ
|
||||
|
||||
デバッギングには[Sketch-DevTools](https://github.com/turbobabr/sketch-devtools)を使っていましたが、最新版のSketchでは使えなくなってしまった。
|
||||
|
||||
その代わりにMac標準アプリの __Console.app__ を使う方法が公式デベロッパーサイトの記事 [Debugging - Sketch Developer](http://developer.sketchapp.com/code-examples/debugging/) で紹介されている。
|
||||
|
||||
スクリプト内で`log`関数を呼び出すと、Console.appにログが出力される。
|
||||
|
||||
```js
|
||||
log(context.document.gridSize);
|
||||
```
|
||||
|
||||
## ドキュメントの情報源
|
||||
|
||||
ドキュメントは公式デベロッパーサイト [Sketch Developer](http://developer.sketchapp.com) があるものの、パス編集に関するドキュメントは全くなかった。
|
||||
|
||||
そこで、[class-dump](http://stevenygard.com/projects/class-dump/) を使って Sketch.app のヘッダーファイルを抽出し、ひたすら__目grep__をしてシェイプ操作とグリッドに関するAPIを探し出し、プラグインの実装に役立てた。
|
||||
|
||||
また、先人によって公開されている数多のSketchプラグインのソースを見ることも、開発の助けになった。
|
||||
|
||||
# 結論
|
||||
|
||||
苦行僧じみたSketchプラグインの開発には__class-dump__と__Console.app__が必携。
|
175
_posts/2014-12-16-myo-armband.md
Normal file
@ -0,0 +1,175 @@
|
||||
---
|
||||
title: Take control of Chrome with Myo Armband
|
||||
date: 2014-12-16 09:00:00 +09:00
|
||||
---
|
||||
|
||||
Thalmic LabsのMYOアームバンドが届いたのでGoogle Chromeをマイノリティ・リポートっぽいジェスチャーで操作するMyo Scriptsを書いてみる。
|
||||
|
||||
### 主な情報源
|
||||
|
||||
- <https://developer.thalmic.com/start/>
|
||||
- <https://www.thalmic.com/blog/tag/myo-scripting-basics/>
|
||||
- <https://developer.thalmic.com/docs/api_reference/platform/script-tutorial.html>
|
||||
|
||||
# 基本
|
||||
|
||||
Luaで記述し、拡張子は__.myo__を使う。
|
||||
|
||||
作成したスクリプトはMyo Connectを経由してアームバンドとやりとりをすることになる。
|
||||
|
||||
> デバッグコマンドとして`myo.debug(obj)`が用意されている。
|
||||
|
||||
## scriptId
|
||||
|
||||
スクリプトを識別するための`scriptId`は必ず書かなければならない。
|
||||
|
||||
```lua
|
||||
scriptId = 'co.randompaper.myo.chrome'
|
||||
```
|
||||
|
||||
## onForegroundWindowChange(app, title)
|
||||
|
||||
```lua
|
||||
function onForegroundWindowChange(app, title)
|
||||
return app == "com.google.Chrome"
|
||||
end
|
||||
```
|
||||
|
||||
onForegroundWindowChangeの返り値が__true__の場合、スクリプトをアクティブにする。つまり上のように書けばGoogle Chromeのウィンドウが最前面に出ている時だけスクリプトを有効化させることが出来る。
|
||||
|
||||
いかなる状況でもジェスチャーをハンドルしたい場合は以下のように書く。
|
||||
|
||||
```lua
|
||||
function onForegroundWindowChange(app, title)
|
||||
return true
|
||||
end
|
||||
```
|
||||
|
||||
実際には、__親指と中指でダブルタップ__ するジェスチャーを検知した後に、全てのMyo ScriptsのonForegroundWindowChangeを呼び出している。そしてtrueが返ってきたスクリプトのみを実行している。
|
||||
|
||||
アクティブになったスクリプトは一定時間が経過してアームバンドがロックされるまでイベントハンドラーが呼ばれ続ける。
|
||||
|
||||
## onPoseEdge(pose, edge)
|
||||
|
||||
スクリプトがアクティブになっている間に行われたジェスチャーをハンドルするメソッド。
|
||||
|
||||
```lua
|
||||
function onPoseEdge(pose, edge)
|
||||
if pose == 'fist' and edge == 'on' then
|
||||
myo.debug("グー")
|
||||
elseif pose == 'fist' and edge == 'off' then
|
||||
myo.debug("グーじゃなくなった")
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
### poseの種類
|
||||
|
||||
|pose|意味|
|
||||
|----|---|
|
||||
|rest|安静時|
|
||||
|fist|握り拳|
|
||||
|fingersSpread|手を開く|
|
||||
|waveIn|手首を手前に曲げる|
|
||||
|waveOut|手首を手前とは逆に曲げる|
|
||||
|doubleTap|中指と親指でダブルタップ|
|
||||
|unknown|判別不能|
|
||||
|
||||
## onPeriodic()
|
||||
|
||||
```lua
|
||||
function onPeriodic()
|
||||
roll = myo.getRoll()
|
||||
myo.debug(roll)
|
||||
end
|
||||
```
|
||||
|
||||
onPeriodicはスクリプトがアクティブな間ずっと呼ばれ続ける。常にアームバンドのジャイロ情報を取得してなんやかんやしたい時に使う。
|
||||
|
||||
# 実装
|
||||
|
||||
以上のハンドラーを駆使し作ってみる。
|
||||
今回のようにGoogle Chromeのスクロール操作をアームバンドのジェスチャーでやりたい場合、__onPeriodic__ で`myo.getRoll()`メソッドを呼び出せば手首の回転する角度を取得出来るわけである。しかし、そのまま__onPeriodic__上にスクロールを行うコードを続けて書くと常にアームバンドの傾き具合でスクロールされてしまい困る。
|
||||
|
||||
そこで、「握り拳を握っている間だけ手首の傾きによってウェブページをスクロールさせる」ようにする。
|
||||
|
||||
## 握り拳を握っている間だけ手首の傾きによってウェブページをスクロールさせる
|
||||
|
||||
初めにグローバルで `enableScroll` 変数を宣言し、falseで初期化する。
|
||||
|
||||
```lua
|
||||
enableScroll = false
|
||||
```
|
||||
|
||||
そして、onPoseEdgeに握り拳が握られるとenableScrollをtrueに、戻るとfalseにするコードを書く。
|
||||
|
||||
```lua
|
||||
function onPoseEdge(pose, edge)
|
||||
if pose == 'fist' and edge == 'on' then
|
||||
enableScroll = true
|
||||
elseif pose == 'fist' and edge == 'off' then
|
||||
enableScroll = false
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
最後に onPeriodic で手首の角度を取得してキーボードの↑か↓を連打するコードを書く。
|
||||
|
||||
```lua
|
||||
function onPeriodic()
|
||||
if enableScroll then
|
||||
roll = myo.getRoll()
|
||||
|
||||
key = ''
|
||||
|
||||
if roll < -0.05 then
|
||||
key = 'up_arrow'
|
||||
elseif roll > 0.05 then
|
||||
key = 'down_arrow'
|
||||
end
|
||||
|
||||
if key ~= '' then
|
||||
myo.keyboard(key, 'press')
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
実際にこのスクリプトを動かしてみると上手くスクロールしない。myo.getRoll()で取得した角度は絶対的な角度だからだ。握り拳が作られた瞬間の角度を0として扱った方がプログラムの見通しも良くなる。
|
||||
|
||||
そこで新たにinitRoll変数をグローバルで宣言する。そしてonPoseEdgeを以下のように修正する。
|
||||
|
||||
```lua
|
||||
function onPoseEdge(pose, edge)
|
||||
if pose == 'fist' and edge == 'on' then
|
||||
initRoll = myo.getRoll()
|
||||
enableScroll = true
|
||||
elseif pose == 'fist' and edge == 'off' then
|
||||
enableScroll = false
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
続けてonPeriodicの
|
||||
|
||||
```lua
|
||||
roll = myo.getRoll()
|
||||
```
|
||||
|
||||
を、
|
||||
|
||||
```lua
|
||||
roll = myo.getRoll() - initRoll
|
||||
```
|
||||
|
||||
に修正する。
|
||||
|
||||
これで、絶対角度を握り拳が握られた瞬間の手首の角度を0とする相対角度を取得出来る。
|
||||
|
||||
実際に動くスクリプトをGithubで[公開している](https://github.com/uetchy/myo-scripts)。
|
||||
|
||||
### 番外編
|
||||
|
||||
Myo C++ SDKを使ってアイアンマンみたいなジェスチャーでレーザーガンを撃った気分になれるアプリを作った。
|
||||
|
||||
[uetchy/myo-gun](https://github.com/uetchy/myo-gun)
|
32
_posts/2015-02-26-cabocha-on-rubygems.md
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
title: CaboCha on RubyGems
|
||||
date: 2015-02-26 00:00:00 Z
|
||||
---
|
||||
|
||||
日本語係り受け解析器CaboChaのRubyバインディング [cabocha-ruby](https://github.com/uetchy/cabocha-ruby) をリリースした。とは言っても [公式](https://code.google.com/p/cabocha/) のSWIGバインディングをベースにしたものだ。
|
||||
|
||||
## 導入
|
||||
|
||||
```bash
|
||||
gem install cabocha
|
||||
```
|
||||
|
||||
でインストール出来る。
|
||||
> cabocha-ruby をインストールする前に、CaboCha を`brew install cabocha`かなんかでインストールしておかないとmakeが失敗するので注意すること。
|
||||
|
||||
## 使う
|
||||
|
||||
requireする時は`require "cabocha"`と`require "CaboCha"`、どちらを使っても正しい。
|
||||
|
||||
```ruby
|
||||
require "cabocha"
|
||||
|
||||
parser = CaboCha::Parser.new
|
||||
tree = parser.parse("太郎は次郎に本を貸した")
|
||||
|
||||
p tree
|
||||
```
|
||||
|
||||
これまでソースコードをダウンロードし`ruby extconf.rb && make install`していたのが、これからは`gem install cabocha`で済むようになる。
|
||||
|
||||
バグを見つけたら [Pull request](https://github.com/uetchy/cabocha-ruby/pulls) を送ってほしい。
|
110
_posts/2015-02-26-gulp-decomposer-bower-import.md
Normal file
@ -0,0 +1,110 @@
|
||||
---
|
||||
title: 'gulp + decomposer: Best way to sassy-@import bower components'
|
||||
date: 2015-02-26 00:00:00 Z
|
||||
---
|
||||
|
||||
gulp + Browserify(+ debowerify)という構成でWebサイトを作っていると、SASSにもdebowerify相当のものが欲しくなってくる。
|
||||
|
||||
ちなみに、__debowerify__ というのは、
|
||||
|
||||
```js
|
||||
var Velocity = require("velocity");
|
||||
```
|
||||
|
||||
というJavaScriptを、
|
||||
|
||||
```js
|
||||
var Velocity = require("./../../bower_components/velocity/velocity.js");
|
||||
```
|
||||
|
||||
という風に、bower_components内のパスに解決してくれるBrowserify transformだ。
|
||||
欲しいのはこれのSASS版。
|
||||
|
||||
「あったらいいのにな〜」と思うようなライブラリはGithubで検索すれば必ず出てくる。はずだったが、無かった。
|
||||
|
||||
そこで [decomposer](https://www.npmjs.com/package/decomposer) というgulpプラグインを作った。
|
||||
|
||||
# 使い方
|
||||
|
||||
まずは`npm install --save-dev gulp gulp-sass decomposer`で必要なものをインストールしておく。既存のプロジェクトに追加するならdecomposerだけでいい。
|
||||
|
||||
__gulpfile.js__ はこのように定義しておく。
|
||||
|
||||
```js
|
||||
var gulp = require('gulp');
|
||||
var sass = require('gulp-sass');
|
||||
var decomposer = require('decomposer');
|
||||
|
||||
gulp.task('styles', function() {
|
||||
gulp.src('src/styles/**/*.sass')
|
||||
.pipe(decomposer())
|
||||
.pipe(sass({indentedSyntax: true}))
|
||||
.pipe(gulp.dest('dist/css'));
|
||||
});
|
||||
```
|
||||
|
||||
ポイントは`sass` __よりも前__ に`decomposer`を挟むこと。なぜなら、外部から@importしたmix-insや変数はSASSコンパイル時に解決されるからだ。`sass`よりも後に置くと、SASSが@importを解決出来ずにエラーが発生する。
|
||||
|
||||
続けてSASSを書こう。
|
||||
|
||||
```scss
|
||||
@import normalize.sass
|
||||
@import styles/font
|
||||
|
||||
body
|
||||
font-family: $ff-gothic
|
||||
```
|
||||
|
||||
> `$ff-gothic`は [uetchy/styles](https://github.com/uetchy/styles) の _font.sass_ で定義されているfont-familyだ。
|
||||
|
||||
最後にBowerを使って必要なアセットをインストールする。
|
||||
|
||||
```bash
|
||||
bower i --save normalize.sass
|
||||
bower i --save uetchy/styles
|
||||
```
|
||||
|
||||
これで完成。後は`gulp styles`を実行するだけだ。
|
||||
|
||||
# ファイルパス解決時のポイント
|
||||
|
||||
decomposer はBowerモジュールに入っている任意のファイルを指定して@importすることが出来る。
|
||||
記法はこのようになる。
|
||||
|
||||
```scss
|
||||
@import [Bowerモジュール名]/[ファイル名]
|
||||
```
|
||||
|
||||
例えば、よく使うスタイルをまとめた [uetchy/styles](https://github.com/uetchy/styles) の___font.sass__ を@importするなら、
|
||||
|
||||
```scss
|
||||
@import styles/font
|
||||
```
|
||||
|
||||
と書ける。
|
||||
ここでもし`@import styles`と、ファイル名を省略して書くとどうなるのだろうか? コンパイルに失敗する? そんなことはない。
|
||||
|
||||
モジュール名だけを書くと、decomposerは__bower.json__に書かれているmainファイルを見つけ出して、それを@importしてくれるのだ。
|
||||
|
||||
もしmainファイルが複数指定されていたら、`index.sass`や`[モジュール名].sass`、または__mainっぽい名前__ を持つファイルを@importする。
|
||||
|
||||
つまり、
|
||||
|
||||
```scss
|
||||
@import normalize.sass
|
||||
```
|
||||
|
||||
と書けば、
|
||||
|
||||
```scss
|
||||
@import ../bower_components/normalize.sass/normalize.sass
|
||||
```
|
||||
|
||||
という風に解決される。
|
||||
|
||||
# まとめ
|
||||
|
||||
これでスタイルの@importをすっきり書けるようになった。
|
||||
とはいえ、component対応やPlain CSSのインライン展開や.less対応など、追加したい機能は色々ある。
|
||||
|
||||
もしContributionに興味があるなら、[Githubリポジトリ](https://github.com/uetchy/decomposer)をフォークしてほしい。
|
59
_posts/2015-03-10-create-icns-from-sketch.md
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
title: Create .icns from .sketch
|
||||
date: 2015-03-10 09:00:00 +09:00
|
||||
---
|
||||
|
||||

|
||||
|
||||
Gulpをつかって .sketch から .icns を生成するために、[gulp-sketch](https://github.com/cognitom/gulp-sketch) の出力結果を.icnsへ変換する [gulp-iconutil](https://github.com/uetchy/gulp-iconutil) というプラグインを作りました。
|
||||
|
||||
# はじめに
|
||||
|
||||
.icns を作るには様々なサイズのアイコン画像を格納した __iconset__ をつくり、それを `iconutil` に渡します。ここで面倒なのは iconset です。
|
||||
|
||||
iconset の作成には16×16 ... 512×512の6種類のサイズのアイコンと、さらにそれぞれのRetina用のアイコンも加えて、計12種類ものサイズの画像が必要です。
|
||||
|
||||
唯一の救いは、最大サイズの画像だけ用意しておけば、不足している小さいサイズの画像は`iconutil`が自動で生成するということでしょう。
|
||||
|
||||
今回作った [gulp-iconutil](https://www.npmjs.com/package/gulp-iconutil) は、Gulpからこの`iconutil`コマンドへの橋渡しをしてくれます。
|
||||
|
||||
# アイコンをデザインする
|
||||
|
||||
Sketch上に512×512サイズのアートボードを作成し、アプリのアイコンをデザインします。
|
||||
|
||||

|
||||
|
||||
> Dock上でアイコンの見栄えをチェックするために、[sketch-dockpreview](https://github.com/fnky/sketch-dockpreview)を使っています。これは本当に便利なプラグインです。
|
||||
|
||||
# .sketch から .icns へ
|
||||
|
||||
.sketchからiconsetを作成するために、[gulp-sketch](https://github.com/cognitom/gulp-sketch) を、そして iconset から .icns へ変換するために今回作った [gulp-iconutil](https://www.npmjs.com/package/gulp-iconutil) を使います。npm からインストール出来ます。
|
||||
|
||||
Gulpタスクは以下のように書きます。
|
||||
|
||||
```coffee
|
||||
gulp = require 'gulp'
|
||||
sketch = require 'gulp-sketch'
|
||||
iconutil = require 'gulp-iconutil'
|
||||
|
||||
gulp.task 'icons', ->
|
||||
gulp.src 'icons/sketch/*.sketch'
|
||||
.pipe sketch
|
||||
export: 'artboards'
|
||||
formats: 'png'
|
||||
scales: '1.0,2.0'
|
||||
.pipe iconutil('app.icns')
|
||||
.pipe gulp.dest 'icons/'
|
||||
```
|
||||
|
||||
iconsタスクを実行すると、iconsフォルダの中に__app.icns__が生成されます。
|
||||
|
||||

|
||||
|
||||
Electronアプリ開発者はこのアイコンファイルをOS X向けビルドにそのまま使えます。
|
||||
|
||||
# まとめ
|
||||
|
||||
デザインデータのポストプロセスの自動化がGulpとsketchtoolのおかげでやりやすくなりました。
|
||||
|
||||
[gulp-iconutil](https://github.com/uetchy/gulp-iconutil) は今週リリースしたばかりで若干不安定なので、もしバグを見つけたら[Issue](https://github.com/uetchy/gulp-iconutil/issues)を作るか、[PR](https://github.com/uetchy/gulp-iconutil/pulls)を投げてください!
|
14
_posts/2015-07-05-hugo-paper.md
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
title: 'Hugo Paper: well-simplified theme for Hugo'
|
||||
date: 2015-07-05 00:00:00 Z
|
||||
---
|
||||
|
||||
When I created my blog, there are no well simplified [Hugo](http://gohugo.io) theme around the world. I need to a theme that just don't interrupt reading experience. [Hugo Paper](https://github.com/uetchy/hugo-paper) is made for that.
|
||||
|
||||
# How to integrate
|
||||
|
||||
Just run following oneliner and you will be ready to start using Hugo Paper.
|
||||
|
||||
```bash
|
||||
$ git submodule add https://github.com/uetchy/hugo-paper.git themes/hugo-paper && git submodule update
|
||||
```
|
40
_posts/2015-09-07-alfred-qiita-workflow-in-go.md
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Alfred Qiita Workflow in Go
|
||||
date: 2015-09-07 00:00:00 Z
|
||||
---
|
||||
|
||||

|
||||
|
||||
Rubyで書かれている [Alfred Qiita Workflow](https://github.com/uetchy/alfred-qiita-workflow) を[バグ修正](https://github.com/uetchy/alfred-qiita-workflow/issues/3)のついでにGoで書き直した。
|
||||
|
||||
Qiita API v2に対応し、ユーザー名とパスワードの代わりとして、[Personal Access Token](https://qiita.com/settings/tokens/new)を使い始めた。
|
||||
|
||||
これで、ストックした記事や自分で書いた記事を検索することがより気軽に出来る。
|
||||
|
||||
Alfredに返却するXMLの生成には[go-alfred](https://github.com/pascalw/go-alfred)というライブラリを利用した。
|
||||
|
||||
## go-qiita
|
||||
|
||||
Alfred Qiita Workflow の APIクライアント部分を切り出して [go-qiita](https://github.com/uetchy/go-qiita) としてリリースした。Workflowで必要だった部分しか実装してないが、記事の検索など基本的なことは出来る。
|
||||
|
||||
設計はGoogleの [go-github](https://github.com/google/go-github) を参考にしている。クライアントの初期化時に、以下のようにhttp.Client互換のInterfaceを渡してやれば、それを経由して通信するようになっている。
|
||||
|
||||
```go
|
||||
// Personal Access Tokenを使ったOAuth2クライアントを作る
|
||||
ts := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: "personal access token"})
|
||||
tc := oauth2.NewClient(oauth2.NoContext, ts)
|
||||
|
||||
// OAuth2クライアントをgo-qiitaに引き渡す
|
||||
client := qiita.NewClient(tc)
|
||||
|
||||
// 今までに書いた記事を取得
|
||||
items, _, _ := client.AuthenticatedUser.Items()
|
||||
```
|
||||
|
||||
このようにすることで、APIクライアントは認証系を気にせずAPIサーバーとのやりとりを考えることが出来る。このやり方はかなりスマートだと思うのでもっと流行って欲しい。
|
||||
|
||||
ちなみに認証をしない場合は`NewClient()`に`nil`を渡せばよい。
|
||||
|
||||
```go
|
||||
client := qiita.NewClient(nil)
|
||||
```
|
10
_posts/2015-12-07-wallpaper-for-simple-desktop.md
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
title: Wallpapers for simple desktop
|
||||
date: 2015-12-07 09:00:00 +09:00
|
||||
---
|
||||
|
||||

|
||||
|
||||
[There are](/wallpaper) desktop wallpapers by [Sketch](https://www.sketchapp.com/).
|
||||
|
||||
You can download all of them and use it for personal use.
|
52
_posts/2015-12-16-atom-package-diff.md
Normal file
@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Gluing Installed Atom Packages and apm Stars Together
|
||||
date: 2015-12-16 00:00:00 Z
|
||||
---
|
||||
|
||||
Atomにインストールしているパッケージと[Atom.io](https://atom.io/packages)上のスターを同期するCLIツール [Atom Package Diff](https://www.npmjs.com/package/atom-package-diff) を公開した。
|
||||
|
||||
# 導入
|
||||
|
||||
npm経由でインストールする。
|
||||
|
||||
```bash
|
||||
$ npm install -g atom-package-diff
|
||||
```
|
||||
|
||||
# インストール済みパッケージとスターのdiff
|
||||
|
||||
`apd status`コマンドでインストール済みパッケージとスターしているパッケージのdiffを見ることができる。
|
||||
|
||||
```bash
|
||||
$ apd status
|
||||
36 packages installed
|
||||
30 packages starred
|
||||
|
||||
# Packages only in apm
|
||||
project-manager react
|
||||
|
||||
# Packages only in local machine
|
||||
Sublime-Style-Column-Selection atom-fuzzy-grep douglas language-babel language-ini language-swift term3 travis-ci-status
|
||||
```
|
||||
|
||||
# 同期
|
||||
|
||||
`apd sync --local`を実行すると、インストール済みパッケージを全部`apm star`し、それ以外を`apm unstar`する。
|
||||
|
||||
`apd sync --remote`でその逆の処理を行う。つまり、スターされているパッケージを全部インストールし、それ以外をアンインストールする。
|
||||
|
||||
```bash
|
||||
$ apd sync --local
|
||||
Unstaring ... project-manager
|
||||
Unstaring ... react
|
||||
Staring ... Sublime-Style-Column-Selection
|
||||
Staring ... atom-fuzzy-grep
|
||||
Staring ... douglas
|
||||
Staring ... language-babel
|
||||
Staring ... language-ini
|
||||
Staring ... language-swift
|
||||
Staring ... term3
|
||||
Staring ... travis-ci-status
|
||||
```
|
||||
|
||||
ソースコードは [Github](uetchy/atom-package-diff) で公開している。
|
154
_posts/2016-01-24-essentials-for-new-macbook.md
Normal file
@ -0,0 +1,154 @@
|
||||
---
|
||||
title: Essentials for New MacBook
|
||||
date: 2016-01-24 09:00:00 +09:00
|
||||
---
|
||||
|
||||

|
||||
|
||||
新しいMacBookを買ったので、普段使っているアプリの整理も兼ねて、幾つかポリシーを決めてセットアップすることにしました。
|
||||
|
||||
## 1. シンプル
|
||||
|
||||
インストールするアプリは最低限必要なものにしました。コンパクトにまとめると気持ちがいいですし、常駐するアプリを増やしてもバッテリーに悪いです。
|
||||
|
||||
## 2. デフォルト重視
|
||||
|
||||
なるべくデフォルトで用意されているものを使います。カスタマイズもOS X標準機能の範囲内で行います。
|
||||
|
||||
# 使っているアプリ
|
||||
|
||||
## [Homebrew](http://brew.sh)
|
||||
|
||||
OS X向けのパッケージマネージャーです。
|
||||
|
||||
## Atom
|
||||
|
||||
Sublime Textも良いのですが、やはりターミナルやGitが一画面で使えるのはMacBookのフルスクリーンアプリに合っています。
|
||||
|
||||
## LaunchControl
|
||||
|
||||
`launchctl`のGUI版です。変なAgentが差し込まれていることがあるので、たまにチェックしています。
|
||||
|
||||
## [Papers](http://papersapp.com/mac/)
|
||||
|
||||
論文を管理するためのアプリです。これがベストと言えるわけではないですが、数ある中では一番使えます。
|
||||
|
||||
## [Typora](http://www.typora.io)
|
||||
|
||||

|
||||
|
||||
これまで様々な Markdown エディタを試してきましたが、どれもエディタとプレビューが分離しているUIを採用しており、それが私には不合理に思えて仕方がありませんでした。
|
||||
|
||||
Typora は入力した記法がリアルタイムに反映されるので直感的に文章を書くことが出来ます。 加えてGithub Flavored Markdown、MathJax、Mermaidなどのシーケンス図に対応しており、何気にニッチな需要を攻めている、小粋なアプリです。
|
||||
|
||||
## [⌘英かな](https://ei-kana.appspot.com)
|
||||
|
||||
US配列キーボードの左右⌘を英かなに割り振ることが出来るアプリです。実装がシンプルで軽量です。アイコンをデザインしてPull-requestを送ったらマージしてくれました。
|
||||
|
||||
## [Paw](https://paw.cloud/)
|
||||
|
||||
Web APIを作りたい時に使えます。無くても困りませんが、あると便利です。
|
||||
|
||||
## [Dash](https://kapeli.com/dash)
|
||||
|
||||
API ドキュメントを素早く検索出来るアプリです。
|
||||
|
||||
無いと困るようなアプリではありませんが、遅いWi-Fiに繋いでいる場合でも素早くドキュメントを閲覧できるので外で作業するならあると便利でしょう。
|
||||
|
||||
## [Tower](http://www.git-tower.com)
|
||||
|
||||
Git の GUI クライアントです。
|
||||
|
||||
> より軽量なクライアントの[GitUp](http://gitup.co)も気になっています。
|
||||
|
||||
## [Google Chrome](https://www.google.com/chrome/browser/desktop/index.html)
|
||||
|
||||
普段はSafariを使っていますが、Chromeでしか動かない前時代的なWebサービスを使う時や、Webアプリケーションをデバッグする時のために入れました。
|
||||
|
||||
## Xcode
|
||||
|
||||
iOSアプリを作るときに必要なので入れました。
|
||||
|
||||
gccやGitなど、基本的なビルドツールチェインが必要な場合、Xcodeをインストールする代わりに `sudo xcode-select —install` でそれらを導入できます。
|
||||
|
||||
## [ForkLift 3] (http://www.binarynights.com/forklift/)
|
||||
|
||||
SFTPサーバーやS3に接続するためのアプリです。接続したサーバーのディレクトリをFinderにマウントする機能があるので、ローカルで普通にファイルを扱う感覚でリモートのファイルをやりとり出来ます。Transmitから乗り換えました。
|
||||
|
||||
## [Kaleidoscope](http://www.kaleidoscopeapp.com)
|
||||
|
||||
さすがに標準のFileMergeだと機能不足が否めないので。
|
||||
|
||||
## [Sketch](https://www.sketchapp.com)
|
||||
|
||||
Bohemian Coding が開発しているベクターデザインツールです。アイコンやUIをデザインする時に使っています。
|
||||
|
||||
## RightFont
|
||||
|
||||
フォント管理アプリです。FontCase、FontExplorer X Proなどを使ってきましたが、今はこれに落ち着いています。Google FontsやTypeKitに対応しており、またアイコンフォントを一覧できる機能が便利です。
|
||||
|
||||
## Adobe Creative Cloud
|
||||
|
||||
Affinityシリーズに乗り換えたので、今はIllustratorとTypeKitを使うために入れています。
|
||||
|
||||
## [Dropbox](https://www.dropbox.com)
|
||||
|
||||
ファイルの同期が出来ます。iCloud Drive も検討しましたが、削除したデータの復活に手間取るので見送りました。
|
||||
|
||||
## 1Password
|
||||
|
||||
パスワードマネージャーです。2要素認証のトークンもまとめて管理できます。
|
||||
|
||||
## f.lux
|
||||
|
||||
iOSのNight ShiftをmacOSに持ってきたようなアプリです。長時間の作業でも目が痛くなりません。
|
||||
|
||||
## Reeder
|
||||
|
||||
RSSリーダーです。Feedly Web版でも良いですが、Readability機能が便利なので使っています。
|
||||
|
||||
## [AppCleaner](https://freemacsoft.net/appcleaner/)
|
||||
|
||||
アプリを設定ファイルごとまとめて消せます。潔癖性なので、これが無いと不安にな李ます。
|
||||
|
||||
## [Pocket](https://getpocket.com)
|
||||
|
||||
「あとで読む」を管理するためのアプリです。Reading Listでもいいと思うので好みですね。
|
||||
|
||||
## [TripMode](https://www.tripmode.ch)
|
||||
|
||||
通信出来るアプリを個別に許可できます。外出先でテザリングをする際にTripModeがあれば、データ制限を気にせずインターネット接続ができるので便利です。
|
||||
|
||||
# 導入を見送ったもの
|
||||
|
||||
## [Clear](http://realmacsoftware.com/clear/)
|
||||
|
||||
タスク管理アプリ。標準の Reminders.app に移行しました。
|
||||
|
||||
## [Evernote](https://evernote.com/intl/jp/)
|
||||
|
||||
Notes.appに移行しました。
|
||||
|
||||
## Flash
|
||||
|
||||
ニコニコ動画が見れなくなるので泣く泣く導入していましたが、公式でHTML5に対応したので不要になりました。
|
||||
|
||||
## [VirtualBox](https://www.virtualbox.org)
|
||||
|
||||
仮想環境を構築するためのアプリです。[Docker Machine](https://docs.docker.com/machine/)と組み合わせていましたが、Docker for Macの登場によって不要になりました。
|
||||
|
||||
## Karabiner
|
||||
|
||||
US配列キーボードのCommandキーを英かなに振り分けるため、Karabinerを使っていましたが、よりシンプルで軽量な[⌘英かな](https://ei-kana.appspot.com)に移行しました。
|
||||
|
||||
## Seil
|
||||
|
||||
US配列のcaps lockキーをCtrlキーへ変更するために使っていましたが、いつからかmacOS標準で出来るようになっていたので不要になりました。
|
||||
|
||||
## Google 日本語入力
|
||||
|
||||
最近のOS標準のIMに搭載されているライブ変換機能が優秀なので、あえてサードパーティのIMを入れる必要性がなくなりました。
|
||||
|
||||
## Alfred
|
||||
|
||||
便利そうなワークフローを色々入れても、実際に使う頻度はあまり高くないことに気がつき、この際なのでSpotlightに切り替えました。
|
22
_posts/2016-02-11-polyglot-extension-for-safari.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
title: Polyglot Extension for Safari
|
||||
date: 2016-02-11 00:00:00 Z
|
||||
---
|
||||
|
||||

|
||||
|
||||
選択したテキストを翻訳できる Safari Extension を作った。[Polyglot](https://github.com/uetchy/Polyglot) を使えば、選択した文章や、フォームに入力したテキストをその場で好きな言語に翻訳してみせることが出来る。
|
||||
|
||||

|
||||
|
||||
この Extension は __Google Translate API__ を使っている。だからこれを Safari で使うためには、まず Google Cloud Platform から APIキーを手に入れなくてはならない。その手続きは少しばかり面倒なので、[スクリーンショット付きのガイド](https://github.com/uetchy/Polyglot/wiki/How-to-obtain-Google-Cloud-Platform-API-key)を作った。
|
||||
|
||||
## Inside Safari Extension
|
||||
|
||||
技術的に特段おもしろいことをしているわけではない。ES2015 でコードを書き、webpack と babel を使って Extension向けにトランスパイルしている。意外だったのは、Safari Extension の構造が Google Chrome 拡張機能のそれとよく似ていたことだ。これならば Chrome 開発者でも容易に Safari Extension を作れるだろう。
|
||||
|
||||
## プラットフォーム間の差異を無くすには
|
||||
|
||||
プログラミング言語 Python は、大きく Python 2 と Python 3 の二つのバージョンに分かれている。双方に互換性は無く、Python 3 で書かれたコードが Python 2 では動かない。しかし、six (ネーミングは 2 × 3 ?)というライブラリを使うことで、バージョン間の差異をライブラリが吸収し、同じコードベースを両方のバージョンで動かすことが出来る。
|
||||
|
||||
これと同じように、Safari と Google Chrome の拡張機能の仕様の違いを吸収してくれるライブラリがあれば、Safari Extension 界隈も賑やかになるのではないか。
|
107
_posts/2016-05-26-stairlab-aiseminar-2-memo.md
Normal file
@ -0,0 +1,107 @@
|
||||
---
|
||||
title: ステアラボ人工知能セミナー#2 メモ
|
||||
date: 2016-05-26 00:00:00 Z
|
||||
---
|
||||
|
||||
走り書きです。
|
||||
|
||||
<https://stairlab.doorkeeper.jp/events/44958>
|
||||
|
||||
> 第2回目の今回は、機械学習の研究者で、トピックモデル (機械学習プロフェッショナルシリーズ)の著者でもある、NTTコミュニケーション科学基礎研究所の[岩田具治](http://www.kecl.ntt.co.jp/as/members/iwata/index-j.html)先生をお招きし、「教師なしオブジェクトマッチング」というタイトルで、先生の最近の研究について講演していただきます。
|
||||
|
||||
- 教師なし学習
|
||||
|
||||
- PCAが主流
|
||||
- t-SNEで次元削減してプロット
|
||||
|
||||
- 教師ありオブジェクトマッチング
|
||||
|
||||
- 異なるドメインに含まれる事例間の対応を見つけるタスク
|
||||
- [正準相関分析](http://ibisforest.org/index.php?正準相関分析)
|
||||
- 正解対応データが低次元潜在空間で同じ位置に埋め込まれるよう、線形写像を学習する
|
||||
- テスト時には、低次元潜在空間上で近くに配置されたデータが類似していると判定する
|
||||
- 問題点
|
||||
- 対応データが必要(対訳等)
|
||||
- 対応データが入手困難・不可能な状況もある
|
||||
- プライバシーの保護
|
||||
- データの入手目的や方法が異なる
|
||||
- 人手による対応付けコストが高い
|
||||
|
||||
- 教師なしオブジェクトマッチング
|
||||
|
||||
- ドメイン間のオブジェクトの距離は測れない
|
||||
- ドメイン内のオブジェクト間の距離の相対的な関係を見てマッチングする
|
||||
|
||||
- 教師なしクラスタマッチング
|
||||
|
||||
- 異なるドメイン間のクラスタの対応を教師なしで見つける
|
||||
|
||||
- 提案 : 教師なしクラスタマッチングのための潜在変数モデル
|
||||
|
||||
1. 各ドメインのデータを共通の低次元潜在空間へ埋め込む
|
||||
2. 潜在空間でクラスタリング
|
||||
3. 同じクラスタになったオブジェクトが対応
|
||||
|
||||
- 確率的生成モデルによるクラスタリング
|
||||
|
||||
- データが生成される過程を確率を用いて定義
|
||||
- 実際にはデータが与えられる
|
||||
- データを生成したもっともらしいクラスタを推論
|
||||
- 利点
|
||||
- 不確実性を考慮できる
|
||||
- 確率論の枠組みで異種データを統合できる
|
||||
|
||||
- 混合定期分布によるクラスタリング
|
||||
|
||||
- k-meansの確率版
|
||||
- 生成過程
|
||||
- クラスタ毎の平均は $\{\mu_1, \mu_2, … \mu_k\}$
|
||||
- Forオブジェクト $n = 1, …, N$
|
||||
- クラスタ割り当てを決める$S_n \sim Categorical(\theta)$
|
||||
|
||||
- 教師なしクラスタマッチング生成モデル
|
||||
|
||||
- [無限混合正規分布](http://www.nejicolab.com/akip/?p=160)
|
||||
`$$ p(X_{dn}|Z,W,\theta) = \sum^\infty_{j=1}{\theta_j N(x_{dn}|W_d z_j, \alpha^{-1} I)} $$`
|
||||
|
||||
- 特徴
|
||||
- ディリクレ過程を用いて無限個のクラスタを想定
|
||||
- 異なるドメインのオブジェクトを共通のクラスタに割り当てできる
|
||||
- ドメイン毎に異なる特徴次元や統計的性質を考慮できる
|
||||
- ドメイン毎に異なるオブジェクト数でも良い
|
||||
- 確率的EMアルゴリズム
|
||||
- Eステップ : クラスタ割り当てsをgibbsサンプリング
|
||||
- Mステップ : 写像行列Wを最尤推定
|
||||
- 潜在ベクトルz、クラスタ割り当て$\theta$、精度$\alpha$は解析的に積分消去
|
||||
- [Adjusted Rand index](http://y-uti.hatenablog.jp/entry/2014/01/19/133936) (高いほど良い)
|
||||
- 反教師あり
|
||||
- 少数の対応データが得られる場合もある
|
||||
- Eステップで対応データは必ず同じクラスタに割り当てられるとする
|
||||
- 結論
|
||||
- 教師なしクラスタマッチング手法を提案
|
||||
- 対応データ不要
|
||||
- 多ドメイン、多対多、任意のオブジェクト数に対応
|
||||
|
||||
## ネットワークデータのための教師なしクラスタマッチング
|
||||
|
||||
- Find correspondence between clusters in multiple networks without node correspondence
|
||||
- ReMatch
|
||||
- based on [Infinite Relational Models](http://qiita.com/takuti/items/8faf0e686cfbe68c2dfa) (IRM)
|
||||
- is IRM with a combined matrix
|
||||
- Rivals
|
||||
- IRM+KS
|
||||
- KS
|
||||
- MMLVM
|
||||
- AUC: abbr. Area Under the Curve
|
||||
|
||||
## 他言語文書データからの普遍文法の抽出
|
||||
|
||||
- Languages share certain common properties
|
||||
- word order in most European language is SVO
|
||||
- Extract a common grammar from multilingual corpora
|
||||
- Hierarchical Bayesian modeling
|
||||
- Probabilistic(Stochastic) context-free grammar (PCFG, SCFG) = 確率文脈自由文法
|
||||
|
||||
## 質疑応答
|
||||
|
||||
- トピックモデルよりも、一度ネットワークに落とし込んだ方が精度は良い
|
39
_posts/2016-10-15-cuda-on-macos.md
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
title: CUDA on macOS
|
||||
date: 2016-10-15 09:00:00 +09:00
|
||||
tags:
|
||||
- til
|
||||
---
|
||||
|
||||
Install TensorFlow with CUDA 8.0 + cuDNN 5.1 support on macOS.
|
||||
All instructions are based on [TensorFlow Get Started](https://www.tensorflow.org/get_started/os_setup).
|
||||
|
||||
# Install CUDA and cuDNN
|
||||
|
||||
{% gist 568d86da5ce555e9bc6618f59391f9cd 01_install_cuda_cudnn.sh %}
|
||||
|
||||
You also need to add this line to your shell config.
|
||||
|
||||
```bash
|
||||
export CUDA_HOME=/usr/local/cuda
|
||||
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$CUDA_HOME/lib"
|
||||
export PATH="$CUDA_HOME/bin:$PATH"
|
||||
```
|
||||
|
||||
and build deviceQuery as test your environment.
|
||||
|
||||
```bash
|
||||
cd /usr/local/cuda/samples/
|
||||
make -C 1_Utilities/deviceQuery
|
||||
./bin/x86_64/darwin/release/deviceQuery
|
||||
```
|
||||
|
||||
# Install TensorFlow
|
||||
|
||||
## Install from pip
|
||||
|
||||
{% gist 568d86da5ce555e9bc6618f59391f9cd 02_install_tensorflow.sh %}
|
||||
|
||||
## Build from source
|
||||
|
||||
{% gist 568d86da5ce555e9bc6618f59391f9cd 03_build_tensorflow.sh %}
|
147
_posts/2016-12-03-best-of-products-2016.md
Normal file
@ -0,0 +1,147 @@
|
||||
---
|
||||
title: 買ってよかったモノ2016
|
||||
date: 2016-12-03 09:00:00 +09:00
|
||||
---
|
||||
|
||||
今年買ったモノの中で、特に実用的なプロダクトを紹介します。
|
||||
|
||||
# ガジェット
|
||||
|
||||
## [12インチMacBook](http://www.apple.com/jp/shop/buy-mac/macbook/%E3%82%B4%E3%83%BC%E3%83%AB%E3%83%89-512gb)
|
||||
|
||||
持ち運びに特化した超コンパクトなMacBook。スペックに過度な期待は禁物。
|
||||
|
||||
## [EARIN](https://earin.com)
|
||||
|
||||
持ち運びに特化した超コンパクトなBluetoothイヤホン。取り回しが多少ピーキーであるため、万人受けしないプロダクトであるが、世界最小の謳い文句は本物。
|
||||
|
||||
## [Bose QuietControl 30](https://www.bose.co.jp/ja_jp/products/headphones/earphones/quietcontrol-30.html)
|
||||
|
||||
ノイズキャンセラー付きイヤホン QuietComfort 20の後継機種。ワイヤレス化して、取り回しがよくなった。QuietControlの名の通り、ノイズキャンセリングの度合いを調整するボタンが搭載された。しかし、実際のところ最大と最小しか使わないので、ボタンを押す手間がかえって不便に感じる。
|
||||
|
||||
## [Apple Watch series 2 Nike+](http://www.apple.com/jp/shop/buy-watch/apple-watch-nike/%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9%E3%82%B0%E3%83%AC%E3%82%A4-%E3%82%A2%E3%83%AB%E3%83%9F%E3%83%8B%E3%82%A6%E3%83%A0-%E3%83%96%E3%83%A9%E3%83%83%E3%82%AF-%E3%83%9C%E3%83%AB%E3%83%88-%E3%82%B9%E3%83%9D%E3%83%BC%E3%83%84%E3%83%90%E3%83%B3%E3%83%89?preSelect=false&product=MP0J2J/A&step=detail#)
|
||||
|
||||
初代Apple Watchから買い換えた。毎日のように改札やコンビニで裏拳している。
|
||||
スペックアップの恩恵はあまり感じない。
|
||||
|
||||
アルミブラックに合う[42mmケース用ミッドナイトブルーレザーループ](http://www.apple.com/jp/shop/product/MLHM2FE/A/42mm%E3%82%B1%E3%83%BC%E3%82%B9%E7%94%A8%E3%83%9F%E3%83%83%E3%83%89%E3%83%8A%E3%82%A4%E3%83%88%E3%83%96%E3%83%AB%E3%83%BC%E3%83%AC%E3%82%B6%E3%83%BC%E3%83%AB%E3%83%BC%E3%83%97-l)を買った。
|
||||
|
||||
[Belkin Valet Charge Dock for Apple Watch + iPhone](http://www.apple.com/jp/shop/product/HJC92PA/A/belkin-valet-charge-dock-for-apple-watch-iphone)はiPhoneとApple Watchを同時に充電できる。デザインも良い。
|
||||
|
||||
## [M-Audio Keystation 88](http://m-audio.com/products/view/keystation-88)
|
||||
|
||||
88鍵MIDIキーボード。Oxygen 88が壊れたので同じメーカーの別製品に買い替えた。Oxygen 88の重さ(21kg)に懲り、持ち運びが容易な鍵盤を選んだ。
|
||||
|
||||
## [BALMUDA The Pot](https://www.balmuda.com/jp/pot/)
|
||||
|
||||
トースターで有名なBALMUDAが11月に出した電気ケトル。お茶を飲むときしか使わないので0.6Lでも十分だと感じた。注ぎ口の切れが良く、気に入っている。
|
||||
|
||||
## [Z-LIGHT LED デスクライト](https://www.amazon.co.jp/gp/product/B00J2R0DEU/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1)
|
||||
|
||||
Pixarのロゴに付属しているデスクライトみたいなフォルム。フィリップスのHueに付け替えて使用している。
|
||||
|
||||
## [IRKit](http://getirkit.com/)
|
||||
|
||||
平たく言うと、DIYな学習リモコン。[Raspberry Pi](https://www.raspberrypi.org/)と[homebridge](https://github.com/nfarina/homebridge)を組み合わせて、HomeKitに対応させた。
|
||||
|
||||
Siriに「暖房をつけて」と尋ねるだけで済むというのは、中々近未来を感じさせる。
|
||||
|
||||
## [Knirps Fiber T2 Duomatic](http://www.knirps.jp/product.html)
|
||||
|
||||
自動開閉が便利な折りたたみ傘。ノーマルなビジネスバッグへ縦に仕舞えるサイズ感。
|
||||
|
||||
## [Shure MOTIV MV88](https://www.shure.co.jp/go/motiv-mic/jp/mv88/)
|
||||
|
||||
非常にコンパクトなコンデンサーマイク。Lightning端子を備えており、iPhone/iPadに繋いで録音ができる。
|
||||
|
||||
## [LEZYNE CNC Floor Drive ABS2](http://www.wiggle.jp/lezyne-cnc-floor-drive-abs2-%E3%83%95%E3%83%AD%E3%82%A2%E3%83%9D%E3%83%B3%E3%83%97/)
|
||||
|
||||
デザインと機能性が両立した自転車の空気入れ。仏式と米式バルブに対応している。回転するねじ込みノズルが特徴的で、BROMPTONのような小口径タイヤを持つ自転車でも問題なく使える。
|
||||
|
||||
## [iPad Pro 9.7 インチ](http://www.apple.com/jp/ipad-pro/)
|
||||
|
||||
[Apple Pencil](http://www.apple.com/jp/shop/product/MK0C2J/A/ipad-pro%E3%81%AE%E3%81%9F%E3%82%81%E3%81%AEapple-pencil)との組み合わせがとても良い。ノートを書いたり、絵を描くのに使っている。
|
||||
|
||||
スタンドは、Twelve Southの[Compass 2](http://www.apple.com/jp/shop/product/HF022ZM/B/twelve-south-compass-2-stand-for-ipad)を使っている。折りたたむとApple Pencil2本分くらいに小さくなる。
|
||||
|
||||
これはあってもなくてもいい。
|
||||
|
||||
## [Anker PowerPort 4](https://www.amazon.co.jp/gp/product/B00VTJS58U/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1)
|
||||
|
||||
旅の友。嵩張らず、4つのUSBポートが使える。
|
||||
|
||||
## [Kindle Voyage Wi-Fi + 3G](https://www.amazon.co.jp/gp/product/B00GMUPAIO/ref=oh_aui_detailpage_o01_s01?ie=UTF8&psc=1)
|
||||
|
||||
Amazonの電子書籍リーダー。特殊な電子インクディスプレイを備えており、長時間の読書にも(目が)耐えうる。
|
||||
|
||||
今買うなら、PaperwhiteやOasisでも良い。
|
||||
|
||||
# Webサービス
|
||||
|
||||
## [Spotify](https://www.spotify.com/jp/)
|
||||
|
||||
洋楽やポップスが多めの音楽ストリーミングサービス。Apple Musicのアクティビティプレイリストを前面に押し出したようなサービス。無料プランもあるが、プレミアムになると高音質なオフライン再生も出来る。
|
||||
|
||||
## [Moneytree](https://moneytree.jp/)
|
||||
|
||||
良くデザインされた家計簿アプリ。懸念すべきは、Web版に2段階認証が採用されていないところ。
|
||||
|
||||
## [Flipboard](https://flipboard.com/)
|
||||
|
||||
雑誌のようにパラパラめくれるレイアウトのニュースリーダー。惜しむべくはFeedlyとの連携が欠けていることか。
|
||||
|
||||
## [Namecheap](https://www.namecheap.com/)
|
||||
|
||||
ドメインレジストラ。お名前.comからiwantmyname、そしてNamecheapへと移行してきた。この手のサービスにしては良くデザインされており、使いやすい。
|
||||
|
||||
一度転送でトラブルがあり、カスタマーサポートのお世話になったことがあったが、しっかりとした仕事をしてくれた。
|
||||
|
||||
## [CloudFlare](https://www.cloudflare.com/)
|
||||
|
||||
DNSサービス。このサイトのドメインもお世話になっている。
|
||||
|
||||
## [Heroku](https://www.heroku.com/)
|
||||
|
||||
PaaS。`git push`したと思ったらもうサービスがデプロイされていた、みたいなイメージ。
|
||||
|
||||
## [Netflix](https://www.netflix.com/jp/)
|
||||
|
||||
既存コンテンツの配信だけに留まらず、オリジナル作品の制作にも意欲的に取り組んでいる。このオリジナルが結構面白い。
|
||||
|
||||
# 本
|
||||
|
||||
## [ハクメイとミコチ](https://www.amazon.co.jp/gp/product/B01AHHHUTE/ref=oh_aui_d_detailpage_o03_?ie=UTF8&psc=1)
|
||||
|
||||
かわいい。
|
||||
|
||||
## [ダンジョン飯](https://www.amazon.co.jp/gp/product/B00S0E4JW8/)
|
||||
|
||||
美味しそう。
|
||||
|
||||
## [ホクサイと飯さえあれば](https://www.amazon.co.jp/gp/product/B01DXLA5DO/ref=oh_aui_d_detailpage_o07_?ie=UTF8&psc=1)
|
||||
|
||||
自炊欲が高まる。
|
||||
|
||||
## [順列都市](https://www.amazon.co.jp/gp/product/B00RKN4876/ref=oh_aui_d_detailpage_o04_?ie=UTF8&psc=1)
|
||||
|
||||
立川でおでんを食べている時に勧められた本。絶対読むべき。
|
||||
|
||||
## [月は無慈悲な夜の女王](https://www.amazon.co.jp/gp/product/B00DM4ZH3Q/ref=oh_aui_d_detailpage_o01_?ie=UTF8&psc=1)
|
||||
|
||||
今NetflixオリジナルでやっているEXPANSEに原書があるとすれば、これになるのだろうか。
|
||||
|
||||
## [華氏451度](https://www.amazon.co.jp/gp/product/B00MHLSAUC/ref=oh_aui_d_detailpage_o06_?ie=UTF8&psc=1)
|
||||
|
||||
焚書が地方公務員の仕事になった世界の話。
|
||||
|
||||
## [ベルリンは鐘](https://www.amazon.co.jp/gp/product/B00QPSXEGS/ref=oh_aui_d_detailpage_o08_?ie=UTF8&psc=1)
|
||||
|
||||
イェーイ!!!!!
|
||||
|
||||
## [統計的学習の基礎](https://www.amazon.co.jp/gp/product/432012362X/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1)
|
||||
|
||||
カステラ。
|
||||
|
||||
## [くまみこ](https://www.amazon.co.jp/gp/product/B01CS03A3I/ref=oh_aui_d_detailpage_o07_?ie=UTF8&psc=1)
|
||||
|
||||
かわいい。
|
14
_posts/2017-02-02-sim-card-travel.md
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
title: 海外旅行におけるSIMカードの選択
|
||||
date: 2017-02-02 00:20:00 +09:00
|
||||
---
|
||||
|
||||
世界中で3G通信が出来る[GigSky](http://www.gigsky.jp)のSIMを3日間の台湾旅行で使ってみました。
|
||||
|
||||
GigSkyでは、その国の最初のアクティベーションに限り、3日・100MB分が無料で使えるので、今回の旅行では課金をせずにSIMを使うことが出来ました。
|
||||
|
||||
料金設定は現地で購入できるSIMと比べてかなり高く、旅行先で都度SIMを購入する手間とのトレードオフとなります。
|
||||
|
||||
GigSkyアプリをインストールしておくと、データ残量が半分以下になったタイミングでプッシュ通知を飛ばしてくれます。また、データ通信枠をトップアップする仕組みなので、追加データ枠の購入さえしなければ余計な課金をせずに済むという利点があります。
|
||||
|
||||
ただ、やはり価格設定が高めなのに加えて現地でのSIM購入はそこまで苦ではないので、3日以上の旅行で使う機会は無いでしょう。
|
@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Markdownフレンドリーなノートアプリ
|
||||
date: 2017-02-13 21:52:00 +09:00
|
||||
---
|
||||
|
||||
GFMが書けて、UIデザインが秀逸な、Appleファミリーに向けて作られたノートアプリを紹介します。
|
||||
|
||||
# ノートアプリの種類
|
||||
|
||||
ノートアプリには大きく分けて2種類があります。それはNotesのようにノートを一箇所にまとめて管理するシングルトンタイプと、TextEditのように、テキストファイル別にウィンドウが開くタイプです。
|
||||
この記事では、前者をNotesタイプ、後者をTextEditタイプと呼称してアプリを区別したいと思います。
|
||||
|
||||
# Notesタイプのアプリ
|
||||
|
||||
## Bear
|
||||
|
||||
<http://www.bear-writer.com>
|
||||
|
||||
北イタリア産のノートアプリです。記事中に __ハッシュタグ__ を書き込むと、リストでまとめてくれる機能が秀逸です。
|
||||
iCloudを使って、macOSとiOSアプリの間でノートを同期することが出来ます。macOSのAppExtentionには非対応です。
|
||||
|
||||
## Boost
|
||||
|
||||
<https://boostnote.io>
|
||||
|
||||
福岡発のノートアプリで、オープンソースモデルで公開されています。
|
||||
ソースコードの記述に重きを置く、プログラマー向けのアプリです。
|
||||
デザインも素晴らしく、実用的だと感じるアプリです。ストレージの概念がユーザーに透過的である点は、LightroomやEclipseを彷彿とさせます。
|
||||
|
||||
## Inkdrop
|
||||
|
||||
<https://www.inkdrop.info>
|
||||
|
||||
個人開発のノートアプリで、近々iOS版も登場する予定です。有料ですが、30日間の無料トライアルが提供されています。
|
||||
|
||||
# TextEditタイプのアプリ
|
||||
|
||||
## Typora
|
||||
|
||||
<https://typora.io>
|
||||
|
||||
エディタとプレビューが一体化したタイプのエディタです。これ以外にお勧めできるアプリはありません。
|
27
_posts/2017-02-13-nvidia-titan-x-macpro-early-2008.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Install NVIDIA GeForce GTX TITAN X in MacPro Early 2008
|
||||
date: 2017-02-13 14:20:00 +09:00
|
||||
---
|
||||
|
||||
MacPro Early 2008 という骨董品にNVIDIA Titan X (Maxwell)を積んだところ、いくつかの問題にぶつかりました。この記事でそれらの問題と解決策について書きます。
|
||||
|
||||
# NVIDIAドライバーが非対応
|
||||
|
||||
あまりにも古いアーキテクチャのMacProに対してNVIDIAのグラフィックドライバーが対応していません。
|
||||
そこで、適切なバージョンの[NVIDIA Web Driver](http://www.macvidcards.com/drivers.html)をインストールすることでこれを解決しました。
|
||||
これには問題もあります。macOSのアップデートをインストールするたびに、それに対応したドライバーを都度インストールする必要がありました。
|
||||
|
||||
ドライバーをインストールするまでは画面に何も映りません。そこで、pkg形式のドライバーを`scp`でMacProに転送して、`installer`を使ってドライバーをインストールすることにしました。
|
||||
|
||||
```
|
||||
scp driver.pkg MacPro.local:~
|
||||
ssh MacPro.local
|
||||
sudo installer -pkg ./driver.pkg -target /
|
||||
```
|
||||
|
||||
# 電源ユニット(PSU)のパワー不足
|
||||
|
||||
TITAN X(Maxwell)が要求するパワーをMacProのPSUは提供することが出来ません。
|
||||
そこで、秋葉原のPCパーツショップで追加のPSUを購入して、GPU専用の電源として使いました。
|
||||
ここで新たな問題が生まれます。正しくパワーを提供するためにはMacProのPSUと追加のPSUを同期させる必要があり、またそれを実現するパーツもあるのですが、場合によってはGPUを破損してしまう危険性がありました。
|
||||
今回は電源を同期することは見送り、個別にスイッチを入れることで解決しました。
|
45
_posts/2017-02-28-minimal-python-jupyter-macos.markdown
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Install Python and Jupyter on macOS with Minimal Effort
|
||||
date: 2017-02-28 11:14:00 +09:00
|
||||
---
|
||||
|
||||
Maybe you don't need `pyenv` and/or `virtualenv` in most cases.
|
||||
|
||||
## Install Python
|
||||
|
||||
> Don't have `brew`? Go to <https://brew.sh>.
|
||||
|
||||
```
|
||||
brew install python3
|
||||
```
|
||||
|
||||
If you still need Python 2, run `brew install python`.
|
||||
|
||||
## Install Jupyter Notebook
|
||||
|
||||
```
|
||||
pip3 install jupyter
|
||||
python3 -m ipykernel install --user
|
||||
```
|
||||
|
||||
You also want Python 2 kernel, so then:
|
||||
|
||||
```
|
||||
pip install ipykernel
|
||||
python -m ipykernel install --user
|
||||
```
|
||||
|
||||
That's all.
|
||||
|
||||
# How about `virtualenv`?
|
||||
|
||||
Since Python 3 got its own virtual environment tool called [venv](https://docs.python.org/3/library/venv.html), You no longer need `virtualenv` itself.
|
||||
|
||||
If you want a virtual envs on your project, run:
|
||||
|
||||
```
|
||||
python3 -m venv venv
|
||||
source ./venv/bin/activate
|
||||
```
|
||||
|
||||
then `venv` will creates virtual envs on __./venv__ folder on the root of your project.
|
@ -0,0 +1,67 @@
|
||||
---
|
||||
title: Definitive Guide to Install OpenCV 3 and its Python 3 bindings
|
||||
date: 2017-03-23 15:10:00 +09:00
|
||||
---
|
||||
|
||||
This article describes how to install OpenCV 3 and its Python 3 bindings on macOS and Ubuntu.
|
||||
|
||||
## `pyenv` users beware
|
||||
|
||||
Make sure to use system python because there is some tricky problem with OpenCV 3 install script.
|
||||
To switch to system python, run `pyenv global system`.
|
||||
|
||||
# macOS
|
||||
|
||||
Install OpenCV 3 package from `homebrew/science`, make sure to add `--with-python3` so we'll also get its Python 3 bindings simultaneously.
|
||||
|
||||
```bash
|
||||
brew tap homebrew/science
|
||||
brew install opencv3 --with-python3
|
||||
```
|
||||
|
||||
After installing OpenCV 3, put OpenCV 3 path file as `opencv3.pth` into brewed-`python3` site-packages directory, which indicates where the OpenCV 3 bindings installed.
|
||||
|
||||
```bash
|
||||
echo /usr/local/opt/opencv3/lib/python3.6/site-packages >> /usr/local/lib/python3.6/site-packages/opencv3.pth
|
||||
```
|
||||
|
||||
# Ubuntu
|
||||
|
||||
```bash
|
||||
git clone https://github.com/opencv/opencv
|
||||
cd opencv
|
||||
git checkout 3.2.0
|
||||
mkdir build
|
||||
cd build
|
||||
cmake \
|
||||
-D CMAKE_BUILD_TYPE=RELEASE \
|
||||
-D CMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-D WITH_TBB=ON \
|
||||
-D WITH_EIGEN=ON \
|
||||
-D BUILD_NEW_PYTHON_SUPPORT=ON \
|
||||
-D INSTALL_PYTHON_EXAMPLES=ON \
|
||||
-D WITH_V4L=ON \
|
||||
-D WITH_FFMPEG=OFF \
|
||||
-D BUILD_EXAMPLES=OFF \
|
||||
-D BUILD_TESTS=OFF \
|
||||
-D BUILD_PERF_TESTS=OFF \
|
||||
-D BUILD_DOCS=OFF \
|
||||
-D BUILD_opencv_python2=OFF \
|
||||
-D BUILD_opencv_python3=ON \
|
||||
-D BUILD_opencv_video=OFF \
|
||||
-D BUILD_opencv_videoio=OFF \
|
||||
-D BUILD_opencv_videostab=OFF \
|
||||
-D PYTHON_EXECUTABLE=$(which python) \
|
||||
"$OPENCV_DIR"
|
||||
make -j2
|
||||
sudo make install
|
||||
pip install opencv-python
|
||||
```
|
||||
|
||||
# Check install
|
||||
|
||||
```
|
||||
python -c "import cv2;print(cv2.__version__)"
|
||||
```
|
||||
|
||||
and you'll got `3.2.0`.
|
28
_posts/2017-04-23-apple-pie.markdown
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: アップルパイ
|
||||
date: 2017-04-23 14:48:00 +09:00
|
||||
categories:
|
||||
- recipe
|
||||
image: "/uploads/apple-pie.jpg"
|
||||
---
|
||||
|
||||

|
||||
|
||||
再現性の高いアップルパイの作り方です。材料は初出時に太字にしました。
|
||||
|
||||
# 注意事項
|
||||
- レモン汁はポッカレモンで代用可
|
||||
- 範囲指定されている値は2回目から好みで変化させること
|
||||
- 焼きあがったらただちにパイ皿を取り除くこと。冷めてからではより困難になる
|
||||
|
||||
# 手順
|
||||
1. **富士りんご(直径8cm)**3個の皮を剥いて2-3㎠に切って鍋に入れる
|
||||
1. **砂糖**60g・**レモン汁**2tbspを鍋に入れて、汁気が無くなるまで中火で10-15分煮る
|
||||
1. 火を止めて、**切れてるバター**2個・**シナモン**を好きなだけ混ぜる
|
||||
1. **冷凍パイシート**を冷蔵庫に移動し30分おく
|
||||
1. 18cmパイ皿にシートを敷き、よく密着させる
|
||||
1. 鍋の中身の熱が扱える程度に取れたらパイ皿に流し込んで広げる
|
||||
1. 残りのパイシートをカットして格子状にのせる
|
||||
1. **卵黄**に**水・塩**を少し混ぜ卵液を作り、シートに塗る(塗るほど焼けやすくなる)
|
||||
1. 余りのシートをパイの縁にのせて卵液を薄く塗る
|
||||
1. 200℃のオーブンで40分焼く(15分で180℃に落とす; でないと表面だけ焼けて中は生焼けになる)
|
33
_posts/2017-05-13-github-repos-comparison.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: GitHubリポジトリの比較表を gh-compare で作る
|
||||
date: 2017-05-13 12:00:00 +09:00
|
||||
image: http://randompaper.co.s3.amazonaws.com/gh-compare.gif
|
||||
---
|
||||
|
||||
# GitHubリポジトリの比較表を gh-compare で作る
|
||||
|
||||

|
||||
|
||||
[gh-compare](https://github.com/uetchy/gh-compare) を作りました。この小さなツールを使って、導入を検討しているライブラリ群の比較表をコマンド1つで作ることが出来ます。
|
||||
|
||||
ライブラリのリポジトリがGitHubにあることが前提になりますが、プロジェクトの勢いからサイズまで俯瞰することが出来ます。
|
||||
|
||||
最高と最悪の値はそれぞれ緑色と赤色に着色されるので、違いが一目瞭然でわかります。
|
||||
|
||||
## インストール
|
||||
|
||||
`gh-compare`モジュールは`npm`からインストール出来ます。
|
||||
|
||||
```bash
|
||||
npm install --global gh-compare
|
||||
```
|
||||
|
||||
## 使い方
|
||||
|
||||
`gh-compare`の後にスペース区切りで比較したいリポジトリを書きます。
|
||||
|
||||
```bash
|
||||
gh-compare facebook/react vuejs/vue riot/riot angular/angular
|
||||
```
|
||||
|
||||
もし変な挙動を見つけたら、プロジェクトの [Issues](https://github.com/uetchy/gh-compare/issues/new) に是非書いてください。
|
53
_posts/2017-06-16-x11forward.md
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
title: Forward X11 window over SSH
|
||||
date: 2017-06-16 00:00:00 +09:00
|
||||
---
|
||||
|
||||

|
||||
|
||||
## Ubuntu 16.04
|
||||
|
||||
Make sure you have installed SSH, X11 and xAuth on a remote server.
|
||||
|
||||
```
|
||||
sudo apt install -y xorg xauth openssh
|
||||
sudo sed -i '/ForwardX11/s/.*/ForwardX11 yes/' /etc/ssh/sshd_config
|
||||
sudo service ssh restart
|
||||
```
|
||||
|
||||
## macOS Sierra
|
||||
|
||||
You also need to have X11 on your local machine.
|
||||
|
||||
```
|
||||
brew cask install xquartz # install X11
|
||||
ssh -X <remote>
|
||||
$ xeyes # verify you have X11
|
||||
```
|
||||
|
||||
You might want to restart macOS if `$DISPLAY` have empty value.
|
||||
|
||||
# Plot with matplotlib
|
||||
|
||||
Plot a simple graph remotely on Ubuntu 16.04:
|
||||
|
||||
```python
|
||||
import matplotlib.pyplot as plt
|
||||
plt.plot([1, 2, 3])
|
||||
plt.show()
|
||||
```
|
||||
|
||||
If you can't see any window, add __backend__ settings to `~/.config/matplotlib/matplotlibrc`.
|
||||
|
||||
```ini
|
||||
backend: TkAgg
|
||||
```
|
||||
|
||||
or just add few lines to change the backend explicitly:
|
||||
|
||||
```python
|
||||
import matplotlib
|
||||
matplotlib.use('TkAgg')
|
||||
import matplotlib.pyplot as plt
|
||||
...
|
||||
```
|
185
_sass/post.scss
Normal file
@ -0,0 +1,185 @@
|
||||
.article-list__item {
|
||||
margin: 0 0 40px;
|
||||
}
|
||||
|
||||
.article-list__item__title {
|
||||
margin: 0 0 2px;
|
||||
font-size: 33px;
|
||||
}
|
||||
|
||||
.article-list__item__pubdate {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.article-list__item__excerpt {
|
||||
margin-top: 5px;
|
||||
font-size: 20px;
|
||||
color: #989898;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
a.article-list__item__button {
|
||||
border: 1px solid #989898;
|
||||
border-radius: 3px;
|
||||
color: #989898;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
margin: 10px 0;
|
||||
padding: 10px 17px;
|
||||
text-transform: uppercase;
|
||||
|
||||
&:hover {
|
||||
background-color: #989898;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 17px;
|
||||
padding: 15px;
|
||||
|
||||
&:hover {
|
||||
background-color: #fff;
|
||||
color: #989898;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.article {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.article__social {
|
||||
margin-top: 60px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.article__social > * {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.article__metadata {
|
||||
text-align: center;
|
||||
margin: 60px 0;
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
margin: 15px 0 25px;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.article__title {
|
||||
font-size: 45px;
|
||||
letter-spacing: -0.5px;
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
font-size: 33px;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.article__pubdate {
|
||||
color: #989898;
|
||||
font-size: 14pt;
|
||||
font-weight: normal;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.article__content {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-feature-settings: "kern";
|
||||
-webkit-font-feature-settings: "kern";
|
||||
-moz-font-feature-settings: "kern";
|
||||
-moz-font-feature-settings: "kern=1";
|
||||
|
||||
p {
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
line-height: 1.666em;
|
||||
margin: 15px 0;
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
li {
|
||||
font-size: 14pt;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
a {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 55px 0 15px;
|
||||
font-size: 2.2em;
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
margin: 30px 0 15px;
|
||||
font-size: 1.7em;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 35px 0 15px;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1.7em;
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
margin: 20px 0 15px;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 25px 0 15px;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1.3em;
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
margin: 15px 0 15px;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 25px 0 15px;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
margin: 15px 0 15px;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 5px solid red;
|
||||
padding-left: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
BIN
_uploads/apple-pie.jpg
Normal file
After Width: | Height: | Size: 311 KiB |
BIN
_uploads/x11-plot.png
Normal file
After Width: | Height: | Size: 726 KiB |
134
css/index.scss
Normal file
@ -0,0 +1,134 @@
|
||||
---
|
||||
---
|
||||
|
||||
@import url(https://fonts.googleapis.com/css?family=PT+Serif:400,700);
|
||||
|
||||
$break-small: 500px;
|
||||
$break-large: 840px;
|
||||
|
||||
body {
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
font-family: 'PT Serif', "ヒラギノ明朝 ProN", "Hiragino Mincho ProN", serif;
|
||||
|
||||
@media screen and (max-width: $break-large) {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// MathJax
|
||||
#MathJax_Message {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Highlight.js
|
||||
.hljs {
|
||||
border: 1px solid #d7d7d7;
|
||||
border-radius: 3px;
|
||||
background-color: #fff;
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
font-size: 14px;
|
||||
padding: 12px 16px;
|
||||
line-height: 1.8em;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
p code {
|
||||
padding: 3px 10px;
|
||||
background: #f6f6f6;
|
||||
border-radius: 3px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
a:hover, a:active, a:link, a:visited {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1.333em;
|
||||
}
|
||||
|
||||
hr {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #dbdbdb;
|
||||
border: 0;
|
||||
margin: 40px 0;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 5px 0;
|
||||
border-bottom: 1px solid #efefef;
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
margin: 10px 0 10px;
|
||||
}
|
||||
|
||||
.menu {
|
||||
list-style: none;
|
||||
padding: 8px 0;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
|
||||
.menu__item:not(:last-child) {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
padding: 0;
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.metro {
|
||||
text-align: center;
|
||||
padding: 80px 0 40px;
|
||||
|
||||
.logo {
|
||||
font-size: 60px;
|
||||
}
|
||||
|
||||
.menu {
|
||||
list-style: none;
|
||||
padding: 8px 0;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
font-size: 20px;
|
||||
|
||||
.menu__item:not(:last-child) {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: $break-small) {
|
||||
padding: 50px 0 40px;
|
||||
|
||||
.menu {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@import 'post'
|
9
docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
||||
version: '2'
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
command: jekyll serve --host 0.0.0.0 --port 4000 --baseurl '' --watch --drafts --unpublished --incremental
|
||||
ports:
|
||||
- 4000:4000
|
||||
volumes:
|
||||
- .:/usr/src/app
|
BIN
images/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/favicon-16x16.png
Normal file
After Width: | Height: | Size: 472 B |
BIN
images/favicon-32x32.png
Normal file
After Width: | Height: | Size: 606 B |
BIN
images/favicon.ico
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
images/icon.png
Normal file
After Width: | Height: | Size: 13 KiB |
23
images/safari-pinned-tab.svg
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="16.000000pt" height="16.000000pt" viewBox="0 0 16.000000 16.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,16.000000) scale(0.003125,-0.003125)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M2065 4064 c-121 -7 -354 -13 -517 -13 l-298 -1 0 -76 0 -75 75 -35
|
||||
c41 -19 114 -45 162 -58 l88 -23 3 -1132 c2 -901 0 -1132 -10 -1135 -133 -35
|
||||
-185 -53 -245 -81 l-73 -34 0 -76 0 -75 615 0 615 0 0 78 0 77 -78 34 c-42 19
|
||||
-108 45 -147 57 l-70 22 -3 471 -2 471 160 0 161 0 15 -37 c256 -620 445 -945
|
||||
641 -1102 l88 -70 338 -1 337 0 0 68 0 67 -95 62 c-83 55 -106 78 -192 185
|
||||
-53 68 -149 195 -211 283 -115 161 -399 585 -408 609 -3 9 14 21 50 35 152 62
|
||||
314 210 384 349 59 118 77 208 77 377 -1 115 -5 154 -23 220 -60 207 -205 374
|
||||
-408 466 -228 104 -468 125 -1029 93z m463 -259 c177 -42 306 -164 352 -334
|
||||
35 -129 30 -336 -11 -458 -56 -169 -193 -291 -364 -322 -32 -6 -119 -11 -192
|
||||
-11 l-133 0 0 559 0 560 43 9 c66 15 235 13 305 -3z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
BIN
images/typeface/TypefaceDesignKit.zip
Normal file
BIN
images/typeface/Typeface_A-Z.pdf
Normal file
BIN
images/typeface/Typeface_A-Z.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
images/typeface/Typeface_Hiragana.pdf
Normal file
BIN
images/typeface/Typeface_Hiragana.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
images/typeface/thumbnail.png
Normal file
After Width: | Height: | Size: 127 KiB |
BIN
images/wallpaper/bricks-mono.png
Normal file
After Width: | Height: | Size: 592 KiB |
BIN
images/wallpaper/bricks.png
Normal file
After Width: | Height: | Size: 742 KiB |
BIN
images/wallpaper/dawn.png
Normal file
After Width: | Height: | Size: 790 KiB |
BIN
images/wallpaper/desert-mono.png
Normal file
After Width: | Height: | Size: 408 KiB |
BIN
images/wallpaper/desert.png
Normal file
After Width: | Height: | Size: 495 KiB |
BIN
images/wallpaper/path.png
Normal file
After Width: | Height: | Size: 274 KiB |
BIN
images/wallpaper/ridge-mono.png
Normal file
After Width: | Height: | Size: 794 KiB |
BIN
images/wallpaper/ridge-mono2.png
Normal file
After Width: | Height: | Size: 1024 KiB |
BIN
images/wallpaper/ridge.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
images/wallpaper/shrine-mono.png
Normal file
After Width: | Height: | Size: 382 KiB |
BIN
images/wallpaper/shrine.png
Normal file
After Width: | Height: | Size: 401 KiB |
BIN
images/wallpaper/starrysky-orange.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
images/wallpaper/starrysky.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
17
package.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "script/server",
|
||||
"test": "textlint _posts/*.md _pages/*.md -f pretty-error",
|
||||
"fix-typo": "textlint _posts/*.md _pages/*.md --fix --dry-run -f diff"
|
||||
},
|
||||
"devDependencies": {
|
||||
"textlint": "^7.1.0",
|
||||
"textlint-filter-rule-whitelist": "^1.0.2",
|
||||
"textlint-rule-common-misspellings": "^1.0.1",
|
||||
"textlint-rule-max-ten": "^2.0.3",
|
||||
"textlint-rule-no-dropping-the-ra": "^1.0.3",
|
||||
"textlint-rule-no-start-duplicated-conjunction": "^1.1.3",
|
||||
"textlint-rule-preset-japanese": "^1.3.3"
|
||||
}
|
||||
}
|
8
scripts/bootstrap
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# usage: script/bootstrap
|
||||
#
|
||||
# Setup dev env
|
||||
|
||||
gem install bundler
|
||||
bundle install
|
||||
npm install
|
6
scripts/server
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
# usage: script/server
|
||||
#
|
||||
# Run the jekyll server
|
||||
|
||||
bundle exec jekyll serve --baseurl '' --watch --drafts --unpublished
|