How to reset Heroku PostgreSQL database

To drop database

heroku pg:reset DATABASE --app name_of_your_app;

To migrate database

heroku run rake db:migrate --app name_of_your_app;

To seed database

heroku run rake db:seed --app name_of_your_app;

but you can run both commands at the same time

heroku run rake db:migrate db:seed --app name_of_your_app;

after that, run

heroku restart

That will reset your Heroku database

How to receive Bluetooth files on Ubuntu

With all the power and features of our smartphones these days, we want to connect them with other devices like laptops, and send files via Bluetooth. But, If you connected your smartphone with Ubuntu, notice that you can send files from Ubuntu to mobile phone, but the other way around… not. Most of the time, you get messages like “Unable to connect”, “File sending failed” or something like that.

Solution for this problem is fairly simple as this is hidden and disabled as a security measure. To solve that, you have to do next:

1. Open Dash Home and search for Personal File Sharing

2. Click icon and you can see Personal file sharing preferences screen. Tick Receive files in downloads folder over bluetooth and that’s it. If you what notification for every received file, also tick Notify about received files.

How to receive bluetooth files on Ubuntu

Ubuntu + Bluetooth: Kako primati datoteke

Nakon što povežete svoj smartphone i Ubuntu, možete primjetiti da slanje datoteka nije moguće u oba smjera. Ubuntu naprosto neće prihvatiti datoteke koje pokušavate poslati sa telefona.

Da bismo to riješili, napravimo slijedeće:

1. Otvorimo Dash Home i tražimo Personal File Sharing

2. Nakon što se pojavi ekran postavki, uključimo Receive files in downloads folder over bluetooth i to je to. Ukoliko želite obavijesti kada se zaprimi datoteka, uključite i Notify about received file.

UBUNTU: Receive bluetooth files

THL T6 Pro recenzija

THL T6 PRO je najavljivan kao ultra tanak budget smartphone pristupačan svima a istovremeno za mali novac. Kompanija je održala riječ i danas nam je na stolu jeftin pametan telefon. Read more

Cannot install eventmachine – Ubuntu

Try this:

sudo apt-get install build-essentials

 

after that, you could be able to install gem:

gem install eventmachine

How to delete slug from history

# slug_controller.rb

class SlugsController < ApplicationController 
def destroy 
@slug = FriendlyId::Slug.find(params[:id]) 
@slug.destroy 
redirect_to :back, :notice => "The URL <strong>/#{@slug.slug}</strong> has been removed" 
end 
end 

<br>

# routes.rb

resources :slugs, :only => :destroy 

# in a view

<%= link_to 'Delete slug', slug_path(slug.id), :method => :delete %>