Skip to content

Instantly share code, notes, and snippets.

View otiai10's full-sized avatar
👋

Hiromu OCHIAI otiai10

👋
View GitHub Profile
@otiai10
otiai10 / images.md
Created September 8, 2017 06:43
images

test

@otiai10
otiai10 / tmp.diff
Created September 6, 2017 14:34
browser / fs diff
--- browser.out 2017-09-06 23:33:38.000000000 +0900
+++ fs.out 2017-09-06 23:33:49.000000000 +0900
@@ -10,9 +10,14 @@
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
-Input #0, matroska,webm, from '/Users/otiai10/Downloads/result-2.mp4':
+Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/webm2mp4_origin.webm_791005968.mp4':
Metadata:
- encoder : Chrome
@otiai10
otiai10 / c92.md
Last active August 10, 2017 03:05
c92

1日目

  • water proof (kamome sano)
    • 東 の 17b
  • magical mixer ((YUC'e))
    • 東 ね 41a
  • Mint Comet (YUC'e)
    • 東 ね 41a
  • R.U.U.K.TOO!?
  • 東 あ 18a
@otiai10
otiai10 / Promise.progress.js
Last active July 6, 2017 07:09
ほしいもの
const PP = require('progressive-promise');
const p = new PP((resolve, reject, progress) => {
const total = 100;
let count = 0;
const intvl = setInterval(() => {
count += 1;
if (count > total) {
clearInterval(intvl);
return resolve(count);
@otiai10
otiai10 / tmp.01.md
Created May 30, 2017 02:31
blog.tmp.01

動かないコード

	cc := &container.Config{
		Image: "foo",
		Volumes: map[string]struct{}{
			"/Users/otiai10/tmp/hoge:/var/data": struct{}{},
		},
	}
	hc := &container.HostConfig{
@otiai10
otiai10 / update-alert.diff
Created May 8, 2017 00:04
艦これウィジェットのbackground updateのアラート機能(未採用)
diff --git a/src/js/Components/Routine/LaunchPositionRecorder.js b/src/js/Components/Routine/LaunchPositionRecorder.js
index a90594c9..9ba72a9c 100644
--- a/src/js/Components/Routine/LaunchPositionRecorder.js
+++ b/src/js/Components/Routine/LaunchPositionRecorder.js
@@ -5,19 +5,32 @@ export default class LaunchPositionRecorder {
this.context = context;
}
mainGameWindow(delay) {
-
- // contextがiframe内(parentを持ってる)なら、parentにやらせる
@otiai10
otiai10 / src_js.diff
Created May 3, 2017 03:39
1.7.6 -> 1.7.9 がgit commitとして残ってないので、そのdiffをなんとかしてつくるやつ
Only in /Users/otiai10/Library/Application Support/Google/Chrome/Default/Extensions/iachoklpnnjfgmldgelflgifhdaebnol/1.7.9_0/src/js: AppConfig.js
diff -u --recursive src/js/Constants.js /Users/otiai10/Library/Application Support/Google/Chrome/Default/Extensions/iachoklpnnjfgmldgelflgifhdaebnol/1.7.9_0/src/js/Constants.js
--- src/js/Constants.js 2017-05-03 12:27:25.000000000 +0900
+++ /Users/otiai10/Library/Application Support/Google/Chrome/Default/Extensions/iachoklpnnjfgmldgelflgifhdaebnol/1.7.9_0/src/js/Constants.js 2017-01-28 14:50:16.000000000 +0900
@@ -1,11 +1,14 @@
var Constants = {
release : {
- version: "v1.7.6",
- link: 'https://github.com/otiai10/kanColleWidget/pull/604',
- announceVersion : 166,
@otiai10
otiai10 / gist:1d14a39138ccfa56031907de805e47ef
Last active April 17, 2017 02:00
新たにPythonをビルドできないときのpyenv virtualenv

そもそもの問題

  • pyenv install [version] によって ~/.pyenv 以下にpythonがビルド&インストールされるはずだが、pythonをビルドするのに必要なパッケージが無いのでビルドが失敗する
    • 今回のケースだとopenssl-devel
    • 独自で入れるのは大変にめんどい&あぶない
  • 今回のケースでは、絶対にrootになれないという制約がある。これがなんにしても厄介。

状況

  • pythonがインストールされているpathはrootしかwrite権限が無いpath(/usr/local/的な場所)