Skip to content

Instantly share code, notes, and snippets.

Dusan Orlovic duleorlovic

Block or report user

Report or block duleorlovic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@duleorlovic
duleorlovic / YoutubeDownloader.md
Created May 26, 2017 — forked from sheharyarn/YoutubeDownloader.md
Download Videos from Youtube in (Ruby || PHP)
View YoutubeDownloader.md

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.

:P

View capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@duleorlovic
duleorlovic / linkable.rb
Last active Mar 17, 2016
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 config.md

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
duleorlovic / a quick way to deploy ruby on rails on vagrant.md
Last active Nov 7, 2017
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 vagrant.md

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

You can’t perform that action at this time.