Skip to content

Instantly share code, notes, and snippets.


Sukeharu Kano sukeharu

View GitHub Profile
sukeharu / list-style.html
Last active May 8, 2020
View list-style.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
p > code {
padding-left: 0.5rem;
sukeharu /
Created Nov 4, 2018
Hugo Shortcodes embed GitHub Gist

{{< gist username document_name >}}

sukeharu /
Last active Nov 4, 2018
Hugo Shortcodes embed <figure> tag

Basic usage:
{{< figure src="path/to/image.png" >}}

add figcaption:
{{< figure src="path/to/image.png" caption="figure caption" >}}

set width:
{{< figure src="path/to/image.png" caption="figure caption" width="500" >}}

sukeharu / four-digit.scpt
Last active Jun 2, 2017
Get four digit numbers as string from the right end of the unix time number, then set it to the clipboard by AppleScript.
View four-digit.scpt
set d to (do shell script "d=`date +%s`;echo ${d:(-4)}")
set the clipboard to d
sukeharu / openInTerminalAndSublimeText.scpt
Last active May 6, 2017
Open in Terminal and Sublime Text AppleScript
View openInTerminalAndSublimeText.scpt
on run {input, parameters}
tell application "Terminal"
tell front document
do script "cd " & input & "; subl ."
end tell
end tell
return input
sukeharu /
Last active Sep 7, 2016
Scrivener で自分がよくやる操作メモ

Scrivener で自分がよくやる操作メモ

  • 選択したテキストをドキュメントのタイトルにする(英語メニュー:Documents -> Set Selected Text as Title)
opt + shift + cmd + T
  • リンクの名前をリンク先のタイトルで更新する(英語メニュー:Edit -> Update Links To Use Target Title)
sukeharu /
Last active Jul 13, 2016
Apache 2.x で、特定のディレクトリを除きリダイレクトする方法。

Apache 2.x で、特定のディレクトリを除いてリダイレクト

サイトのすべてのファイルを にリダイレクトする。ただし、dir1ディレクトリ以下は除外する(リダイレクトしない)。

RedirectMatch 301 "^/((?!dir1).*)$"


RedirectMatch 301 "^/((?!(dir1|dir2)).*)$"
sukeharu / gist:d6af98f5408f582e1206
Last active Mar 6, 2016
Raspberry Pi List all installed packages
View gist:d6af98f5408f582e1206
# Output installed packages list in terminal(less)
$ dpkg --get-selections | less
# or if you want to output into text file, do like this.
$ dpkg --get-selections > installed.txt