Skip to content

Instantly share code, notes, and snippets.

View ckazu's full-sized avatar

CHINDA, Kazuyuki ckazu

  • Aiming-inc.
  • Tokyo, Japan
View GitHub Profile
@ckazu
ckazu / init.lua
Last active October 19, 2023 06:50
Hammerspoon
local left = "DELL U2723QE (1)"
local right = "DELL U2723QE (2)"
local windowLayout1 = {
{"Slack", nil, left, {x=0.0, y=0.0, w=0.5, h=1.0}, nil, nil},
{"Brave Browser", nil, left, {x=0.499, y=0.0, w=0.5, h=1.0}, nil, nil},
}
-- local windowLayout2 = {
-- {"iTerm2", nil, wide34, {x=0.0, y=0.0, w=0.2, h=1.0}, nil, nil},
-- {"Code", nil, wide34, {x=0.199, y=0.0, w=0.4, h=1.0}, nil, nil},
@ckazu
ckazu / History|-131e3e06|entries.json
Last active December 6, 2022 23:34
vscode_extensions
{"version":1,"resource":"file:///Users/ckazu/work/notion-blog-nextjs/lib/notion.js","entries":[{"id":"f4BR.js","timestamp":1662663047155},{"id":"s1Na.js","timestamp":1662663083228},{"id":"CtoK.js","timestamp":1662663141210},{"id":"NkSv.js","timestamp":1662664464628},{"id":"xLkx.js","timestamp":1662664556235},{"id":"gD5E.js","timestamp":1662664573509},{"id":"0UEC.js","timestamp":1663067097058},{"id":"SUmz.js","timestamp":1663067488113},{"id":"XJCv.js","timestamp":1663067509508},{"id":"VJmS.js","timestamp":1663074051400},{"id":"Edse.js","timestamp":1663074070587},{"id":"pZBS.js","timestamp":1663074326874},{"id":"wD07.js","timestamp":1663074364240},{"id":"NhoL.js","timestamp":1663075562904},{"id":"YZ9B.js","timestamp":1663075851515},{"id":"rdz8.js","timestamp":1663076001746},{"id":"WPGi.js","timestamp":1663085697295}]}
#!/usr/env ruby
require 'pp'
require 'json'
require 'fileutils'
FILENAME = 'xxx.json'
DIRNAME = 'converted'
def convert(scrapbox_format)
md = scrapbox_format
% facts. 磯野家
male(波平).
male(カツオ).
male(タラ).
male(マスオ).
female(フネ).
female(ワカメ).
female(サザエ).
<!DOCTYPE html>
<html>
<style>
.row div {
display: inline-block;
margin-bottom: 6px;
}
.rect {
font-size: 1em; font-family: monospace;
width: 150px;
@ckazu
ckazu / hsl_example01.html
Last active April 6, 2017 02:10
hsl chart example
<!DOCTYPE html>
<html>
<style>
.row div {
display: inline-block;
margin-bottom: 6px;
}
.rect {
font-size: 1em; font-family: monospace;
width: 150px;
@ckazu
ckazu / sort_lists.rb
Created February 4, 2016 02:54
sort_lists.rb
def sort_lists(a, b)
list = (a + b).sort
[list[0...a.size], list[a.size..-1]]
end
require 'minitest/autorun'
class TestSortLists < Minitest::Test
def test_sort_lists
data = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'].shuffle
@ckazu
ckazu / gist:9383096
Created March 6, 2014 05:23
HRF の複合グラフを生成する
require 'json'
require 'nokogiri'
require 'open-uri'
service_name = 'kakin_daily'
section_name = 'count_uu_Android'
doc = Nokogiri::HTML(open 'https://hostname/add_complex')
graph_ids = doc.css('form select[name=path-add] option').
select {|graph| graph.content.match "/#{service_name}/#{section_name}/" }.
@ckazu
ckazu / file0.txt
Created March 4, 2014 08:59
HRForecast のデータを Highcharts で手軽に描画する ref: http://qiita.com/ckazu/items/734226078721c5d0e20e
!!! 5
%html{lang: 'ja'}
%head
%meta{charset: 'utf-8'}
%script{src: '//code.jquery.com/jquery-1.11.0.min.js'}
%script{src: '//code.highcharts.com/highcharts.js'}
%script{src: '//code.highcharts.com/modules/data.js'} # CSV などを読み込んで良い感じにしてくれるモジュール
%body
#graph
p '----- shallow'
data = [1,2,3,4,5,6]
p "raw_data: #{data}"
p '- processing'
new_data =
data.each_with_object([]) do |d, ret|
ret << d * 2
end