Skip to content

Instantly share code, notes, and snippets.

View boxnos's full-sized avatar
💭
Hello, world!

boxnos boxnos

💭
Hello, world!
View GitHub Profile
@boxnos
boxnos / piano.md
Last active November 24, 2016 17:12

バイエル

  • とりあえずバイエルから始める事にする。楽譜の入手はIMSLPが良さげ。
    Vorschule im Klavierspiel, Op.101 (Beyer, Ferdinand)
    の三ヶ国語バージョンが良い。うぁぁぁなんだこれ〜と思ったが、落ち着いて見てみれば超簡単。指番号が書いてあるので、楽譜読めなくてもなんとかなる。バイエルってつまんなそうというイメージは一瞬で吹っ飛んだ。
  • 最新バイエルピアノ教則本買った。タイトルに(N)を入れていく。

バイエル 運指

  • 運指の練習はC←→3/4とコロコロ変わる。3/4のリズムが全然取れない。
  • 右手の運指の練習。きっちり教本の基本を抑えてあって感動した。スマホで弾いてるので抑えてる感覚が薄い。弾きやすいようにいつの間にか指を動かしてしまう。今度は問題の左手……相当練習が必要そう。
require 'find'
require 'fileutils'
require 'shellwords'
require 'kconv'
Find.find '.' do |path|
unless path.isutf8
next
end
if /^((goog|test)-(phish|malware))|classifier.hashkey/ =~ File.basename(path)
@boxnos
boxnos / time_ago_in_words.js
Last active November 14, 2019 06:21
time_ago_in_words in JavaScript
var time_ago_in_words = function(from, to) {
to = to ? to : Date.now();
var minutes = (to - from) / 60000;
var data = [
[0 , 'less than a minute ago'],
[1 , 'a minute ago'],
[2 , function(m) {return m.toFixed() + ' minutes ago';}],
[45 , 'about 1 hour ago'],
@boxnos
boxnos / feedly.css
Last active December 18, 2015 20:48
feedlyで非表示の画像を表示するユーザースタイルシート。
@-moz-document domain("feedly.com") {
img[data-feedly-blocked="small"] {
display: inline !important;
max-width: none !important;
height: auto !important;
width: auto !important;
}
}
@boxnos
boxnos / sandbox.md
Last active December 18, 2015 05:49
主にRailsのメモ。

Railsのメモ

ゆるいメモ。3.2用。

routes

RESTfulな感じに

コントローラーentriesに対して、

@boxnos
boxnos / reload_firefox.sh
Last active December 18, 2015 00:49
Firefoxをリロードしたい。
#!/bin/sh
xdotool search --name "Mozilla Firefox" windowfocus key ctrl+r
@boxnos
boxnos / my_zen_settings.vim
Created June 3, 2013 13:12
とりあえず、こんな感じで。
NeoBundle 'mattn/zencoding-vim'
let g:user_zen_settings = {
\ 'indentation' : " ",
\ 'lang' : 'ja',
\ 'html' : {
\ 'filters' : 'html',
\ 'snippets' : {
\ 'html:5': "<!DOCTYPE html>\n"
\ ."<html lang=\"${lang}\">\n"
\ ."\t<head>\n"
@boxnos
boxnos / prototype-chain-alpha.scm
Last active December 17, 2015 11:39
プロトタイプチェーンの試作版。Racket用。第5版。 4版でバグ修正。 5版はalist->malistの余計な処理をprototype側に移動。
(require compatibility/mlist)
(define (alist->malist alist)
(list->mlist (map (lambda (i) (mcons (car i) (cdr i))) alist)))
(define (prototype malist)
(set! malist (mlist (mcons 'prototype malist)))
(define (search malist name t f)
(let ((res (massq name malist)))
(if (mpair? res) (t res) (f))))
@boxnos
boxnos / change-git-author-email-all.sh
Created May 17, 2013 08:32
gitのメールアドレスをががっと変更する。
#!/bin/sh
for repo in $(find `pwd` -type d -name '.git'); do
cd $repo
cd ../
pwd
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "hoge@hoge.com" ];
then
GIT_AUTHOR_NAME="foo";