Skip to content

Instantly share code, notes, and snippets.

@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active April 2, 2024 10:04
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@jbbarth
jbbarth / commands.sh
Last active December 27, 2015 01:49
Fix nokogiri warnings about varying libxml2 versions and related deface defects on MacOSX
cd /path/to/your/project
#install libxml2 v2.8.0 instead of 2.9+ and libxslt 1.1.26 instead of 1.1.28
brew unlink libxml2
brew unlink libxslt
cd $(brew --prefix)
git checkout $(brew versions libxml2 | grep 2.8.0 | sed -e 's/.*checkout//')
git checkout $(brew versions libxslt | grep 1.1.26 | sed -e 's/.*checkout//')
brew install libxml2
brew install libxslt
@jasonkarns
jasonkarns / readme.md
Last active March 11, 2024 23:26
Git send-email using Gmail
  1. Configure git.
# ~/.config/git/config
[sendemail]
  confirm = auto
  smtpServer = smtp.gmail.com
  smtpServerPort = 587
  smtpEncryption = tls
  smtpUser = <gmail email address>
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 5, 2024 13:30
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e