This file contains 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
# Alias git status | |
alias gs="git status" | |
# Alias git add . | |
alias ga="git add ." | |
# Function for git commit (instead of alias) | |
gc() { | |
git commit -m "$1" | |
} |
This file contains 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
def solve(arr) | |
alphabet = ('a'..'z').to_a | |
result = [] | |
arr.each do |word| | |
count = 0 | |
word.split('').each_with_index do |letter, index| | |
count +=1 if alphabet.find_index(letter.downcase) == index | |
end | |
result.push(count) | |
end |
This file contains 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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | |
gem 'activerecord' | |
gem 'mysql2' |