Skip to content

Instantly share code, notes, and snippets.

ActiveAdmin::Dashboards.build do
# Add this section in your dashboard...
section "Background Jobs" do
now = Time.now.getgm
ul do
li do
jobs = Delayed::Job.where('failed_at is not null').count(:id)
link_to "#{jobs} failing jobs", admin_jobs_path(q: {failed_at_is_not_null: true}), style: 'color: red'
end
@nunosilva800
nunosilva800 / 0_reuse_code.js
Created November 2, 2013 14:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@nunosilva800
nunosilva800 / delete_remotes_in_master.sh
Last active August 29, 2015 14:05 — forked from schacon/gist:942899
Delete remote branches merged into master
$ git remote prune origin |
git branch -r --merged origin/master |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
cut -d"/" -f2- |
xargs git push origin --delete