Skip to content

Instantly share code, notes, and snippets.

View hokuma's full-sized avatar
🎯
Focusing

hokuma hokuma

🎯
Focusing
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hokuma
hokuma / AllVotes.ipynb
Created December 30, 2018 05:48
柏議会の投票結果のテーブルhtmlから結果を抽出する
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hokuma
hokuma / screen-capture-movice.md
Created August 11, 2018 14:19
スクリーンキャプチャ動画を取る機会があったので知見をメモ

スクリーンキャプチャ動画を取る方法

macで取るなら、 QuickTimePlayer で収録可能。 https://support.apple.com/ja-jp/guide/quicktime-player/qtp97b08e666/mac

解説などの音声を収録するなら、指向性のマイクを使う。 ヘッドセットの場合は、マイクと口の位置関係に注意。 口に近すぎると音声が割れたり呼吸音が入るが、遠すぎるとそもそも音が小さくなる。

音声を加工する

とはいっても、ちょうど良い具合に収録するのは簡単ではない。

@hokuma
hokuma / chromebook-linux-docker.md
Created August 9, 2018 14:28
chromebookで動作するLinuxにdockerを入れる

Linuxの有効化

asusのchromebook を持っているのですが、chromebookでLinuxが動作するCrostini機能が有効になったので使ってみました。

有効にする方法は、この記事を参考にしました。

devチャンネルにし、設定から有効にするだけです。chrome::flagsから設定を有効にするといった記事がありますが、バージョン: 69.0.3497.21(Official Build)dev (32 ビット)においては不要でした。

記事にあるとおり、インストールを開始してしばらくするとエラーが表示されてさも失敗に終わったかのようなメッセージが出ますが、無視してください。

アプリ一覧にTerminalができているはずなので、起動します。ここでアプリ一覧に追加されていなければ本当にインストールに失敗しているかもしれません。

@hokuma
hokuma / comment_hotspots.rb
Last active June 7, 2018 05:50
bugspots reviewer
require 'octokit'
# Hotspotの結果は、以下のようになっている
# Scanning . repo
# Found 3010 bugfix commits, with 2029 hotspots:
#
# Fixes:
# - :bug: fix xxx
# - fix yyy bug
# - zzz bug fixed
@hokuma
hokuma / lda.py
Created August 4, 2017 16:14
lda
import sys
import string
import json
from pprint import pprint
from gensim import corpora, models
from collections import defaultdict
def stopword(token):
return string.punctuation.find(token) > -1
@hokuma
hokuma / file0.php
Created November 4, 2013 04:24
dashboardからajaxで何かを更新する ref: http://qiita.com/halhide/items/aa07a103f873ab34cf29
add_action( "wp_ajax_アクション名", "my_action_callback" );
function my_action_callback () {
/** アクションの中身 */
}
@hokuma
hokuma / file0.js
Created October 31, 2013 14:18
jasmineでsinon.fakeServerを使うときに気をつけること ref: http://qiita.com/halhide/items/c27f1831b860145ca2a1
var server = sinon.fakeServer.create();
server.autoRespond = true;
server.respondWith( function( xhr, id ) {
xhr.respond( 200, null, "..." );
} );
spyOn( someObject, "somemethod" );
hogeClient.request( ... );
expect( someObject.somemethod ).toHaveBeenCalled();
@hokuma
hokuma / file0.txt
Created October 23, 2013 13:48
ループバック通信をngrepでキャプチャする ref: http://qiita.com/halhide/items/2728f49555683a8ee446
ngrep -d lo -W byline port 80
@hokuma
hokuma / file0.php
Created September 15, 2013 14:57
自分が投稿したものだけ管理画面で表示する ref: http://qiita.com/halhide/items/8c85d4ea8f8584721aeb
$views = apply_filters( 'views_' . $this->screen->id, $views );