Skip to content

Instantly share code, notes, and snippets.

View kosh04's full-sized avatar
🎧

KOBAYASHI Shigeru kosh04

🎧
View GitHub Profile
@death
death / google-chart.lisp
Created January 18, 2010 04:31
A simple Google Chart wrapper for Common Lisp
;;;; A simple Google Chart wrapper for Common Lisp
;;;
;;; API reference: http://code.google.com/apis/chart/
;;;
;;; WARNING: Incomplete and buggy -- still has much to be done, e.g.:
;;;
;;; * more thorough testing (that won't be hard...)
;;;
;;; * handle spaces/newlines appropriately
/***********************************************************************
* connect.c -- Make socket connection using SOCKS4/5 and HTTP tunnel.
*
* Copyright (c) 2000-2006 Shun-ichi Goto
* Copyright (c) 2002, J. Grant (English Corrections)
* Copyright (c) 2010, Reini Urban (added realm to http_auth basic)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
@youz
youz / gist:467696
Created July 8, 2010 06:18
Tetrlang Interpreter for xyzzy
;;; Tetrlang Interpreter for xyzzy
;;; 元ネタ
;;; わーい、テトリス言語 Tetrlang 完成したよー\(^o^)/
;;; http://d.hatena.ne.jp/athos/20100707/tetrlang
(defpackage :tetrlang
(:use :lisp :editor))
(in-package :tetrlang)
@miyamuko
miyamuko / gist:1026413
Created June 15, 2011 03:19
#xyzzy の calc.l を使って中置記法から前置記法(ポーランド記法)への変換
;; xyzzy の calc.l を使って中置記法から前置記法(ポーランド記法)への変換
;;
;; 参考:
;;
;; 中置記法から前置記法(ポーランド記法)への変換 - sketch code
;; http://d.hatena.ne.jp/ibaza/20070602/1180762871
;; based on ed::calc-string
(defun infix->prefix (string)
(let ((*read-default-float-format* 'double-float)
@rgrove
rgrove / Makefile
Created July 30, 2011 22:01
Simple Makefile to minify CSS and JS.
# Patterns matching CSS files that should be minified. Files with a -min.css
# suffix will be ignored.
CSS_FILES = $(filter-out %-min.css,$(wildcard \
public/css/*.css \
public/css/**/*.css \
))
# Patterns matching JS files that should be minified. Files with a -min.js
# suffix will be ignored.
JS_FILES = $(filter-out %-min.js,$(wildcard \
@saiten
saiten / radiru.txt
Created September 1, 2011 09:02
らじるらじるをrtmpdumpで録音する
# RTMPEのtype9 handshakeに対応している必要があるのでRTMPDump v2.4必須
# CentOS5 32bitのさくらVPS、OSX Lionで動作確認。(OSX LionではRTMPDumpを32bitでビルド)
# ラジオ第1
rtmpdump --rtmp "rtmpe://netradio-r1-flash.nhk.jp" \
--playpath 'NetRadio_R1_flash@63346' \
--app "live" \
-W http://www3.nhk.or.jp/netradio/files/swf/rtmpe.swf \
--live \
-o r1.m4a
;;; -*- Package: User; Syntax: Common-Lisp; Mode: Lisp; Base: 10 -*-
;;; unify.lisp
(in-package "USER")
;;; ****************************************************************
;;; Unification Algorithm ******************************************
;;; ****************************************************************
;;;
;;; Random implementations of unification.
@addyosmani
addyosmani / pubsub.md
Created October 28, 2011 06:49
Four ways to do Pub/Sub with jQuery 1.7 and jQuery UI (in the future)

#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)

Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.

(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)

##Option 1: Using jQuery 1.7's $.Callbacks() feature:

$.Callbacks are a multi-purpose callbacks list object which can be used as a base layer to build new functionality including simple publish/subscribe systems. We haven't yet released the API documentation for this feature just yet, but for more information on it (including lots of examples), see my post on $.Callbacks() here:

@youz
youz / json-encode.l
Created November 2, 2011 08:22
json-encode.l #xyzzy
;;; -*- mode:lisp; package:json -*-
(in-package "json")
(export '(json-encode
write-json))
(defun json-encode (obj)
(with-output-to-string (s)
(write-json obj s)))
@youz
youz / markdown-mode.l
Created November 4, 2011 12:53
改変 markdown-mode for #xyzzy (色付け & メジャーモード化)
;; -*- mode:lisp; package:markdown-mode -*-
;; markdown.l ( http://www.geocities.jp/kiaswebsite/xyzzy/markdown.html )
;; Rev: 227 を元に改変
;;
;; License
;; =======
;;
;; Copyright (c) 2011 Yousuke Ushiki <citrus.yubeshi@gmail.com>
;; Copyright (c) 2005,2006 kia