Skip to content

Instantly share code, notes, and snippets.

View yukihirop's full-sized avatar
💭
🔥burning

yukihirop yukihirop

💭
🔥burning
View GitHub Profile
@yukihirop
yukihirop / rm_mysql.md
Created September 21, 2018 15:39 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@yukihirop
yukihirop / file0.txt
Created December 25, 2016 12:24
RspecでJSON形式のハッシュをFactoryGirlなどで用意したデータでテストする際に使えるCustomMatcherを作った。 ref: http://qiita.com/yukihirop/items/4cd9a13c3757b1ccb584
$ rails -v
$ Rails 5.0.0.1
$ ruby -v
$ ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
@yukihirop
yukihirop / match_hash.rb
Last active April 8, 2022 01:10
RspecでJSON形式のハッシュをFactoryGirlなどで用意したデータでテストする際に使えるCustomMatcher
# GitHub Gist
# kroehre/ gist:9cc209bcf43a1d1b001b
# より引用&一部改造
# @abstract json形式のhashのkeyの数と値、hashの構造、keyとvalueのペアの一致(hash完全一致、順不同)
# などをテストする.
# @params [Hash] un_jsonalized_expected これからjson形式のhashにするためのhash.
# @params [String] *spec_ignore_keys specを無視するkeyの配列.
# @example *spec_ignore_keysはない場合はnilをある場合は、複数文字列で書いて下さい.
# expect(result).to match_hash_after_jsonalized(data,nil)
#! /usr/bin/env ruby
puts 'Hello Gist!'