Skip to content

Instantly share code, notes, and snippets.

View taylormck's full-sized avatar

Taylor taylormck

  • Yokohama, Japan
  • 17:41 (UTC +09:00)
View GitHub Profile
@taylormck
taylormck / pitchAccentHighlight.js
Last active March 6, 2017 19:28
Highlight the Pitch Accent of Kana in an Anki Card
var littleKana = ['ょ', 'ゅ', 'ゃ', 'ぁ', 'ぃ', 'ぅ', 'ぇ', 'ぉ'];
var kana = [];
var kanaString = document.getElementById('kana').innerHTML;
var intonation = Number(document.getElementById('intonation').innerHTML);
function replaceString (first, last) {
var beginTag = (
'<span style="' +
'border-top: medium solid;'
);
@taylormck
taylormck / pre-commit
Last active December 27, 2015 15:09
Strong pre-commit hook I'm working on.Not done yet, but getting there.
#!/bin/sh
# Rebase commits run in headless branches named with 'no branch'
# If we're in a branch with that name, assume we're rebasing
# If we really want to run checks during rebasing,
# there's a pre-rebase hook available
BRANCH_NAME=$(git branch | grep '*' | grep -c 'no branch')
if [ "$BRANCH_NAME" != "0" ]
then
exit 0