Skip to content

Instantly share code, notes, and snippets.

View shishi's full-sized avatar
🏠
Working from home

Shigenobu Nishikawa shishi

🏠
Working from home
View GitHub Profile
@shishi
shishi / gist:1653032
Created January 21, 2012 15:14
install jenkins in Linux Mint 12
sudo apt-get install default-jre jenkins
sudo vim /etc/init/jenkins.conf
# env JAVA_HOME の行を書き換え
# 以下の値にしておくと sun-java でも openjdk でも動く
# JAVA_HOME=/usr
sudo service jenkins start
@shishi
shishi / emacs.rb
Created March 2, 2012 04:15
homebrew formula for emacs 23.4 with inline-patch
require 'formula'
class Emacs < Formula
homepage 'http://www.gnu.org/software/emacs/'
url 'http://ftpmirror.gnu.org/emacs/emacs-23.4.tar.bz2'
mirror 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.4.tar.bz2'
md5 '070c68ad8e3c31fb3cb2414feaf5e6f0'
fails_with_llvm "Duplicate symbol errors while linking.", :build => 2334
@shishi
shishi / el-get-install.el
Created April 10, 2012 16:23
install el-get
(url-retrieve
"https://raw.github.com/dimitri/el-get/master/el-get-install.el"
(lambda (s)
(end-of-buffer)
(eval-print-last-sexp)))
@shishi
shishi / el-get-sources.el
Created April 10, 2012 16:36
sample of el-get-sources
(setq el-get-sources
'(
(:name ruby-mode-trunk-head
:type http
:description "Major mode for editing Ruby files. (trunk-head)"
:url "http://bugs.ruby-lang.org/projects/ruby-trunk/repository/raw/misc/ruby-mode.el")
(:name php-mode-github
:type github
:website "https://github.com/ejmr/php-mode"
:description "Major mode for editing PHP files. (on Github based on SourceForge version))"
@shishi
shishi / el-get-install-master.el
Created April 10, 2012 16:40
install el-get-install master
(url-retrieve
"https://raw.github.com/dimitri/el-get/master/el-get-install.el"
(lambda (s)
(let (el-get-master-branch)
(end-of-buffer)
(eval-print-last-sexp))))
@shishi
shishi / el-get.el
Created April 11, 2012 07:46
a part of my el-get setting
;; el-get
(setq el-get-dir "~/.emacs.d/elisp/el-get/")
;; ;; So the idea is that you copy/paste this code into your *scratch* buffer,
;; ;; hit C-j, and you have a working el-get.
;; ;; (add-to-list 'load-path "~/.emacs.d/el-get/el-get")
;; (unless (require 'el-get nil t)
;; (url-retrieve
;; "https://raw.github.com/dimitri/el-get/master/el-get-install.el"
;; (lambda (s)
#
# Show branch name in Zsh's right prompt
#
autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null
setopt prompt_subst
setopt re_match_pcre
function rprompt-git-current-branch {
@shishi
shishi / auto-complete-config.el
Created May 3, 2012 20:57
fix cooprate with yasnippet
(defun ac-yasnippet-candidates ()
(with-no-warnings
(if (>= (string-to-number yas/version) 0.7)
(apply 'append (mapcar 'ac-yasnippet-candidate-1 (yas/get-snippet-tables)))
(if (fboundp 'yas/get-snippet-tables)
;; >0.6.0
(apply 'append (mapcar 'ac-yasnippet-candidate-1 (yas/get-snippet-tables major-mode)))
(let ((table
(if (fboundp 'yas/snippet-table)
;; <0.6.0
@shishi
shishi / nabeatsu.rb
Created May 23, 2012 16:45
nabeatsu for restrict condition sentenses
class Nabeatsu
def say
content = { 'true' => 'hoge', 'false' => number.to_s }
true_or_false = (number % 3 == 0) || !!(number.to_s =~ /3/)
p content[true_or_false.to_s]
end
end
@shishi
shishi / delete_remote_branch.sh
Created June 25, 2012 12:25 — forked from fujimura/delete_remote_branch.sh
Delete remote brranches except master
git branch -a | grep origin | cut -d / -f 3 | grep -v master | \
ruby -e "STDIN.to_a.tap(&:shift).map(&:chomp).each {|s| p %|git push origin #{s}| }"
# replace `p` with `system` to run actual command