Skip to content

Instantly share code, notes, and snippets.

@uk-ar
uk-ar / gist:782208
Created January 16, 2011 22:16
hideshow-cycle.el
(progn
(load-library "hideshow")
(add-to-list 'hs-special-modes-alist
'(ruby-mode
"class\\|module\\|def\\|if\\|unless\\|case\\|while\\|until\\|for\\|begin\\|do" "end" "#"
;;"\\(def\\|do\\|{\\)" "\\(end\\|end\\|}\\)" "#"
(lambda (arg) (ruby-end-of-block))
;;ruby-move-to-block
nil))
;;hoge
;; (defun my-insert-pair (&optional arg open close fn)
;; (interactive "P")
;; (if (and (interactive-p) transient-mark-mode (not mark-active))
;; (funcall fn)
;; (insert-pair))
;; )
(defun my-insert-pair-gen (func)
(lexical-let ((fn func))
#'(lambda (&optional arg)
(interactive "P")
(defun popwin:popup-buffer-tail (&rest same-as-popwin:popup-buffer)
"Same as `popwin:popup-buffer' except that the buffer will be
`recenter'ed at the bottom."
(interactive "bPopup buffer:\n")
(let ((popup-win (apply 'popwin:popup-buffer same-as-popwin:popup-buffer)))
;;(save-excursion
(save-selected-window
(select-window popup-win)
(set-window-point popup-win (point-max))
(recenter -2)
@uk-ar
uk-ar / minibuffer.user.js
Created May 10, 2011 10:33
minibuffer for firefox4
// ==UserScript==
// @name Minibuffer
// @namespace http://white.s151.xrea.com/
// @description Minibuffer
// @include *
// ==/UserScript==
var VERSION = "2009.12.06";
var Class = function(){return function(){this.initialize.apply(this,arguments)}};
@uk-ar
uk-ar / shibuya-el-position-paper.md
Created August 19, 2012 06:45 — forked from ainame/shibuya-el-position-paper.md
shibuya.elのポジションペーパーです。githubアカウントをお持ちの方はforkしてお使いください。

Shibuya.el#1 ポジションペーパー

Personal

  • 名前(任意)

    • ありさわ
  • Twitter or Facebookのアカウント or HN等

(require 'ert)
;; テストの登録->テストの実行という流れ
;; 1. M-x eval-buffer でテストの登録
;; 2. M-x ert RET でテストの実行
(ert-deftest test1 ()
(should (eq (1+ 1) 2)))
;; (find-file "shibuya_el.org")
class Tab
constructor: ->
@$tabs = ($ '.tab')
@$sections = ($ '.section')
@_idx = 0
current_tab: =>
@$tabs.eq(@_idx)
current_section: =>
@uk-ar
uk-ar / status-2012-10-28.md
Created October 29, 2012 11:12 — forked from frsyuki/status-2012-10-28.md
Fluentd v11 の実装状況 2
(defun my-hook-function ()
(add-to-list 'flex-autopair-pairs '(?\" . ?\")))
(add-hook 'nxml-mode-hook 'my-hook-function)
var raw_data;
var positions = [];
$(function(){
$('#wiki-body').each(function(){
var txt = $(this).html();
var checkbox = '<input class="task-list" type="checkbox" '
$(this).html(
txt.replace(/\[x\]/g, checkbox + 'checked>').
replace(/\[ \]/g, checkbox + '>')
);