Skip to content

Instantly share code, notes, and snippets.

View erbmicha's full-sized avatar

Michael Erb erbmicha

View GitHub Profile
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@erbmicha
erbmicha / sidekiq_monitoring
Created March 1, 2023 01:08 — forked from ngsmrk/sidekiq_monitoring
Sidekiq queue checking via rails console
stats = Sidekiq::Stats.new
stats.queues
stats.enqueued
stats.processed
stats.failed
@erbmicha
erbmicha / Gemfile
Last active August 29, 2015 14:07 — forked from nebiros/Gemfile
group :production do
gem "unicorn"
end
# encoding: utf-8
# Copyright 2013-2014, Manfred Stienstra, <manfred@fngpts.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@erbmicha
erbmicha / gist:2475456
Created April 24, 2012 01:48 — forked from Indamix/gist:2226290
css 3d bended shadow
.bended-shadow {position:relative}
.bended-shadow::before, .bended-shadow::after {
content: '';
position: absolute;
width: 60%;
height: 20px;
-webkit-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
-ms-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
@erbmicha
erbmicha / hack.sh
Created April 3, 2012 00:10 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@erbmicha
erbmicha / gist:975580
Created May 16, 2011 23:19 — forked from seanlilmateus/gist:974340
Using Obj-C Blocks from MacRuby with Ruby 1.9 Syntax
# 1 # Processing enumerated arrays using two blocks
area = "Europe"
timeZoneNames = NSTimeZone.knownTimeZoneNames
areaArray = NSMutableArray.arrayWithCapacity 1
areaIndexes = timeZoneNames.indexesOfObjectsWithOptions NSEnumerationConcurrent,
passingTest: -> (obj, idx, stop) {
tmpStr = obj
tmpStr.hasPrefix area
}
tmpArray = timeZoneNames.objectsAtIndexes areaIndexes
Surround these with : e.g. :calling:
+1
-1
bulb
calling
clap
cop
email
feet
#!/usr/bin/env zsh
if [[ -s "${TM_PROJECT_DIRECTORY}/.rvmrc" ]]
then
source "${TM_PROJECT_DIRECTORY}/.rvmrc"
fi
`which ruby` $*