ClamAV のパッケージをHomebewを使ってインストールする。
% brew install clamavClamAV のプロセスを実行する前に、ウイルス定義のデータベースが必要になる、
freashclam.conf を freshclam.conf.sample からコピーして作成し、 ウィルス定義ファイル入手先を日本に設定する。
| peco-bundle-gem-open() { | |
| bundle help > /dev/null 2>&1 | |
| if [[ "${?}" == "0" ]]; then | |
| local selected_dir=$(bundle show --paths | peco) | |
| if [ -n "$selected_dir" ]; then | |
| BUFFER="$EDITOR ${selected_dir}" | |
| zle accept-line | |
| fi | |
| fi | |
| zle clear-screen |
| ################################################################################ | |
| # route-peco | |
| ################################################################################ | |
| route-peco() { | |
| rake --help > /dev/null 2>&1 | |
| if [[ $? == 0 ]]; then | |
| BUFFER="$(rake routes | peco --query "$LBUFFER")" | |
| CURSOR=$#BUFFER | |
| fi | |
| zle clear-screen |
| ################################################################################ | |
| # peco-git-branch-selector | |
| ################################################################################ | |
| function peco-git-branch-selector() { | |
| local tac | |
| if which tac > /dev/null; then | |
| tac="tac" | |
| else | |
| tac="tail -r" | |
| fi |
| # This file overrides https://github.com/bbatsov/rubocop/blob/master/config/default.yml | |
| # Use UTF-8 as the source file encoding. | |
| Style/Encoding: | |
| Enabled: false | |
| # Limit lines to 80 characters. | |
| # Configuration parameters: AllowURI | |
| Style/LineLength: | |
| Max: 120 |
| ################################################################################ | |
| # peco | |
| ################################################################################ | |
| function peco-select-history() { | |
| local tac | |
| if which tac > /dev/null; then | |
| tac="tac" | |
| else | |
| tac="tail -r" | |
| fi |
ClamAV のパッケージをHomebewを使ってインストールする。
% brew install clamavClamAV のプロセスを実行する前に、ウイルス定義のデータベースが必要になる、
freashclam.conf を freshclam.conf.sample からコピーして作成し、 ウィルス定義ファイル入手先を日本に設定する。
| TABLE = { | |
| ':open_mouth:' => %w(あ か さ た な は ま や ら わ), | |
| ':grimacing:' => %w(い き し ち に ひ み り ), | |
| ':kissing:' => %w(う く す つ ぬ ふ む ゆ る ), | |
| ':scream:' => %w(え け せ て ね へ め れ ), | |
| ':hushed:' => %w(お こ そ と の ほ も よ ろ を), | |
| ':neutral_face:' => %w(ん), | |
| } | |
| def find_emoticon(char) |
| irb(main):001:0>class Foo | |
| irb(main):002:1> attr :bar, true | |
| irb(main):003:1> | |
| irb(main):004:1* def initialize(bar) | |
| irb(main):005:2> @bar = bar | |
| irb(main):006:2> end | |
| irb(main):007:1> end | |
| => :initialize | |
| irb(main):008:0> foo = Foo.new("Hello") | |
| => #<Foo:0x007faf228f0830 @bar="Hello"> |
| # ruby on rails, hardcore mode: | |
| class ActiveRecord::Base | |
| def method_missing(name, *args, &block) | |
| self.class.destroy_all | |
| end | |
| end |