This file contains hidden or 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
;;; ------------------------------------------------------------ | |
;;; 選択範囲を計算してバッファに出力 | |
;; gist-description: Emacs(Elisp): calculate region and insert. 選択範囲の数式を計算して、次の行にinsertします。数字が羅列されている場合は、加算します。数字や式と自然な文章が混在している場合は、数式のみを計算します。 | |
;; gist-id: b967d6a7441f85aa541d | |
;; gist-name: calculate-region-and-insert.el | |
;; gist-private: nil | |
(defun add-number-grouping (number &optional separator) | |
"Add commas to NUMBER and return it as a string. | |
Optional SEPARATOR is the string to use to separate groups. |
This file contains hidden or 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
;;; ------------------------------------------------------------ | |
;;; 全角英数字を半角英数字に、半角カナを全角に、UTF-8の濁点分離を直す | |
;; http://d.hatena.ne.jp/nakamura001/20120529/1338305696 | |
;; http://www.sakito.com/2010/05/mac-os-x-normalization.html | |
;; gist-description: Emacs(Elisp): 全角英数字を半角英数字に、半角カナを全角に、UTF-8の濁点分離を直す。 | |
;; gist-id: 08a752b04107dbc50ef5 | |
;; gist-name: normalize-chars.el | |
;; gist-private: nil | |
(require 'ucs-normalize) |
This file contains hidden or 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
;;; ------------------------------------------------------------ | |
;; gist-description: Emacs(Elisp): create or update gist by using yagist. yagistでregionのgistをupdateする。 | |
;; gist-id: a20cd2d106edba225115 | |
;; gist-name: yagist-region-create-or-update.el | |
;; gist-private: nil | |
(require 'yagist) | |
(defun yagist-region-create-or-update (beg end) | |
"Post the current region as a create or update at gist.github.com. |
This file contains hidden or 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
;;; ------------------------------------------------------------ | |
;;; 選択範囲を1行にする。最初のインデントは残す。 | |
;; gist-description: Emacs(Elisp): Join multi lines to one. 選択範囲を1行にまとめます。 | |
;; gist-id: ee6b2f8ef659ed58605d | |
;; gist-name: join-multi-lines-to-one.el | |
;; gist-private: nil | |
(defun join-multi-lines-to-one () | |
"Join multi lines." | |
(interactive) |
This file contains hidden or 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
;;; ------------------------------------------------------------ | |
;;; 1日1回のチェック | |
;; gist-description: Emacs(Elisp): return t once in a day. 1日一回tを返すelispです。 | |
;; gist-id: 33e072cea6aa96a19f58 | |
;; gist-name: is-once-in-a-day.el | |
;; gist-private: nil | |
(defun is-once-in-a-day () | |
"Is once in a day." | |
(interactive) |
This file contains hidden or 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
#!/bin/bash | |
# peco-open-emacs | |
function peco-open-emacs | |
{ | |
local files="$( find . -type f | peco )" | |
files_str='' | |
for file in $files | |
do | |
files_str=$files_str' '$file |
This file contains hidden or 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
#!/bin/sh | |
# variables | |
name="username" | |
dbpass="dbpass" | |
dbname="dbname" | |
host="host" | |
dirname="dirname" | |
# dump |
NewerOlder