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
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'google_drive' | |
require 'highline/import' | |
require 'active_support/core_ext' | |
require 'pry' | |
def ask_authentication |
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
;; Copyright (C) 2007,2008,2009,2010 Hiroki Yagita. | |
;; ポリシー ---------------------------------------------------------- | |
;; - meadow は捨てました | |
;; - xemacs は捨てました | |
;; - なるべくどこでも動くようにしたい | |
;; - 初期化スクリプトは ~/.emacs.d/init.el にしています | |
;; - ~/.emacs.d/ の下に分離スクリプトやデータを置くことがあります(それ以外の場所に置かない) |
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
set encoding=utf-8 | |
set fileencodings=utf-8,cp932,euc-jp,iso-2022-jp-3,euc-jisx0213,guess,ucs-bom,ucs-2le,ucs-2 | |
"オリジナルの順はguess, ucs-bom, ucs-2le,ucs-2, iso-2022-jp-3,utf-8, euc-jisx0213, euc-jp | |
scriptencoding utf-8 | |
"autocmd初期化 | |
augroup MyAutoCmd | |
autocmd! | |
augroup END |
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
from sphinx.directives.other import * | |
from sphinx.directives.code import * |
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
sudo apt-get install python-sphinx |
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
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 |
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
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 |
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
(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 |
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
# | |
# 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 { |
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
;; 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) |