Skip to content

Instantly share code, notes, and snippets.

View bouzuya's full-sized avatar

bouzuya bouzuya

View GitHub Profile
@bouzuya
bouzuya / cycle-http-driver.js
Created October 31, 2015 12:54
cycle-http-driver.js (node-fetch)
import fetch from 'node-fetch';
import Rx from 'rx';
function makeHTTPDriver() {
var requests = {};
return function(request$) {
return request$
.filter(request => {
if (typeof request === 'undefined' || request === null) return false;
const { id } = request;
@bouzuya
bouzuya / gomi.js
Created October 18, 2015 06:02
scan とか reduce とかの検証用のゴミ
Rx.Observable.create((observer) => {
setTimeout(() => {
observer.onNext(1000);
setTimeout(() => {
observer.onNext(3000);
setTimeout(() => {
observer.onCompleted(5000);
}, 2000);
}, 2000);
@bouzuya
bouzuya / mithril-b-html-plus.coffee
Last active August 29, 2015 09:32
mithril-b-html-plus
# mithril-b-html-plus
#
# e.g.
# ```coffee-script
# compile = require './mithril-b-html-plus'
# template = compile '''
# <p
# @b-text message
# '''
# template message: 'Hello!'
@bouzuya
bouzuya / private.xml
Created July 22, 2015 16:14
Karabiner private.xml
<?xml version="1.0"?>
<root>
<modifierdef>BOUZUYA_SUPER_L</modifier>
<modifierdef>BOUZUYA_SUPER_R</modifier>
<item>
<name>bouzuya's super key</name>
<item>
<name>BOUZUYA_SUPER_R+JIS_EISUU (BOUZUYA_SUPER_L) to ESCAPE</name>
<identifier>private.bouzuya_super_r_jis_eisuu_to_escape</identifier>
<autogen>
@bouzuya
bouzuya / post-hatena-blog.sh
Last active August 29, 2015 14:25
A shell script that post a blog entry to my hatena-blog using hatena-blog-cli
#!/bin/bash
date=$1
year=$(echo ${date} | sed -e 's/\([0-9]*\)-\([0-9]*\)-\([0-9]*\)/\1/g')
month=$(echo ${date} | sed -e 's/\([0-9]*\)-\([0-9]*\)-\([0-9]*\)/\2/g')
markdown=/home/bouzuya/.ghq/github.com/bouzuya/blog.bouzuya.net/data/${year}/${month}/${date}-diary.md
source /home/bouzuya/profile.d/hatena.sh
hatena-blog create --jekyll ${markdown}
@bouzuya
bouzuya / add-license.sh
Created May 6, 2015 09:22
LICENSE を追加するシェルスクリプト
#!/bin/sh
cat >LICENSE <<'EOS'
The MIT License (MIT)
Copyright (c) 2015 bouzuya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@bouzuya
bouzuya / backlog-banner.user.js
Created April 26, 2015 06:13
Backlog の検索ページに Banner を表示するユーザースクリプト
// ==UserScript==
// @name Backlog Banner
// @namespace http://bouzuya.net/
// @version 0.1
// @description backlog banner
// @author bouzuya
// @match https://*.backlog.jp/find/*
// @grant none
// ==/UserScript==
@bouzuya
bouzuya / index.html
Created April 13, 2015 01:15
埋め込みローディング表示
<!DOCTYPE html>
<html>
<head>
<!-- ... -->
<style type="text/css">
@keyframes embedded-loader-line-animation {
0% { transform: scaleY(1); }
50% { transform: scaleY(0.3); }
100% { transform: scaleY(1); }
}
@bouzuya
bouzuya / gulp.md
Created March 22, 2015 02:46
gulp メモ

A note for gulp

required tasks

  • npm run build -> gulp build
  • npm run clean -> gulp clean
  • npm test -> gulp test
  • npm run watch -> gulp watch

gulp build

@bouzuya
bouzuya / progress.md
Created March 10, 2015 14:51
プログレス(仮) メモ

プログレス(仮) メモ

自分が見たい。 点を線に。 どれくらい進んでいるのかがわかるとうれしい。 どれくらい進んだのかがわかると達成感がわく。 過去の達成度合いをふりかえりたい 全体といまの段階との度合いを見たい。 あと何 % なのか知りたい。 進捗を明確にしたい。