Skip to content

Instantly share code, notes, and snippets.

View shnarazk's full-sized avatar
🛏️
Painful days

Narazaki, Shuji shnarazk

🛏️
Painful days
View GitHub Profile
@shnarazk
shnarazk / react-handson.md
Last active August 23, 2021 00:18
hands on react
{
"photos":
[
{
"id": 0,
"title": "aa",
"image": "aa",
"date": "2020-10-01",
"place": "福岡",
"star": 3
@shnarazk
shnarazk / init.el
Created May 8, 2018 15:18
evil indicator
(eval-after-load "evil"
'(progn
(defadvice evil-insert-state (after highlight-evil-insert-state activate)
(when (evil-insert-state-p)
(let ((ol (save-excursion (make-overlay (progn (beginning-of-line) (point))
(progn (end-of-line) (point))))))
(unwind-protect
(progn
(overlay-put ol 'face 'highlight)
(sit-for 0.2))
@shnarazk
shnarazk / SCUS-potassco-01.md
Last active March 30, 2018 01:03
memo on POTASSCO User Guide
@shnarazk
shnarazk / bl.pl
Last active February 27, 2018 02:56
Baby Lizards
% <configuration>
#const n = 8.
#const m = 8.
tree(1,5,5).
tree(2,6,3).
% </configuration>
lizard(1..m).
posx(1..n).
posy(1..n).
@shnarazk
shnarazk / test.ipynb
Created November 18, 2017 06:48
Jupyter R demo with a graph
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\makeatletter
\def\input@path{{./}{../}}
\makeatother
\input{commitid.tex}
\def\beamerrfoot{\GITCommitID@\GITAuthorDate}
#!/bin/sh
# this should be as GIT/hooks/{post-commit,post-merge}
if [ -n "${GIT_DIR}" ] ;
then
TARGET=${GIT_DIR}/../commitid.tex ;
else
TARGET=commitid.tex ;
fi
git log -1 --format="format:\
\\gdef\\GITCommitHash{%H}%n\
\def\beamerlfoot{}
\def\beamerrfoot{}
\setbeamertemplate{footline}%{miniframes theme}% {%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}{section in head/foot}
\vskip4pt\hskip0pt% {\hbox to 0.4\textwidth{\hspace{2mm}\textcolor{gray}{\beamerlfoot\hfill}}}%
\hfill\insertframenumber/\inserttotalframenumber\hfill%
@shnarazk
shnarazk / init.el
Last active February 13, 2017 11:10
using all Emacs features in insert mode of Evil
;; * evil
(autoload 'evil-local-mode "evil" nil t)
(define-key global-map (kbd "C-]") 'evil-normal-state-or-mode)
(defun evil-normal-state-or-mode ()
(interactive)
(cond ((not (boundp 'evil-local-mode)) (evil-local-mode))
((not evil-local-mode) (turn-on-evil-mode))
((eq evil-state 'normal) (turn-off-evil-mode))
(t (evil-normal-state))))