Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
SCRIPT_DIR="$PWD/$(dirname $0)"
if [[ ! -e ${SCRIPT_DIR}/env/bin/activate ]]; then
python3 -m venv ${SCRIPT_DIR}/env
fi
source ${SCRIPT_DIR}/env/bin/activate
#!/usr/bin/env bash
set -e
declare -A counts
for file in $(git ls-files)
do
count=$(git shortlog -s -n --all --no-merges $file | wc -l)
counts[$file]=$count
done
@syohex
syohex / cmake.manpage.diff
Created March 24, 2020 05:17
man diff of homebrew binary cmake on catalina
--- old.cmake.1 2020-03-24 14:16:23.000000000 +0900
+++ cmake.1 2020-03-24 14:15:43.000000000 +0900
@@ -226,7 +226,7 @@
.B \fB\-B <path\-to\-build>\fP
Path to directory which CMake will use as the root of build directory.
.sp
-If the directory doesn’t already exist CMake will make it.
+If the directory doesn't already exist CMake will make it.
.TP
.B \fB\-C <initial\-cache>\fP
@syohex
syohex / syohex.ahk
Created March 17, 2020 11:27
My Autohotkey script
^#h::^#Left
^#l::^#Right
#`::!`
@syohex
syohex / not-override-defun.el
Created February 7, 2017 06:45
Don't allow to redefine function
(defmacro my-defun (name arglist &rest body)
(declare (debug defun) (doc-string 3) (indent 2))
`(if (fboundp ',name)
(error "`%s' is already defined" ',name)
(defun ,name ,arglist ,@body)))
(my-defun car (lst)
(nth 0 lst)) ;; car is already defined
@syohex
syohex / magit24.5.log
Last active October 11, 2016 15:57
magit install log on Emacs 24.5, Emacs 25.1 and Emacs 26.0.50.1
Contacting host: melpa.org:443
Making version-control local to dash-autoloads.el while let-bound!
Generating autoloads for dash.el...done
Saving file /home/syohei/.cpanm/latest-build/test/elpa/dash-20160820.501/dash-autoloads.el...
Wrote /home/syohei/.cpanm/latest-build/test/elpa/dash-20160820.501/dash-autoloads.el
(No files need saving)
Checking /home/syohei/.cpanm/latest-build/test/elpa/dash-20160820.501... [2 times]
Compiling /home/syohei/.cpanm/latest-build/test/elpa/dash-20160820.501/dash-pkg.el...done
Wrote /home/syohei/.cpanm/latest-build/test/elpa/dash-20160820.501/dash-pkg.elc
Checking /home/syohei/.cpanm/latest-build/test/elpa/dash-20160820.501...
# perl -V
Summary of my perl5 (revision 5 version 22 subversion 1) configuration:
Platform:
osname=netbsd, osvers=netbsd, archname=amd64-netbsd
uname='netbsd 7.0 netbsd 7.0 (generic.201509250726z) amd64 '
config_args='-des -Dprefix=/root/local/perl'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
@syohex
syohex / alchemist-test.log
Created September 13, 2016 08:21
alchemist test log on Ubuntu 16.04 elixir-1.1.0
syohei@ubuntu64:~/.cpanm/latest-build/alchemist.el$ make test
Clean *.elc files:
rm -f *.elc
make unit
make[1]: Entering directory '/home/syohei/.cpanm/work/1473146396.37496/alchemist.el'
Run tests:
@syohex
syohex / old-vendoring.sh
Created September 12, 2016 01:02
Convert to old vendoring style
#!/usr/bin/env bash
set -e
mv vendor _vendor
mkdir -p _vendor/src
cd _vendor
for dir in *