This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -Ku | |
# _*_ coding:UTF-8 _*_ | |
require 'mplayer-ruby' | |
require 'libnotify' | |
class MPlayer::Slave | |
def now_playing | |
summary = "" | |
summary += get(:meta_title).chomp | |
summary += " -- " + get(:meta_artist).chomp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :shelly) | |
(export (defvar *argv* nil)) | |
(in-package :cl-user) | |
(defun script (file argv) | |
"Execute a file as script ignoring shebang" | |
(setf shelly:*argv* argv) | |
(let* ((in (open file :if-does-not-exist :error)) | |
(first-char (read-char in)) | |
(second-char (read-char in))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function migrate_to_mp3 (){ | |
for f in *.$1 | |
do | |
mp3=${f%.$1}.mp3 | |
if [ ! -f $mp3 ];then | |
ffmpeg -i $f $mp3 | |
fi | |
rm $f | |
done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun dired-tar (tarname files &optional arg) | |
"A dired-mode extension to archive files marked. With prefix argument, the tarball is gziped." | |
(interactive (let ((files (dired-get-marked-files))) | |
(list (read-string "Tarball name: " (concat (file-relative-name (car files)) ".tar.gz")) | |
files "P"))) | |
(let ((tar (if arg | |
(if dired-guess-shell-gnutar | |
(concat dired-guess-shell-gnutar " zcf %s %s") | |
"tar cf - %2s | gzip > %1s") | |
"tar cf %s %s"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1 - [2013-10-09 20:48:20] "GET / HTTP/1.1" 304 0 "-" "Drakma/1.3.4 (SBCL 1.1.12.9-83de338; Linux; 3.8.0-32-generic; http://weitz.de/drakma/)" | |
ok 1 | |
not ok 2 | |
# got: NIL | |
# expected: #() | |
not ok 3 - No Content-Type | |
# got: T | |
# expected: NIL | |
not ok 4 - No Content-Length | |
# got: T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ql:quickload :unix-options) | |
(defvar *argv* nil) | |
(defvar *argf* *standard-input*) | |
(defvar *-i* nil) | |
(defvar *-F*) | |
(defvar *_*) | |
(defvar *?*) | |
(defmacro $ (sym &optional arg) | |
(etypecase sym | |
(fixnum (if (zerop sym) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ql:quickload :bordeaux-threads) | |
(ql:quickload :log4cl) | |
; debugとinfoのログレベルのメッセージを交互に吐き続けるスレッドを作成 | |
(defparameter thrd (bordeaux-threads:make-thread | |
(lambda () (loop | |
(log:debug "this is debug") | |
(log:info "this is ~{~a~}" '(#\i #\n #\f #\o)) | |
(sleep 1))))) | |
;(infoしか出力されない) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# _*_ coding:UTF-8 _*_ | |
require 'msgpack' | |
require 'socket' | |
TCPSocket.open "127.0.0.1", "24224" do |sock| | |
sock.write ["debug.access", [1308466941, {"a"=>1}], [1308466942, {"b"=>2}]].to_msgpack | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/ports/security/sudo # make install clean | |
===> sudo-1.8.8 depends on shared library: libintl.so - not found | |
===> Verifying for libintl.so in /usr/ports/devel/gettext | |
===> Building for gettext-0.18.3.1 | |
Making all in gnulib-local | |
Making all in gettext-runtime | |
/usr/bin/make all-recursive | |
Making all in doc | |
Making all in intl | |
Making all in intl-java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git pull | |
Already up-to-date. | |
$ rake clean clobber | |
Deleting directory /home/kim/compile/mirah/build | |
rm -f javalib/mirah-bootstrap.jar | |
rm -f javalib/mirah-compiler.jar | |
rm -f javalib/mirah-builtins.jar | |
rm -f javalib/mirah-util.jar | |
rm -f javalib/mirah-mirrors.jar | |
rm -rf tmp |
OlderNewer