Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomoya Yamamoto tmyymmt

View GitHub Profile
@tmyymmt
tmyymmt / Brewfile.sh
Last active Aug 29, 2015
Brewfile.sh
View Brewfile.sh
brew update
brew upgrade
brew install brew-cask
brew install zsh
brew install git
brew install hub
brew install gist
brew install curl
brew install wget
View .zshrc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
export HOMEBREW_CASK_OPTS="--appdir=~/Applications --caskroom=~/Caskroom"
#export TERM=xterm-color
export EDITOR=/usr/bin/emacs
alias ls='ls -G'
alias ll='ls -hl'
alias ll='ls -al'
alias windows='nkf -sLw --overwrite'
View .emacs
(define-key global-map "\C-a" 'start-kbd-macro)
(define-key global-map "\C-q" 'end-kbd-macro)
(define-key global-map "\C-z" 'call-last-kbd-macro)
(define-key global-map "\C-o" 'beginning-of-buffer)
(define-key global-map "\C-l" 'end-of-buffer)
(put 'upcase-region 'disabled nil)
(cond
( (or (eq window-system 'ns) (eq window-system 'mac) )
; for cocoa emacs
@tmyymmt
tmyymmt / ja.lng.php.1.5.0.diff
Created Sep 6, 2014
pukiwiki attach zip /ja.lng.php.1.5.0.diff
View ja.lng.php.1.5.0.diff
184d183
< 'err_extract' => 'Unable to extract files from uploaded archive',
187,188c186
< 'btn_submit' => '実行',
< 'msg_extract' => 'Extract & Attach files'
---
> 'btn_submit' => '実行'
@tmyymmt
tmyymmt / en.lng.php.1.5.0.diff
Created Sep 6, 2014
pukiwiki attach zip /en.lng.php.1.5.0.diff
View en.lng.php.1.5.0.diff
182d181
< 'err_extract' => 'Unable to extract files from uploaded archive',
185,186c184
< 'btn_submit' => 'Submit',
< 'msg_extract' => 'Extract & Attach files'
---
> 'btn_submit' => 'Submit'
@tmyymmt
tmyymmt / attach.inc.php.1.5.0.diff
Created Sep 6, 2014
puwikiki attach zip /plugin/attach.inc.php.1.5.0.diff
View attach.inc.php.1.5.0.diff
42,43d41
< define('PLUGIN_OPEN_AVOID_DIRECT', FALSE); // TRUE or FALSE
<
160c158
< global $vars, $_attach_messages, $notify, $notify_subject;
---
> global $_attach_messages, $notify, $notify_subject;
190,221d187
< if ($vars['extract_mode'] == 'on') {
< switch (strtolower(substr($file['name'], -4))) {
View mongodb_snipets.scala
// copy from Janx Spirit http://janxspirit.blogspot.jp/2011/11/introduction-to-casbah-scala-mongodb.html
//connect to a MongoDB server
val mongo = MongoConnection("anduin")
//create/connect to a collection
val coll = mongo("casbah_examples")("movies")
//drop collection
coll.dropCollection
@tmyymmt
tmyymmt / .tmux.conf
Created Nov 12, 2012
.tmux.conf for osx
View .tmux.conf
bind -r ^ resize-pane -R 5
bind -r C-^ resize-pane -L 5
bind 0 kill-pane
bind 2 split-window -v
bind 3 split-window -h
@tmyymmt
tmyymmt / init.el
Created Nov 7, 2012
init.el for cocoa emacs
View init.el
; css-mode
(defun coding-style-css ()
(setq css-indent-offset 2))
(add-hook 'css-mode-hook 'coding-style-css)
;
(setq truncate-lines t)
(setq truncate-partial-width-windows t)
@tmyymmt
tmyymmt / grep-specs2-unit-selected-buffer.l
Created Oct 11, 2012
Grep description of specs2 unit specification in selected buffer on xyzzy
View grep-specs2-unit-selected-buffer.l
; Grep description of specs2 unit specification in selected buffer on xyzzy
; Please copy & paste following code at your .xyzzy
; Usage: M-x grep-specs2-unit-selected-buffer
(defun grep-specs2-unit-selected-buffer ()
(interactive)
(grep " should \\| in " (selected-buffer)))