2018
今年も先人の文字を参考に書き初め。
最近のChromeのバージョンでは、以下サイトの方法が最良です。
必要な時はしばらくこんな具合で使ってみます。
font-family: "游ゴシック Medium", "Yu Gothic Medium", "游ゴシック体", YuGothic, "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ Pro W3", Meiryo, Verdana, sans-serif;
※ここから下は現在参考になりませんのでご留意ください。
以外と厄介なんですね…
@font-face { font-family: "Yu Gothic"; src: local("Yu Gothic Medium"),local("Yu Gothic"); font-weight: 500; } @font-face { font-family: "Yu Gothic"; src: local("Yu Gothic Bold"),local("Yu Gothic"); font-weight: bold; } body { font-family: "Yu Gothic", YuGothic, sans-serif; }
たまにこんな塩梅で使っています。
body { font-family: "Yu Gothic", YuGothic, "Lucida Grande", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ Pro W3", "メイリオ", Meiryo, Osaka, Verdana, sans-serif; font-feature-settings: 'pkna'; letter-spacing: 0.5px; }
比較画像を作ってみました。
游ゴシックは16px未満だと本文書体としては厳しそう。
本年もどうぞよろしくお願い申し上げます。
そういえば@TwitterJPの最初の投票機能付き投稿がAPI越しではどう見えるか気になったので、取得してみました。
結果、投票があったかどうかすら分からない…
Twitterとしてはサイトか公式クライアント使ってほしいだろうし、APIでは提供しないのかな。
stdClass Object ( [created_at] => Thu Oct 22 07:49:56 +0000 2015 [id] => 657101565237432320 [id_str] => 657101565237432320 => みなさんのアカウントには新しい投票機能が入りましたでしょうか?まだの方は、数日中に追加されるはずですので、もう少々お待ちください。 投票機能はこんな風にご利用いただけます。 好きなのは… => <a href="http://twitter.com" rel="nofollow">Twitter Web Client</a> [truncated] => [in_reply_to_status_id] => [in_reply_to_status_id_str] => [in_reply_to_user_id] => [in_reply_to_user_id_str] => [in_reply_to_screen_name] => [user] => stdClass Object ( [id] => 7080152 [id_str] => 7080152 [name] => TwitterJP [screen_name] => TwitterJP [location] => 東京都中央区 [description] => 日本語版Twitter公式アカウントです。 [url] => https://t.co/A9dNuL0CCa [entities] => stdClass Object ( [url] => stdClass Object ( [urls] => Array ( [0] => stdClass Object ( [url] => https://t.co/A9dNuL0CCa [expanded_url] => http://blog.jp.twitter.com [display_url] => blog.jp.twitter.com [indices] => Array ( [0] => 0 [1] => 23 ) ) ) ) [description] => stdClass Object ( [urls] => Array ( ) ) ) [protected] => [followers_count] => 1972807 [friends_count] => 70 [listed_count] => 16500 [created_at] => Tue Jun 26 01:54:35 +0000 2007 [favourites_count] => 59 [utc_offset] => 32400 [time_zone] => Tokyo [geo_enabled] => [verified] => 1 [statuses_count] => 3346 [lang] => ja [contributors_enabled] => [is_translator] => [is_translation_enabled] => [profile_background_color] => C0DEED [profile_background_image_url] => http://pbs.twimg.com/profile_background_images/567482719571959809/WwgdnJCP.jpeg [profile_background_image_url_https] => https://pbs.twimg.com/profile_background_images/567482719571959809/WwgdnJCP.jpeg [profile_background_tile] => 1 [profile_image_url] => http://pbs.twimg.com/profile_images/3407356865/62f0d53222361fbd2c1fe9889f4cc559_normal.png [profile_image_url_https] => https://pbs.twimg.com/profile_images/3407356865/62f0d53222361fbd2c1fe9889f4cc559_normal.png [profile_banner_url] => https://pbs.twimg.com/profile_banners/7080152/1445475230 [profile_link_color] => 0084B4 [profile_sidebar_border_color] => FFFFFF [profile_sidebar_fill_color] => DDEEF6 [profile_text_color] => 333333 [profile_use_background_image] => 1 [has_extended_profile] => 1 [default_profile] => [default_profile_image] => [following] => [follow_request_sent] => [notifications] => ) [geo] => [coordinates] => [place] => [contributors] => [is_quote_status] => [retweet_count] => 8507 [favorite_count] => 2675 [entities] => stdClass Object ( [hashtags] => Array ( ) [symbols] => Array ( ) [user_mentions] => Array ( ) [urls] => Array ( ) ) [favorited] => [retweeted] => [lang] => ja )
El Capitanにアップグレードしたら、Homebrewのアップデートがエラーでつまずくようになったので、解消した際のメモ。
$ sudo chown $(whoami):admin /usr/local $ sudo chown -R $(whoami):admin /usr/local
via: HomebrewはEl Capitanへアップグレードする前に入れておく : El Capitanをクリーンインストールせざるを得ない場合
$ cd $(brew --prefix) $ git fetch origin $ git reset --hard origin/master
via: ヾ(o゚ω゚o)ノ゙brew updateでエラーでたった[Homebrew] : brew updateできるようにした
$ brew update Already up-to-date.
できたー
さくらのレンタルサーバの「標準のPHP」が5.6になってたので、改めて確認したところ、SSLエラーは解消されていました。
さくらのレンタルサーバ・さくらのマネージドサーバにて標準のPHP[PHP5] のバージョンを変更します
http://support.sakura.ad.jp/mainte/functionaddentry.php?id=17892
−−−−−−−−−− 以下、解消前の記事 −−−−−−−−−−
しばらく前から、さくらのレンタルサーバでPHP5.6が選べるようになって大変嬉しいのですが、PHP5.6からSSLの扱いが変更になったことと、サーバの証明書の関係で、readfile や file_get_contents などでHTTPSなURLを参照すると、下記のようなエラーになることがあります。
Warning: readfile(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /foo/var/ssl_test.php on line 1
Warning: readfile(): Failed to enable crypto in /home/foo/bar/ssl_test.php on line 1
Warning: readfile(https://tbx.sakura.ne.jp/test.txt): failed to open stream: operation failed in /home/foo/bar/ssl_test.php on line 1
PHP5.6に設定した後から、他所のファイル読込みやPOSTが一部できなくなって、調べてみたら上記のようなエラーがありました。
root権限のないサーバではやれることに制限があるものの、HTTPSなファイルの読込みを維持したいので、ひとまずは以下のいずれかの方法で解決します。
サポートへリクエストを送ったので、いずれ解消されると思います。
php – file_get_contents(): SSL operation failed with code 1. And more – Stack Overflow
(追記)
この次の方法でエラーが解消されない場合は、ソースコードをいじることになりますがこの方法が適しています。
検証を迂回するのはさすがにまずいですね…
ComposerからLaravelを導入しようとしてOpenSSL周りのエラーで困った件 – Qiita
さくらはphp.iniを編集できるので、新しい証明書を認識させてやります。
新しい証明書を cacert.crt などにリネームし、適当なところへ配置して下記のようにフルパスを記述します。
curl.cainfo=/home/foo/bar/cacert.crt
openssl.cafile=/home/foo/bar/cacert.crt
APCやOPcacheをインストールしているサーバでMODXを動かしていると、稀に更新が画面に反映されなくて難儀したので、リソースやチャンクの更新時にキャッシュをクリアする方法を検索したもののよくわからず、下記の作業をやってみたら出来たっぽいので書き留めておきます。
if(function_exists('opcache_reset')) opcache_reset(); if(function_exists('apc_clear_cache')) apc_clear_cache();
リソースやチャンクなどを更新すると、Cached Filesがぐっと減るので、たぶんキャッシュがクリアされてるはず。
本年もどうぞ宜しくお願い申し上げます。
jQueryのdelay()で半日嵌まった…
.clearQueue().stop().clearQueue() でようやく思い通りにクリアされた
— kuracom (@kuracom) 2014, 6月 19
なんかどういうわけか、$(‘foo’).clearQueue() をやってもキューがうまくクリアされない事が今日もあり、色々試してみたところ、
$(‘foo’).clearQueue().stop().clearQueue()
とやったらようやくクリアされた。上記の解消法は偶然かと思ったけど、今回も同様だった。不思議。