Skip to content

Instantly share code, notes, and snippets.

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

Borys Babusenko Bor1s

🏠
Working from home
  • onrunning
  • World
View GitHub Profile
@Bor1s
Bor1s / SOLID.markdown
Created December 21, 2017 11:40 — forked from emaraschio/SOLID.markdown
SOLID Principles with ruby examples

#SOLID Principles with ruby examples

##SRP - Single responsibility principle A class should have only a single responsibility.

Every class should have a single responsibility, and that responsibility should be entirely encapsulated. All its services should be narrowly aligned with that responsibility, this embrace the high cohesion.

##OCP - Open/closed principle Software entities should be open for extension, but closed for modification.

@Bor1s
Bor1s / simulate_scanned_PDF.md
Created December 8, 2017 08:17
Simulate a scanned PDF with ImageMagick

Simulate a scanned PDF with ImageMagick

  1. Download and install Ghostscript and ImageMagick + Convert Module
  2. Execute the following command in the console (change the filename)
$ convert -density 200 INPUT.pdf -rotate 0.3 +noise Multiplicative -format pdf  -quality 85 -compress JPEG -colorspace gray OUTPUT.pdf

Description of the options

  • -density: set the input DPI to 200
  • -rotate: set Page rotation to 0.3 degrees
@Bor1s
Bor1s / docker-pry-rails.md
Created July 6, 2017 17:46 — forked from briankung/docker-pry-rails.md
Using pry-rails with Docker