Skip to content

Instantly share code, notes, and snippets.

@yonta
yonta / my_eval.el
Last active May 17, 2016 04:39
連番作るコマンドを作りたい
(setq my-repeat-num-command
"(loop for i from 1 to 10 do (insert (format \"%d\n\" i)))")
(defun my-insert-command () (insert my-repeat-num-command))
(defun eval-repeat-number ()
(progn
(add-hook 'eval-expression-minibuffer-setup-hook 'my-insert-command)
(eval-expression)
(remove-hook 'eval-expression-minibuffer-setup-hook 'my-insert-command)))
@yonta
yonta / aobench
Last active April 2, 2016 15:39
Eldeshさんのaobenchやったらセグフォ
$ ./meta-aobench.sh
gcc is running
real 0m1.169s
user 0m1.168s
sys 0m0.000s
Standard ML of New Jersey v110.78 [built: Thu Jul 23 11:21:58 2015]
[scanning aobench.cm]
[library $SMLNJ-BASIS/basis.cm is stable]
[library $SMLNJ-LIB/Util/smlnj-lib.cm is stable]
@yonta
yonta / 職務履歴書.md
Last active January 22, 2016 03:56
職務履歴書

職務履歴書

勤務先会社名

非公開

勤務先資本金

約2000億円

@yonta
yonta / Raspberry Pi 2 + Arduino IDE
Created April 24, 2015 10:29
How to use Arduino IDE in Raspberry Pi 2
How to use Arduino IDE 1.5.6-r2 in Raspberry Pi 2
---------------------------------------------------
written by Keita SAITOU in 2015/04/24
1. Getting Arduino IDE
* http://www.arduino.cc/en/Main/Software
* previous release -> Arduino 1.5.6-r2 BETA -> Linux 32bit
* decompressin by `tar xzf arduino1.5.6-r2.tar.gz`
@yonta
yonta / gist:331da7521a0caa17be40
Last active August 29, 2015 14:17
Lubuntu 14.10でLubuntu14.04-2LTSのカスタムLiveDVDを作る手順
# 14.10のカスタムを作ろうとするとビルド失敗する、よくわからない
# 開発に必要そうなのを一括でいれて、exitすればよい
# 下記コマンドによって開発環境を整える
add-apt-repository ppa:tualatrix/ppa && \
add-apt-repository ppa:webupd8team/java && \
apt-get update && \
apt-get upgrade && \
apt-get install oracle-java8-installer && \
apt-get install \
@yonta
yonta / build.sh
Last active August 29, 2015 14:14
SML# test
gcc -o hoge.o -c hoge.c
smlsharp -o run fuga.sml hoge.o
./run
@yonta
yonta / SMLCheetSheet.md
Last active February 9, 2022 12:59
SML Cheet Sheet

SMLチートシート

  • SMLは宣言を並べていく言語
    • 宣言同士は;で区切れる(省略可)
    • REPLの多くは;ごとにコンパイルが走る
  • 拡張子は.sml
    • シグネチャーは.sig
    • SML#ではインタフェースファイル.smiもある
    • NJではコンパイル用に.cm、MLtonでは.mlbなども
  • 構成、分解の例を使って説明する
fun id x = x;;
@yonta
yonta / suffix-space.patch
Created October 9, 2014 00:37
twittering-mode patch
diff --git a/twittering-mode.el b/twittering-mode.el
index d345b0a..13bd792 100644
--- a/twittering-mode.el
+++ b/twittering-mode.el
@@ -639,6 +639,9 @@ An interval for a timeline is determined as follows;
(defvar twittering-relative-retrieval-count-alist '()
"An alist for counting retrieval of primary timelines.")
+(defvar twittering-suffix-space-size 0
+ "Width of a non using area before end-of-line in twittering-mode windows, when using a `%FOLD' fomat.")
@yonta
yonta / gist:75771f2ed5f7ca9533e6
Created August 4, 2014 04:54
msys git/hg memo
source /c/Git/etc/git-completion.bash
source /c/Git/etc/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE="true" # non empty value
source /c/Mercurial/Contrib/bash_completion