Skip to content

Instantly share code, notes, and snippets.

(progn
(defun gcode-lookup ()
"カーソル位置のシンボルをGoogle Codeで検索(lisp決め打ち)"
(interactive)
(browse-url
(format "http://www.google.com/codesearch?q=%s+lang:%s+file:\\.%s$&hl=ja&num=20"
(thing-at-point 'symbol) "lisp" "lisp")))
(define-key slime-mode-map [(control ?c) (control ?d) ?g] 'gcode-lookup))
(require :contextl)
(defpackage :8oclock (:use :cl :contextl))
(in-package :8oclock)
(defclass announce ()
((date :initarg :date :accessor date :type string)
(mesg :initarg :mesg :accessor mesg)
(footer :initarg :footer :accessor footer)
(times :initarg :times :accessor times)
require 'fiber'
f1 = nil
f2 = nil
f1 = Fiber.new do
puts 'f1-0'
f2.resume
puts 'f1-1'
f2.resume
use strict;
use warnings;
package Count;
sub new {
my $class = shift;
my $start = shift || 0;
bless { count => $start }, $class;
@yono
yono / pykf_wrapper.py
Created November 10, 2009 09:01
pykf を使いやすくするためのラッパー
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
pykf_wrapper.py
pykf を使いやすくするためのラッパー
使い方
;;;smartchr.el
;;http://d.hatena.ne.jp/IMAKADO/20080913/1221328814
(eval-when-compile (require 'cl))
(defun smartchr (list-of-string)
(lexical-let ((los list-of-string)
(last-word "")
(count 0))
(lambda ()
(interactive)
(if (eq this-command real-last-command)
@ieure
ieure / python-pep8.el
Created February 12, 2010 18:49
Run pep8.py on Python source in Emacs.
;;; python-pep8.el --- minor mode for running `pep8'
;; Copyright (c) 2009, 2010 Ian Eure <[email protected]>
;; Author: Ian Eure <[email protected]>
;; Keywords: languages python
;; Last edit: 2010-02-12
;; Version: 1.01
(defcustom historyf-major-modes
'(emacs-lisp-mode
lisp-interaction-mode
c-mode cc-mode c++-mode java-mode
perl-mode cperl-mode python-mode ruby-mode
ecmascript-mode javascript-mode js2-mode php-mode css-mode
makefile-mode sh-mode fortran-mode f90-mode ada-mode
xml-mode sgml-mode)
"Target major-mode."
:type 'list
@Shougo
Shougo / .vimrc
Created April 17, 2010 00:09 — forked from tyru/.vimrc
" Capture {{{
command!
\ -nargs=+ -bang
\ -complete=command
\ Capture
\ call s:cmd_capture([<f-args>], <bang>0)
function! C(cmd)
redir => result
silent execute a:cmd
@hokaccha
hokaccha / .vimrc
Created April 27, 2010 09:19 — forked from Shougo/.vimrc
" Capture {{{
command!
\ -nargs=1
\ -complete=command
\ Capture
\ call Capture(<f-args>)
function! Capture(cmd)
redir => result
silent execute a:cmd