Skip to content

Instantly share code, notes, and snippets.

@tkych
tkych / check-digest.lisp
Last active December 13, 2015 22:39
check digest script
;;;; Last modified : 2013-02-19 22:33:54 tkych
;;====================================================================
;; Check Digest
;;====================================================================
(ql:quickload :ironclad)
(defun check-digest (file-spec digest-name check-sum)
(loop
@tkych
tkych / minimum-prompt.el
Last active December 14, 2015 01:09
minimum prompt for eshell
;;;; Last modified : 2013-02-21 20:11:37 tkych
;;====================================================================
;; Minimum Prompt for Eshell
;;====================================================================
;; Only when working-directory or user-name is changed, displays it.
;; Note:
;; If more than 2 eshells are opened and switched them,
;; working-directory may be displayed without changing working-directory.
@tkych
tkych / oop-fp-clos-example.lisp
Last active December 14, 2015 22:49
Coursera, Programming-Languages, Week8, OOP vs FP, Generic function model OOP by CLOS
;;;; Last modified : 2013-03-14 22:00:40 tkych
;; Coursera, Programming-Languages, Week8, OOP vs FP
;; Generic function model OOP by CLOS
;; CL-REPL> (load "oop-fp-clos-example.lisp")
;;====================================================================
;; Adding Operations or Variants
@tkych
tkych / oop-fp-eieio-example.el
Last active December 14, 2015 22:48
Coursera, Programming-Languages, Week8, OOP vs FP, Generic function model OOP by EIEIO
;;;; Last modified : 2013-03-14 22:05:30 tkych
;; Coursera, Programming-Languages, Week8, OOP vs FP
;; Generic function model OOP by EIEIO
;; M-x ielm ; Inferior Emacs Lisp Mode
;; ELISP> (load "oop-fp-eieio-example.el")
;;====================================================================
@tkych
tkych / morse.lisp
Last active December 15, 2015 15:09
string <-> morse code
;;;; Last modified : 2013-05-31 18:03:49 tkych
;; Usage:
;; (string-to-morse "Samuel")
;; => "... ._ __ .._ . ._.."
;; (morse-to-string "__ ___ ._. ... .")
;; => "MORSE"
;; (string-to-morse "Samuel Morse")
;; => error!! #\Space can't be converted into morse code.
@tkych
tkych / lisp-templete.lisp
Created May 28, 2013 03:11
Template for lisp file
;;;; Last modified : 2013-05-28 12:08:22 tkych
;;====================================================================
;; Template for Lisp File
;;====================================================================
(in-package :cl-user)
(ql:quickload :simple-date-time)
@tkych
tkych / minimum-feed-reader.lisp
Last active December 21, 2015 05:19
Minimum-Feed-Reader, example for cl-feed-parser (https://github.com/tkych/cl-feed-parser)
;;;; Last modified : 2013-08-17 21:01:33 tkych
;; Example for cl-feed-parser (https://github.com/tkych/cl-feed-parser)
;; Usage:
;; ------
;; * (defparameter f "http://www.whitehouse.gov/feed/press")
;; * (show-entry-titles f)
;; * (read-nth-entry 2 f)
@tkych
tkych / fukushima-monitor.lisp
Last active December 22, 2015 17:58
Radiation Monitor for Fukushima Daiichi Nuclear Power Station: fetch the monitoring data from http://www.tepco.co.jp/en/nu/fukushima-np/f1/images/2013monitoring/f1-mp-tcnew-e.zip, and output data as sparkline.
;;;; Last modified: 2013-09-18 20:24:02 tkych
;; This script is in the public domain.
;; Latest version is available at https://gist.github.com/tkych/6509285
;;====================================================================
;; Radiation Monitor for Fukushima Daiichi Nuclear Power Station
;;====================================================================
;;
@tkych
tkych / github-commit-stats.lisp
Last active July 15, 2020 10:32
This script shows github commit statistics as sparkline.
;;;; Last modified: 2013-09-18 07:21:52 tkych
;; This script is in the public domain.
;; Latest version is available at https://gist.github.com/tkych/6593401
;;====================================================================
;; GitHub Commit Statistics
;;====================================================================
;;
@tkych
tkych / hello-world.lisp
Created September 27, 2013 09:57
Print "Hello World" to stdout without numbers, characters and strings in Common Lisp. c.f. http://codeiq.hatenablog.com/entry/2013/09/25/163547
#!/usr/local/bin/sbcl --script
;; Print "Hello World" to stdout without numbers, characters and strings in Common Lisp.
;;
;; c.f. http://codeiq.hatenablog.com/entry/2013/09/25/163547
;;
;; Usage:
;; $ chmod u+x hello-world.lisp
;; $ ./hello-world.lisp