Skip to content

Instantly share code, notes, and snippets.

View kazuph's full-sized avatar

Kazuhiro Homma kazuph

View GitHub Profile
@kazuph
kazuph / chrome_love.md
Last active May 1, 2023 00:32
僕の愛したChromeExtensions
# coding: utf-8
from IPython import get_ipython
# # MonkeyBench : an interactive environment for library research
#
#
# MonkeyBenchは、Jupyterの上に構築中のライブラリーリサーチのための対話環境です。
#
# ライブラリーリサーチの過程と成果を、そのためのツールの作成と利用込みで、そのまま保存/共有/再利用できるという利点を活かし、調査プロセスの振り返りから質の向上、ノウハウ化を支援する環境となることを目論んでいます。
#
# ノイラートの船ではありませんが、「航海しながら改造し続ける」というコンセプトのため、完成することはありませんが、ツールの寄せ集めという性質上、それぞれ一部分でも利用可能です。
@kazuph
kazuph / karabiner.json
Last active October 26, 2021 02:47
2020-05-16 karabiner.json (日本語キーボード併用時の記述も追加)
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
# Lint as: python3
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@kazuph
kazuph / Dockerfile
Last active February 9, 2020 12:46
centosのimageからsshを使えるようにするだけのDockerfile。
FROM centos
RUN yum install -y passwd
RUN yum install -y openssh
RUN yum install -y openssh-server
RUN yum install -y openssh-clients
RUN yum install -y sudo
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
RUN sed -ri 's/#UsePAM no/UsePAM no/g' /etc/ssh/sshd_config
@kazuph
kazuph / script.js
Created October 24, 2019 12:38
Chrome Extension Script Auto RunnerでSafari(O'Reilly)が日本語に翻訳されたあともNext/Prev/目次のリンクを有効にする
// load "//code.jquery.com/jquery-3.4.1.min.js"
let rebindClickEvent = () => {
$('a.next').on('click', () => location.href = $('a.next')[0].href );
$('a.prev').on('click', () => location.href = $('a.prev')[0].href );
$('li.toc-level1').map((i, li) => {
$(li).on('click', () => location.href = $(li).children()[0].href )
})
console.log("rebind")
}
setTimeout(rebindClickEvent, 1000 * 5);
@kazuph
kazuph / esa2esa.rb
Last active March 23, 2017 00:12
esaを一度解約したが、再度使い始めたときに使うスクリプト(ExportデータをそのままImport)
#!/usr/bin/env ruby
# coding : utf-8
require 'esa'
require 'yaml'
class Importer
attr_accessor :client, :files
def initialize(client, dir_path)
@client = client
@kazuph
kazuph / .bash_profile
Last active February 2, 2017 09:44
cronからbundle exec...はsu - <USER> -lc ...が一番便利 ref: http://qiita.com/kazuph/items/c530359eada5b2639e68
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
@kazuph
kazuph / puma
Created December 24, 2016 03:47
puma init
#!/bin/sh
#
# puma - this script starts and stops the puma daemon
#
# chkconfig: - 85 15
# description: Description \
# goes here...
# processname: puma
# config: /etc/puma.conf
# pidfile: /home/stanislaw/apps/micro-apps/puma/puma.pid
@kazuph
kazuph / file0.txt
Last active December 19, 2016 08:03
iPhoneアプリに必要なアイコンを全サイズ生成するシェルスクリプト ref: http://qiita.com/kazuph/items/0f68301257d085f8e589
$ brew install ImageMagick