Skip to content

Instantly share code, notes, and snippets.

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

Gilang gizipp

🏠
Working from home
View GitHub Profile
@gizipp
gizipp / rspec-setup-in-rails-6.md
Created March 24, 2020 00:39
Rspec Setup in Rails 6
  1. Add rspec-rails in development and test group
group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  gem 'sqlite3', '~> 1.4'
  gem 'rspec-rails', '~> 3.9.0'
end
@gizipp
gizipp / upgrade-rails-4-into-rails-6.md
Created April 7, 2020 11:34
Upgrade Rails 4 into Rails 6

How to upgrade Rails 4 into Rails 6? Step by Step

  • It's recommended to set ruby into e.g v2.6.5 by creating .ruby_version (if your are using rbenv) and add ruby '2.6.5' in Gemfile

    # Gemfile
    source 'https://rubygems.org'
    
    ruby '2.6.5'
@gizipp
gizipp / scrape-play-store.rb
Created October 11, 2020 06:49
Scrapes and parses application from the Google Play Store by query
require 'mechanize'
require 'pry'
require 'csv'
query = 'racing multiplayer'
agent = Mechanize.new
page = agent.get("https://play.google.com/store/search?q=#{query}&c=apps")
top_50_apps_links = []
page.links.each do |link|
@gizipp
gizipp / ruby-problem-test.md
Last active February 17, 2021 10:45
Ruby Problem Test

There are 2 problem that you may solve. You can create a text file with your answer and send to gizipp.gizipp@gmail.com, write on pastebin, or reply with your answer. Here's the problems :

1. Char Occurrence Counter

Make a small Ruby script to find the occurrence of each character in a word

Example Input and Output:

a)