Skip to content

Instantly share code, notes, and snippets.

👺
Ten-goods come on! Working from home

PharaohKJ PharaohKJ

👺
Ten-goods come on! Working from home
Block or report user

Report or block PharaohKJ

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@PharaohKJ
PharaohKJ / init.el
Created Jun 14, 2016
textlint for emacs flycheck
View init.el
;; ref https://github.com/amperser/proselint/issues/37
;; textlint
(flycheck-define-checker textlint
"A linter for prose."
:command ("textlint" "--format" "unix" "--rule" "no-mix-dearu-desumasu" "--rule" "max-ten" "--rule" "spellcheck-tech-word" source-inplace)
:error-patterns
((warning line-start (file-name) ":" line ":" column ": "
(id (one-or-more (not (any " "))))
(message (one-or-more not-newline)
(zero-or-more "\n" (any " ") (one-or-more not-newline)))
View sshkey-update.sh
host="target-hostname"
ssh-keygen -R $host
ssh-keyscan -H $host >> ~/.ssh/known_hosts
View 俺とCI.md

トップ

自己紹介

CIツールの歴史

http://itpro.nikkeibp.co.jp/article/COLUMN/20130619/486173/?rt=nocnt http://www.atmarkit.co.jp/ait/articles/1104/07/news111.html

CIツールには今、大きな追い風が吹いている。アプリケーションの開発、テスト、展開、運用といった「アプリケーションライフサイクル」の自動化を図る「DevOps(デブオプス、DevelopmentとOperationの合成語)」が話題になる中で、CIツールがDevOpsの実践に不可欠な存在だと見なされているからだ。

DevOpsにおけるCIツールの役割

2009年のイベントで DevOps とかはじめて言われたらしい

@PharaohKJ
PharaohKJ / boolean_spec.rb
Created Jan 25, 2016
rspecでboolean値をテストする
View boolean_spec.rb
RSpec::Matchers.define :be_boolean do
match do |actual|
expect(actual).to satisfy { |x| x == true || x == false }
end
end
it 'is boolean' do
expect(true).to be_boolean
end
View need_eventmachine_hack.rb
def ensure_em
unless EventMachine.reactor_running? && EventMachine.reactor_thread.alive?
Thread.new { EventMachine.run }
sleep 1
end
end
@PharaohKJ
PharaohKJ / gist:ceb2081a94f2066dcfe8
Created May 28, 2015
show_md_style_link_bookmarklet
View gist:ceb2081a94f2066dcfe8
javascript:(function(){window.prompt('選択してコピーしてください','['+document.title+']'+'('+document.URL+')');})();
View how_to_use_orphan_branch
git checkout --orphan <new_branch>
git rm -rf .
<create document files>
git add .
git commit
View gist:8a4f3a9a541882a07c7a
[pharaohkj]$ defaults write com.apple.dock expose-animation-duration -float 0.15; killall Dock
[pharaohkj]$ defaults write com.apple.dock expose-animation-duration -int 0; killall Dock
@PharaohKJ
PharaohKJ / gist:d62c9ecc48d55a86d020
Created Feb 4, 2015
osxでconsoleにいてworking directoryのgithub上のmasterブランチを開く
View gist:d62c9ecc48d55a86d020
open `git remote -v|grep origin|grep git@github|head -n1|sed -e 's#origin.*git@\(.*\)\:\(.*\).git.*#https:\/\/\1\/\2\/#'`tree/master/$(pwd |sed -e "s|`git rev-parse --show-toplevel`/||")
View gist:2f767d114f4fc6f0a2ee
data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=
You can’t perform that action at this time.