This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const randomColor = (() => { | |
"use strict"; | |
const randomInt = (min, max) => { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
}; | |
return () => { | |
var h = randomInt(0, 360); | |
var s = randomInt(42, 98); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get a deserialized object from a delayed job: | |
1. Get the delayed_job record using the id: dj = DelayedJob.find(<id>) | |
2. Get the handler field from dj: dj.handler | |
3. Convert it from YAML: YAML.parse(dj.handler) | |
4. You can get the ruby objects that the delayed job was built with by converting that to_ruby and calling the object: | |
YAML.parse(dj.handler).to_ruby.user | |
YAML.parse(dj.handler).to_ruby.prospect | |
YAML.parse(dj.handler).to_ruby.agent | |
etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
- BIOS of host machine also needs to be configured to allow hardware virtualization | |
- Windows 10 Pro or otherwise is needed; Windows 10 Home Edition CANNOT get WSL | |
- This gist WSLv2, but can use WSLv1 instead. I needed v1 as I run Windows 10 in a VM in Virtualbox. | |
- WSLv2 has been giving me problems in Virtualbox 6.1, but WSLv1 works properly. | |
- vbox has issues with the GUI settings when it comes to nested virtualization on certain systems, | |
so run the following if needing to give a VM this enabled setting: | |
VBoxManage modifyvm <vm-name> --nested-hw-virt on | |
#> |