Skip to content

Instantly share code, notes, and snippets.

Sidekiq::Queue.new("infinity").clear
Sidekiq::RetrySet.new.clear
Sidekiq::ScheduledSet.new.clear
Using simple_form on a collection of Users.
I need the dropdown to show the name and surname of the Users (not only the name) + the id in value.
This works 👇
<%= t.input :traveller, :collection => Proc.new{ @team_users.map{ |p| ["#{p.name} #{p.surname}", p.id] } }, label: false, selected: current_user.id %>
If your computer was shut down in an unexpected way, an error could occur when launching your server
problem while using OauthProvider model:
'could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
@RemiDuvoux
RemiDuvoux / wave.html
Created December 20, 2016 17:53
Nice wave effect (svg and linear gradient)
<div id="wave" style="background-image: linear-gradient(-270deg, #10A799 0%, #48DD75 100%); margin-top:-1px";>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1170 193" style="fill: white; margin-top: -1px">
<path d="M1175 131.2c0 0-81-89.4-224.3-103.4S713 72 665 97c-86 46-148 63-271 7C221.7 25.5 56 104.5-4 197.4 -4 58.7-3.3 0.3-3.3 0.3L1175 0V131.2z"/>
</svg>
</div>
<div class="wrapper" style="background-image: linear-gradient(-270deg, #10A799 0%, #48DD75 100%); height: 100vh">
</div>