Skip to content

Instantly share code, notes, and snippets.

@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
@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
@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
;; 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)
@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))))
#! /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じゃ使えないかもしれない。
@joakimbeng
joakimbeng / router.html
Last active March 15, 2024 06:18
A really simple Javascript router
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Building a router</title>
<script>
// Put John's template engine code here...
(function () {
// A hash to store our routes:
@sebmarkbage
sebmarkbage / JSXSpreadAttributes.md
Last active August 13, 2020 15:18
JSX Spread Attributes

JSX Spread Attributes

If you know all the properties that you want to place on a component a head of time, it is easy to use JSX:

  var component = <Component foo={x} bar={y} />;

Mutating Props is Bad, mkay

@youcune
youcune / fadein.html
Created August 24, 2014 12:23
CSS3 のみで display: none からフェードインさせる
<!DOCTYPE html>
<html>
<head>
<meta charst='utf-8'>
<title>TEST</title>
<script src="//code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
<style>
.box {
background: #000000;
display: none;