Skip to content

Instantly share code, notes, and snippets.

View svensson-david's full-sized avatar

David Svensson svensson-david

View GitHub Profile
@eparreno
eparreno / sidekiq_delete_jobs.md
Last active September 5, 2023 17:38
How to delete Sidekiq jobs in a Rails app using ActiveJobs

How to delete Sidekiq jobs in a Rails app using ActiveJobs

Sidekiq jobs can be enqueued or scheduled. Enqueued means that they are gonna be picked up as soon as possible, scheduled jobs will be enqueued at some specific time.

job_id and jid

When using ActiveJobs, Rails will return a job_id after sending the job to ActiveJobs

job = UserMailer.send_invite(params).deliver_later
@hsiboy
hsiboy / VBOX_E_INVALID_VM_STATE.md
Last active May 28, 2022 21:59
rescue a VM from VBOX_E_INVALID_OBJECT_STATE

Issue

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
@EvaldasUzkuras
EvaldasUzkuras / Tools.php
Created June 12, 2014 07:18
Turn off automatic language detection - Prestashop
<?php
class Tools extends ToolsCore
{
/**
* Change language in cookie while clicking on a flag
*
* @return string iso code
*/
public static function setCookieLanguage($cookie = null)