Skip to content

Instantly share code, notes, and snippets.


Dusan Orlovic duleorlovic

View GitHub Profile
duleorlovic /
Created May 26, 2017 — forked from sheharyarn/
Download Videos from Youtube in (Ruby || PHP)

Youtube Downloaders

Download Youtube Videos using Ruby or PHP

Just copy the appropriate script, provide the video_id and run. It will list download links for different qualities and streams.


View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
duleorlovic / linkable.rb
Last active Apr 1, 2020
Linkable concern instead of friendly_id gem
View linkable.rb
# app/models/concerns/linkable.rb
# Generate link that you can use to find resources
# Similar to friendly_id gem but much simpler (one file) and you can easily
# update instead of reading DSL for friendly_id
# You just need to define where to store link and which fields to use
# to generate link
# For example:
# rails g migration add_link_to_users link:string
View an example of puma and ngxin with ruby on rails

Nginx and Puma for Ruby on Rails

When a lot of people are working on the same Rails application, than Vagrant could help to set up environment quick and easy. Even Vagrant is not recommended for production, it is very usefull for testing deployment script. For production we can simply copy deployment script and run manually.

We can deploy Ruby on Rails app using a quick way to deploy ruby on rails on vagrant.

duleorlovic / a quick way to deploy ruby on rails on
Last active Jun 23, 2020
Quickly deploy any Ruby on Rails application to VirtualBox using Vagrant or to any other provider of Linux machine just running this shell script
View a quick way to deploy ruby on rails on

Deploy Ruby on Rails

You can use those bootstrap script to deploy your Rails application to Virtualbox. It's not intended to replace Chef or Puppet, but since its plain bash, its very readable and you can copy some lines and paste to your ssh session...

How to use

After installing Vagrant software run vagrant init and edit your Vagrantfile