Skip to content

Instantly share code, notes, and snippets.

@Chocksy
Chocksy / kill_sidekiq_job.rb
Last active July 2, 2024 19:45
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
@doitian
doitian / org-pomodoro.el
Last active February 3, 2018 12:59
org-pomodoro: estimate using # pomodoro, see clocksum using # pomodoro, show timer in modelline TODO: make it a package
(defvar org-pomodoro-minutes 25)
(defvar org-pomodoro-cancelling nil)
(defvar org-pomodoro-command (locate-file "pomodoro" exec-path))
(defun org-pomodoro-on-org-load ()
(push (cons "p" org-pomodoro-minutes) org-effort-durations)
(push '("Effort_ALL" . "1p 2p 3p 4p 5p 6p 7p 8p") org-global-properties)
(define-key org-mode-map "\C-c\C-x'" 'org-pomodoro-columns)
(define-key org-agenda-mode-map "\C-c\C-x'" 'org-pomodoro-agenda-columns))
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@doitian
doitian / my-folding.el
Created January 6, 2012 15:56
set up a comfortable emacs folding
(defvar fringe-face 'fringe)
(custom-set-variables
'(folding-font-lock-begin-mark 'fringe-face)
'(folding-font-lock-end-mark 'fringe-face))
(defface collapsed-face '((t (:background "#e0cf9f" :foreground "#5f5f5f"))) "Collapsed Overlay")
(defvar collapsed-face 'collapsed-face)
(require 'folding)
(setq folding-check-folded-file-function 'iy-folding-check-folded)
(folding-mode-add-find-file-hook)