Skip to content

Instantly share code, notes, and snippets.

View cesarjr's full-sized avatar

Cezinha Anjos cesarjr

View GitHub Profile
@Chocksy
Chocksy / kill_sidekiq_job.rb
Last active April 25, 2024 14:07
Kill sidekiq jobs by process id for busy jobs and by jid for other sets.
# FOR BUSY JOBS
# take the process_id from the /busy page in sidekiq and kill the longest running one.
workers = Sidekiq::Workers.new
long_process_id = 'integration.3:4:71111aaa111' # Eg: 'integration.3:4:71d1d7f4ef5a'
workers.each do |process_id, thread_id, work|
process = Sidekiq::Process.new('identity' => process_id)
process.stop! if process_id == long_process_id
end
# FOR SCHEDULED JOBS
@victorbstan
victorbstan / clips.html
Created August 25, 2012 20:34
Angular JS and Rails 3 Infinite Scroll Pagination
<!--
This is the HTML portion of the infinite scroll/pagination with Rails and AngularJS tutorial
Required libraries for the tutorial and indicated as "Important",
together with implementation specific libraries marked as "Optional"
-->
<!DOCTYPE html>
<html>
<title>Clips</title>
<!-- Important -->