Skip to content

Instantly share code, notes, and snippets.

View MarceloCajueiro's full-sized avatar

Marcelo Cajueiro MarceloCajueiro

View GitHub Profile
@MarceloCajueiro
MarceloCajueiro / script.rb
Created July 17, 2018 11:50
Move sidekiq jobs from one queue to another
queue = Sidekiq::Queue.new("default")
queue.each do |job|
if job.klass == "DailyFrequencyCreatorWorker"
DailyFrequencyCreatorWorker.set(queue: 'daily_frequency_creator').perform_async(*job.args)
job.delete
end
end;nil
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active August 1, 2024 06:50
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@caseywatts
caseywatts / quicktime-hangouts-recording.md
Last active February 14, 2024 02:18
Quicktime Hangouts Recording (using soundflower for audio)

Short link to this page: caseywatts.com/quicktime

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Quicktime + Hangouts Recording

Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH:

@fernandoaleman
fernandoaleman / fix-libv8-mac.txt
Created May 5, 2016 15:14
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
@jspillers
jspillers / vcr_webmock_and_live_http_simultaneously.rb
Created June 9, 2015 20:13
Sandbox test to get VCR, WebMock, and "real" http all working side by side in the same spec suite
require 'rubygems'
require 'rspec'
require 'webmock'
require 'vcr'
require 'pry'
# in a Rails app, this would be in an initializer
WebMock.disable_net_connect!(
allow_localhost: true,
net_http_connect_on_start: true
@MarceloCajueiro
MarceloCajueiro / gist:4944334
Last active September 30, 2018 18:18
git work flow

Atualizando o branch de trabalho

Supondo que se está no branch de trabalho chamado work

git checkout master

git pull origin master

git checkout work

@MarceloCajueiro
MarceloCajueiro / gist:4733148
Last active September 19, 2016 19:57
[JOB] RoR Remoto @ IntegraGRP

[JOB] RoR Remoto @ IntegraGRP

Nós estamos procurando desenvolvedores Ruby on Rails para trabalhar remoto. Procuramos pessoas que buscam sucesso, motivadas, com visão e paixão por aquilo que fazem. Se você é apaixonado por programação, gosta de trabalhar em um ambiente ágil e desafiador junte-se a nossa equipe.

Suas tarefas:

  • Adquirir e manter conhecimentos atualizados de Ruby on Rails
  • Codificar em nossos projetos com máxima qualidade tanto no backend quanto no frontend
  • Beneficiar e melhorar a experiência de nossos usuários com o que há de melhor para web
  • Participar ativamente do processo de desenvolvimento extremamente ágil com lançamentos diários
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@MarceloCajueiro
MarceloCajueiro / crontab -e
Created July 15, 2011 22:00
Cron with RVM to run a rake task
0 0 * * * cd /data/project/; bash -c 'source /usr/local/rvm/bin/rvm && rake -s task' > /tmp/task.log 2>&1