Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env ruby
# vim: set et sts=2 sw=2 ts=2 fdm=marker ft=ruby :
# author: takano32 <tak@no32 dot tk>
#
require 'rubygems'
require 'pit'
# ブラウザの起動とかを見えないようにできるけど、Xvfbとか必要
# Darwinじゃ使えないかもしれない。
@m2ym
m2ym / gist:774198
Created January 11, 2011 08:28
cl-indent-patchesの設定(Emacs LispとCommon Lispの共存)
(when (require 'cl-indent-patches nil t)
(setq lisp-indent-function
(lambda (&rest args)
(apply (if (memq major-mode '(emacs-lisp-mode lisp-interaction-mode))
'lisp-indent-function
'common-lisp-indent-function)
args))))
;; http://d.hatena.ne.jp/kitokitoki/20101009/p6
(defmacro grep-no-more-read-only (name)
`(defadvice ,name (before ,(intern (concat "my-" (symbol-name name))) activate)
"Prevent Buffer is read-only: #<buffer *grep*> error"
(when (get-buffer "*grep*")
(when (y-or-n-p "Kill current *grep* buffer?")
(kill-buffer (get-buffer "*grep*"))))))
(grep-no-more-read-only lgrep)
@bkudria
bkudria / flymake-fringe-icons.el
Created December 29, 2010 21:56
Add icons in the fringe, for flymake
(require 'fringe-helper)
(require 'flymake)
(defvar flymake-fringe-overlays nil)
(make-variable-buffer-local 'flymake-fringe-overlays)
(defadvice flymake-make-overlay (after add-to-fringe first
(beg end tooltip-text face mouse-face)
activate compile)
(push (fringe-helper-insert-region
@mhayashi1120
mhayashi1120 / fgit.el
Created October 21, 2010 13:01
my git interface
;;; fgit.el --- Functional Git interface for emacs
;; Copyright (C) 2010 by Hayashi Masahiro
;; Author: Hayashi Masahiro <mhayashi1120@gmail.com>
;; URL:
;; Keywords: Emacs, Git, Frontend
;; Version: 0.0.1
;; fgit.el is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@hitode909
hitode909 / negaproxy.rb
Created April 18, 2010 08:36
画像の色を反転させるプロキシ
#!/usr/bin/env ruby
require 'webrick'
require 'webrick/httpproxy'
require 'RMagick'
handler = Proc.new() { |req,res|
if res['content-type'] =~ /image/
begin
img = Magick::Image.from_blob(res.body).first