This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
ruby '2.1.5' | |
gem 'i18n' | |
gem 'activesupport' | |
gem 'octokit' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
key.setEditKey("M-l", | |
function (ev, arg) { | |
let elem = ev.originalTarget; | |
elem.style.imeMode = { | |
active : "inactive", | |
inactive : "active" | |
}[elem.style.imeMode] || "active"; | |
elem.blur(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void dotimes(void (*func)(void), int n) | |
{ | |
int i; | |
for (i = 0; i < n; ++i) | |
{ | |
func(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Invoke the ``dired'' of current working directory in Emacs buffer. | |
function dired () { | |
emacsclient -e "(dired \"$PWD\")" | |
} | |
## Chdir to the ``default-directory'' of currently opened in Emacs buffer. | |
function cde () { | |
EMACS_CWD=`emacsclient -e " | |
(expand-file-name | |
(with-current-buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun dial-scroll () | |
(interactive) | |
(lexical-let ((last_rad 0.0)) | |
(run-with-timer 0.05 0.05 | |
(lambda () | |
(let ((current_x (car (cdr (mouse-position)))) | |
(current_y (cdr (cdr (mouse-position))))) | |
(let ((diff_x (float (- current_x (/ (window-width) 2)))) | |
(diff_y (float (- current_y (/ (window-height) 2))))) | |
(let ((rad (atan (/ diff_y diff_x)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ecat (){ | |
local ecat_tempfile=`mktemp -t ecat_tempfile.XXXXXXXX` | |
emacsclient -e " | |
(with-current-buffer | |
(if (featurep 'elscreen) | |
(let* ((frame-confs (elscreen-get-frame-confs (selected-frame))) | |
(num (nth 1 (assoc 'screen-history frame-confs))) | |
(cur-window-conf (cadr (assoc num (assoc 'screen-property frame-confs)))) | |
(marker (nth 2 cur-window-conf))) | |
(marker-buffer marker)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar twinstall-curl-program (executable-find "curl")) | |
(defun twinstall-tweet (url) | |
(let* ((name (file-name-nondirectory url)) | |
(text (format "%sをインストールしました。 #emacsjp #twinstall %s" | |
name url))) | |
(twittering-call-api | |
'update-status | |
`((status . ,text))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-private-load-path "auto-complete") | |
(require 'popup) | |
(defun dic-at-point () | |
(interactive) | |
(let* ((word (word-at-point)) | |
(desc (and word (shell-command-to-string (format "dic '%s'" word))))) | |
(when (and desc (null popup-instances)) | |
(popup-tip desc :margin t)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# Please add INDEX to speedup the SQL queries which use LIKE clauses: | |
# | |
# sqlite3 "#{DICT_FILE}" 'CREATE INDEX dict_key ON dict (key COLLATE NOCASE);' | |
SQLITE = "sqlite3" | |
DICT_FILE = "'#{ENV['HOME']}/sys/lib/Dic/EDP/mouseoverdictionary.sqlite'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ clang vla.c | |
$ ./a.out | |
sizeof VLA: 10 | |
sizeof VLA: 20 | |
sizeof VLA: 30 |
OlderNewer