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
(autoload 'js-console "js-console" nil t) | |
(defun js-console-eval-region (start end) | |
"Execute region" | |
(interactive "r") | |
(let ((buf-name (buffer-name (current-buffer)))) | |
(copy-region-as-kill start end) | |
(switch-to-buffer-other-window "*js*") | |
(js-console-exec-input (car kill-ring)) | |
(switch-to-buffer-other-window buf-name))) | |
(defun run-js-console-and-split-window () |
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 latex-to-google-chart-api (start end) | |
(interactive "r") | |
(let ((latex-expression (kill-region start end))) | |
(insert-string | |
(concat "<img src=\"http://chart.apis.google.com/shart?cnt=tx&chl=" | |
(w3m-url-encode-string (car kill-ring)) | |
"\" alt=\"\" />") ))) |
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
;; デフォルトのinit.elの末尾に追加 | |
;; My Settings for gnupack {{{1 | |
;; key mapping {{{2 | |
;; C-hをバックスペースに | |
(keyboard-translate ?\C-h ?\C-?) | |
(global-set-key (kbd "C-x ?") 'help-command) | |
;; C-x bでミニバッファにバッファ候補表示 | |
(iswitchb-mode t) | |
(iswitchb-default-keybindings) | |
;; C-kで行全体削除 |
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
-- 要XML Tools http://www.latenightsw.com/freeware/XMLTools2/ | |
-- Last.fmユーザー名は適宜変更のこと | |
set username to "Rion778" -- Last.fm ユーザー名をセット | |
set max_playlist_length to 50 -- プレイリストの曲数の上限 | |
set start_time to current date | |
set chart_filenames to {".LastFmChartWeekly", ".LastFmChartLast3months", ".LastFmChartLast6months", ".LastFmChartLast12months", ".LastFmChartToptracks"} | |
set chart_type to {"/weeklytrackchart", "/toptracks.xml?period=3month", "/toptracks.xml?period=6month", "/toptracks.xml?period=12month", "/toptracks.xml"} | |
set playlist_names to {"Last.fm - Weekly", "Last.fm - 3 months", "Last.fm - 6 months", "Last.fm - 12 months", "Last.fm - Overall"} |
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 latex-to-google-chart-api (start end) | |
(interactive "r") | |
(let ((latex-expression (kill-region start end))) | |
(insert-string | |
(concat "<img src=\"http://chart.apis.google.com/chart?cht=tx&chl=" | |
(w3m-url-encode-string (car kill-ring)) | |
"\" alt=\"\" />") ))) | |
(global-set-key "\C-c\C-l\C-t" 'latex-to-google-chart-api) |
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
;; latex数式をgoogle chart apiを使った数式表現に変換 | |
(defun latex-to-google-chart-api () | |
(interactive) | |
(replace-regexp "\\[tex:\\(.*?\\)\\]" | |
(query-replace-compile-replacement | |
"<img src=\"http://chart.apis.google.com/chart?cht=tx&chl=\\,(url-hexify-string \\1)\"/>" t) nil (point-min) (point-max))) | |
(global-set-key "\C-c\C-l\C-t" 'latex-to-google-chart-api) | |
;; 逆変換 | |
(defun google-chart-api-to-latex () | |
(interactive) |
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
'' define EmacsMode key bindings | |
Sub EmacsMode() | |
With Application | |
.OnKey "^{f}", "ForwardCell" | |
.OnKey "^{b}", "BackwardCell" | |
.OnKey "^{p}", "PreviousLine" | |
.OnKey "^{n}", "NextLine" | |
.OnKey "^{a}", "BeginningOfUsedRangeLine" | |
.OnKey "^{e}", "EndOfUsedRangeLine" | |
.OnKey "%{<}", "BeginningOfUsedRangeRow" |
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
Option Explicit | |
Sub ClearMyStyle() | |
'' 独自スタイルの削除 | |
Dim myst As Variant | |
Dim myStNames() As Variant | |
Dim st As Style | |
Dim lg As ListGallery | |
Dim i As Long | |
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
## --- 気温から飽和水蒸気圧を求める関数色々 --- | |
GofGra <- function(t){ | |
## 入力:気温(℃) | |
## 出力:飽和水蒸気圧(hPa) | |
10^ | |
(10.79574 * (1 - 273.16/(t + 273.15)) - | |
5.02800 * log((t + 273.15)/273.16, 10) + | |
1.50475 * 10^{-4} * {1-10^(-8.2969 * ((t + 273.15)/273.16 - 1))} + | |
0.42873 * 10^{-3} * {10^(4.76955*(1 - 273.16/(t + 273.15))) - 1} + | |
0.78614) |
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
'' ----- Emacsモードの有効化と無効化 --------------------- | |
Sub EnableEmacsMode() | |
Call AddKeyBindings("ForwardChar", wdKeyControl + wdKeyF) | |
Call AddKeyBindings("BackwardChar", wdKeyControl + wdKeyB) | |
Call AddKeyBindings("NextLine", wdKeyControl + wdKeyN) | |
Call AddKeyBindings("PreviousLine", wdKeyControl + wdKeyP) | |
Call AddKeyBindings("BeginningOfLine", wdKeyControl + wdKeyA) | |
Call AddKeyBindings("EndOfLine", wdKeyControl + wdKeyE) | |
End Sub |
OlderNewer