shio
塩澤一洋, Kazuhiro Shiozawa
https://gyazo.com/76aca7ee0786f867badcb0cabe9ed9ff
Καζουχίρο Σιοζάουα
ご連絡いただく場合は、Chatwork、TwitterのDM、Facebookメッセージ、InstagramのDMがありがたいです。
https://gyazo.com/d53431ff727e3e4fff92a1e4309c3f24
https://gyazo.com/bde0107bc7d085ba481d592e00751b4ahttps://gyazo.com/230236baaa1afa7fd531988fdc6a4ee8
プロフィール
難しいことをやさしくするのが学者の役目、それを面白くするのが教員の役目、と考える法律学者兼大学教員です。
東京生まれ東京育ち。
小学校(梅根典子先生・野口祥子先生・別宮慶彦先生・武田透先生) 法学部法律学科(内池慶四郎ゼミ)
大学院法学政治学研究科修士課程・博士課程(指導教授:池田眞朗先生) 2000年4月に成蹊大学法学部に着任し2008年から教授。その間に、 を併任した他、現職は以下のとおり。
現職
受賞
楽器
ギター:11歳〜(NHK教育テレビ「ギターを弾こう」に1981年4月〜9月毎週出演) スポーツ
2021年度担当授業
2020年度担当授業
2019年度担当授業
2018年度担当授業
2017年度担当授業
成蹊大学での部活の顧問
興味関心
1泊以上の滞在経験(ほぼ滞在順)
授業時間割
2021年度授業時間割
https://gyazo.com/fd3b297d633dbd259864a2a81bcac9dc
2020年度授業時間割
前期:10コマ
https://gyazo.com/3bf8fe1892dce16e4e0a03514ee01e1a
後期:11コマ
https://gyazo.com/de6cff7c6333ad0b9650dfd27bee33c6
2019年度授業時間割
後期:14コマ
https://gyazo.com/b32317fea5a75124ce715455e3ff1386
前期:9コマ
https://gyazo.com/58bf6a65c2c173a034dadd4c964e9fc9
2018年度
https://gyazo.com/e93d79d1628f48f4c013bd88df5e8631 https://gyazo.com/11b9429d34cfe9ba9f70a24375c5b6df
2017年度
https://gyazo.com/3190a89e0038ba03ba6d8a5a27a031b8 https://gyazo.com/ca6dbf613a4f83fae2f12357f802b5a5
https://gyazo.com/5c06b1c41a5f5d0a3b0cce6d0f265152 https://gyazo.com/e6a53caa434fcbf17e0262779159b908
/icons/-.icon
UserScripts
tweet menu
code:script.js
scrapbox.PageMenu.addItem({
title: 'Tweet',
onClick: () => window.open(https://twitter.com/intent/tweet?url=${encodeURIComponent(location.href)}&text=${encodeURIComponent(window.scrapbox.Page.title)})
})
文字数カウントメニュ
code:script.js
scrapbox.PageMenu.addItem({
title: () => {
if (!scrapbox.Page.lines) return
const chars = scrapbox.Page.lines.map(line => line.text.length).reduce((a,b) => a + b)
const words = scrapbox.Page.lines.map(line => line.text.split(/\s+/).length).reduce((a,b) => a + b)
return ${chars}文字 ${words}単語 ${scrapbox.Page.lines.length}行
},
onClick: () => null
})
選択範囲 tweet popup
code:script.js
scrapbox.PopupMenu.addButton({
title: 'Tweet',
onClick: text => {
const lines = text
.map(line => line.replace(/[\\]/g, '').replace(/^\s+/, '')) lines.push(location.href)
const url = https://twitter.com/intent/tweet?&text=${encodeURIComponent(lines.join('\n'))}
const width = 550
const height = 420
const option = width=${width},height=${height},left=${(window.innerWidth - width) / 2},top=${(window.innerHeight - height) / 2},scrollbars=yes,resizable=yes,toolbar=no,location=yes
window.open(url, '_blank', option)
}
})
文字カウントポップアップ
code:script.js
scrapbox.PopupMenu.addButton({
title: function (text) {
const chars = text.replace(/\r\n/g, '').length const words = text.trim().split(/\r\n\s+/).length return ${chars}c ${words}w
},
onClick: () => null
})
日付書式 control+tで日付を入力
code:script.js
scrapbox.TimeStamp.addFormat("]YYYY/MM/DD[ HH:mm:ss")
scrapbox.TimeStamp.addFormat("]YYYY/MM/DD[")
scrapbox.TimeStamp.addFormat("YYYY/MM/DD")
scrapbox.TimeStamp.addFormat("YYYYMMDD")
選択範囲に引用符をつける
code:script.js
scrapbox.PopupMenu.addButton({
title: 'quote',
onClick: text => text.split(/\n/).map(line => > ${line}).join('\n')
})
code:script.js
const __appliedProject__ = scrapbox.Project.name
const __charCounterSetup__ = setInterval(function() {
// ページが準備できるのを待ちたいので、スクリプトがロードされてから3秒くらいしたら処理開始↓↓
if (document.getElementById('editor') && scrapbox.Page.lines)
clearInterval(__charCounterSetup__)
else
return // ページの準備ができてないときはまた3秒待つ
// 下準備
const $id = id => document.getElementById(id)
const $query = q => document.querySelector(q)
const fmt = n => new Intl.NumberFormat('en-US').format(n).padStart(6)
// 文字数カウンター表示用のエレメントを作ってく
const linesText = $query('.lines').innerText.trim()
const chars = linesText.split(/\s+/).join('').length
var counterWrapper = document.createElement('div')
counterWrapper.id = '__charCounter__'
counterWrapper.innerHTML = <span>${fmt(chars)} chars</span> +
'<pre id="__charCounterPopup__" style="opacity:0"></pre>'
$id('editor').appendChild(counterWrapper)
const counter = $query('#__charCounter__ span')
const popup = $id('__charCounterPopup__')
// 文字数カウンターにマウスカーソルを乗せたときに詳細をポップアップする
counter.addEventListener('mouseover',
function() {
const linesText = $query('.lines').innerText.trim()
const chars = linesText.split(/\s+/).join('').length
const words = linesText.split(/\s+/).length
popup.innerHTML = ${fmt(chars)} chars\n +
${fmt(words)} words\n +
${fmt(scrapbox.Page.lines.length)} lines
popup.style.opacity = 1
})
// 文字数カウンターからマウスカーソルが離れたら詳細ポップアップを見えなくする
counter.addEventListener('mouseout', function() { popup.style.opacity = 0 })
// 文字数のみを数え直す関数
const updateCounter = function() {
if ($query('.presentation')
|| scrapbox.Project.name !== __appliedProject__) {
// プレゼンモードになってたり、よそのプロジェクトを表示してたら文字数カウンターを非表示にする
counterWrapper.style.display = 'none'
} else if (scrapbox.Page.lines) {
// ここで数え直ししてます
const linesText = $query('.lines').innerText.trim()
const chars = linesText.split(/\s+/).join('').length
counter.innerText = ${fmt(chars)} chars
counterWrapper.style.display = 'block'
}
}
// 数え直すタイミングは、テキスト入力時とペースト時
$id('text-input').addEventListener('input', updateCounter)
$id('text-input').addEventListener('paste', updateCounter)
// 何もしなくても3秒ごとに数え直す
setInterval(updateCounter, 3000)
}, 3000)
選択文字列をプロジェクト内で検索ポップアップ
code:script.js
// 選択された文字列をScrapboxプロジェクト内で検索する
// Scapbox検索ボックスを使ったときと同じ結果ページを開く
scrapbox.PopupMenu.addButton({
title: 'SB内検索',
onClick: function (text) {
var projectName = 'shio';
}
});
全角半角変換などをする「format」メニュ
1. 箇条書きの先頭を全てTabに置き換える
2. 文中の全角・半角空白を取り除く
3. 文字化けを修正する (今回は での を での に直す)
4. 全角英数字を半角英数字に置き換える
5. 全角括弧を半角括弧に置き換える
6. 括弧で囲まれた前後に空白を入れる
7. コードブロック記法の前後に空白を入れる
code:script.js
scrapbox.PopupMenu.addButton({
title: 'format',
onClick: text => text.split('\n').map(function(line) {
return line.replace(/^\s*/g, s => s.replace(/\s/g, '\t'))
// .replace(/ /g, '')
.replace(/ぁ-ん|ァ-ヴ゙/g, s => String.fromCharCode(s.charCodeAt(0) + 1)) .replace(/A-Za-z0-9/g, s => String.fromCharCode(s.charCodeAt(0) - 0xFEE0)) .replace('(', '(')
.replace(')', ')')
.replace(/\S\(/g, s => s.charAt(0) + ()
.replace(/\)\S/g, s => ') ' + s.charAt(1))
.replace(/\S.*/g, s => s.charAt(0) + ' ' + s.slice(1))
.replace(/.*\S/g, s => s.slice(0, -1) + ' ' + s.slice(-1))
}).join('\n')
})
箇条書きナンバリング
code:script.js
scrapbox.PopupMenu.addButton({
title: 'No.',
onClick: text => text.split(/\n/).map((line, index) => ${index+1}. ${line}).join('\n')
})
音声入力
code:script.js
(() => {
if (!webkitSpeechRecognition) return
const isMobile = () => /mobile/i.test(navigator.userAgent)
const writeText = text => {
console.log('writeText', text)
document.querySelector('.text-input').focus()
document.execCommand('insertText', null, text)
}
const recognition = new webkitSpeechRecognition()
if (!isMobile()) recognition.continuous = true
recognition.onresult = (e) => {
writeText(item.transcript + '\n')
}
let enable = false
scrapbox.PageMenu.addMenu({
title: 'speech input',
})
scrapbox.PageMenu('speech input').addItem({
title: () => (enable ? 'Stop' : 'Start') + ' speech input',
onClick: () => {
if (!enable) recognition.start()
else recognition.stop()
if (!isMobile()) enable = !enable
}
})
})()
Gyazoに飛ぶメニュウの追加
code:script.js
scrapbox.PageMenu.addMenu(
{title:"Gyazo",
})
code:script.js
scrapbox.PageMenu.addItem({
title: 'Zen mode',
onClick: (e) => {
var bg = 'white' // ここにお好きな背景色を入れてね(テーマの背景が黒なら black で)
var style = document.getElementById('__zen__')
if (style) { style.remove(); e.currentTarget.innerText = 'Zen mode'; return }
else e.currentTarget.innerText = String.fromCharCode(0x02713) + ' Zen mode'
var css = body, .page { background-color:${bg} !important; background-image:none !important } +
'.navbar:not(:hover), .line .telomere:not(:hover), .col-page-side:not(:hover) { opacity:0 }'
style = document.createElement('style')
style.setAttribute('id', '__zen__')
style.appendChild(document.createTextNode(css))
document.head.appendChild(style)
}
})
Enterキーで新規ページ作成
code:script.js
$('body').on('keydown',function(e){ // Enterキーで新規ページ作成
if(e.target.tagName != "TEXTAREA" && e.target.tagName != "INPUT"){
if(e.key == 'Enter'){
var project = location.href.split('/')3; location.href = /${project}/new;
}
}
});
$('.btn.btn-default').on('click',function(){
var s = $('.form-control').val();
if(s == ''){
var project = location.href.split('/')3; location.href = /${project}/new;
}
});