Skip to content

Instantly share code, notes, and snippets.

@kenoss
kenoss / gist:8985182
Last active August 29, 2015 13:56
If point is end of line, expand abbreviation. If not, go to the end of line.
typeset -A myabbrev
myabbrev=(
"DN" "&> /dev/null"
"L" "| $PAGER "
"G" "| grep "
"S" "| sed '_|_'"
"R" " rm "
"M" " mkdir "
"C" " cat "
"TX" " tar -xvzf "
@kenoss
kenoss / erfi-srfi-1-temporary.el
Created May 27, 2014 03:24
WIP SRFI-1 implementation
;;; erfi-srfi-1.el --- SRFI-1 -*- lexical-binding: t -*-
;; Copyright (C) 2014 Ken Okada
;; Author: Ken Okada <keno.ss57@gmail.com>
;; Keywords: extensions, lisp
;; URL: https://github.com/kenoss/erfi
;; Package-Requires: ((emacs "24"))
;; Apache License, Version 2.0
@kenoss
kenoss / init-powerline.el
Created December 10, 2014 14:09
Powerline configuration with evil
;;; init-powerline.el --- conifg of powerline.el -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2014 Ken Okada
;; Author: Ken Okada <keno.ss57@gmail.com>
;; Apache License, Version 2.0
;;; Commentary:
@kenoss
kenoss / file0.txt
Last active August 29, 2015 14:11
Evilのカーソルにちょっとした工夫 ref: http://qiita.com/kenoss/items/f4d5a5f88af7a7477cfd
(setq evil-default-cursor 'hbar
evil-normal-state-cursor '("darkolivegreen") ; ノーマルステートでは穏かな緑の水平バーに.
evil-insert-state-cursor '("#800000" (bar . 2))) ; 挿入ステートでは目立つ赤い垂直バーに.
(blink-cursor-mode -1)
@kenoss
kenoss / init-jumar.el
Last active August 29, 2015 14:17
今の jumar.el の設定
;;; init-jumar.el --- config of jumar -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2014 Ken Okada
;; Author: Ken Okada <keno.ss57@gmail.com>
;; Apache License, Version 2.0
;;; Commentary:
@kenoss
kenoss / linum-mode-exception.el
Created March 28, 2015 07:17
Disable global-linum-mode for some files.
(defvar linum-exceptional-regexp-list '(" \\*WM:.+" "\\*scratch\\*"))
(defadvice linum-mode (around hoge activate)
(when (or (eq linum-mode t)
(not (cl-find (buffer-name) linum-exceptional-regexp-list :test (lambda (str rx) (string-match rx str)))))
ad-do-it))
@kenoss
kenoss / .vimrc
Created April 16, 2015 14:23
Dirty growing .vimrc
" Note: Skip initialization for vim-tiny or vim-small.
if !1 | finish | endif
if has('vim_starting')
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/

コメントが送信できないので.

http://mae.chab.in/archives/2529

いくつか日本語を読んでて引っかかった部分を再訳してみました. つまらない訳やすごい意訳の部分があるので参考まで.


どのようにHTMLのタグと作ったコンポーネントをミックスしているか理解しましょう。HTMLコンポーネントは、ひとつ違いはありますが、あなたが定義するコンポーネントと同じような標準のReactコンポーネントです。JSXのコンパイラは自動的にHTMLタグをReact.createElement(tagName) のような形式で書き換え、他のすべてから放置します。これはグローバルの名前空間の汚染を防ぐためです。

@kenoss
kenoss / gist:d7fb2a2f2e2fed66c45e
Last active August 29, 2015 14:23
Cycle: just-one-space, just-one-space/multi-line
;;; tmp
(require 'erfi-macros)
(defalias 'erfi:receive 'erfi%list-receive)
;;;
;; In this case, I don't use undo because undo for insert is not reliable.
;; Should I make a class `recoverable-side-effect'?
;;; Help at point
(defun kef-show-help-emacs-lisp-symbol (&optional pos) (interactive)
(save-excursion
(save-restriction
(when pos (goto-char pos))
(rlet1 symbol (intern (thing-at-point 'symbol))
(cond ((fboundp symbol)
(flet ((completing-read (&rest args) symbol))
(describe-function symbol)))
((boundp symbol)