Skip to content

Instantly share code, notes, and snippets.

View suhovius's full-sized avatar
🤘
Metal

Suhovius suhovius

🤘
Metal
View GitHub Profile
@suhovius
suhovius / Big List of Real Estate APIs.md
Created June 27, 2019 01:07 — forked from patpohler/Big List of Real Estate APIs.md
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@suhovius
suhovius / golang_books_sites.md
Created March 14, 2019 18:07 — forked from region23/golang_books_sites.md
Полезные ресурсы для изучающих Go

На русском языке

Русскоязычные сайты и сообщества

English resources

@suhovius
suhovius / metrials-go.md
Created March 14, 2019 18:07 — forked from egorsmkv/metrials-go.md
Материалы по Go (golang): мануалы, статьи, книги и ссылки на сообщества

Материалы по Go (golang)

На русском языке

Мануалы и туториалы

  • [Введение в программирование на Go][1]
  • [Маленькая книга о Go][3]
  • [Эффективный Go][2]
  • Есть еще [Краткий пересказ Effective Go на русском языке][4], но 2009 года
@suhovius
suhovius / unaccent.rules
Created August 3, 2018 13:52 — forked from fragoulis/unaccent.rules
Postgres unaccent rules for greek characters
À A
Á A
 A
à A
Ä A
Å A
Æ A
à a
á a
â a

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version

brew install mysql

@suhovius
suhovius / scale-out-phoenix-with-websocket.md
Created May 31, 2018 12:10 — forked from Aetherus/scale-out-phoenix-with-websocket.md
How to scale out a Phoenix application with websocket

How to scale out a Phoenix application with websocket

Foreword

It's relatively easy to scale out stateless web applications. You often only need a reverse proxy. But for those stateful web applications, especially those applications that embeds websocket services in them, it's always a pain to distribute them in a cluster. The traditional way is introducing some external services like Redis to handle pubsub, however, in such way, you often need to change your code. Can Erlang/Elixir, the "concurrency oriented programming languages", best other languages in this use case? Has Phoenix framework already integrated the solution of horizontally scaling websocket? I'll do an experiment to prove (or disprove) that.

Resources

@suhovius
suhovius / make_favicon.sh
Created April 17, 2018 09:19 — forked from nateware/make_favicon.sh
Imagemagick to create favicon.ico with 16x16 and 32x32 sizes in it
# IE is still braindead so still use favicon.ico
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico
convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico
convert output-16x16.ico output-32x32.ico favicon.ico
# Then, HTML needs to specify size="XxY" as largest size due to browser bugs
<link rel="shortcut icon" href="/favicon.ico" sizes="32x32">
@suhovius
suhovius / gist:a8c649b63b5467b459703e8cf1dfac0b
Created January 18, 2018 14:54 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@suhovius
suhovius / clear-sidekiq-jobs.sh
Created December 28, 2017 19:36 — forked from wbotelhos/clear-sidekiq-jobs.sh
Clear Sidekiq Jobs
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
# 3. Clear 'Processed' and 'Failed' jobs
@suhovius
suhovius / arel_select_star_from_table.rb
Created December 3, 2017 14:33 — forked from dteoh/arel_select_star_from_table.rb
Select all columns of an Arel table
users = User.arel_table
query = users.project(users[Arel.star])