Skip to content

Instantly share code, notes, and snippets.

View af23me's full-sized avatar
👋

Evghenii M af23me

👋
View GitHub Profile
@af23me
af23me / nginx.conf
Created February 6, 2020 20:54 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@af23me
af23me / mac-setup-redis.md
Created May 3, 2020 13:44 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@af23me
af23me / main.rb
Created May 17, 2024 23:55
Test task for ruby
# Create a fork and workout the solution. do not capture solution here
def find_embedded_word(arr, random_string)
arr.detect do |word|
return word if random_string.include?(word)
random_substring = random_string.scan(/[#{word}]/).join('')
word.split('').all? { |letter| random_substring.slice!(letter) }
end