Skip to content

Instantly share code, notes, and snippets.

@razum2um
razum2um / zfs-veracrypt-failed-usb-cable.txt
Created May 10, 2023 16:51 — forked from mailinglists35/zfs-veracrypt-failed-usb-cable.txt
recover veracrypt zfs pool after failed usb cable, without reboot
dmsetup table | grep veracrypt
veracrypt2: 0 3904923136 crypt aes-xts-plain64 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 256 8:34 256
dmsetup reload veracrypt2 --table "0 3904923136 error"
dmsetup suspend --noflush veracrypt2
dmsetup resume veracrypt2
(?)zpool clear backup-usb
remove from veracrypt UI
echo "0 3904923136 zero" | dmsetup reload veracrypt2
dmsetup suspend --noflush veracrypt2
dmsetup resume veracrypt2
@razum2um
razum2um / broadcom-wl-fix-linux-5.10.patch
Created January 25, 2021 23:15 — forked from joanbm/broadcom-wl-fix-linux-5.10.patch
Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10-rc1
From f3d652840f8dd959395065a1cf67ca40b04ec69b Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Tue, 13 Oct 2020 19:35:55 +0200
Subject: [PATCH] Get rid of get_fs/set_fs calls in Broadcom WL driver.
Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1)
Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux.
NB: Some checks in wlc_ioctl_internal are likely superfluous,
require 'benchmark'
class X
attr_accessor :foo
def getter
foo + foo
end
def lvar
@razum2um
razum2um / list.txt
Created October 30, 2020 18:33
List of signed gems from 10K top popular ruby gems
pry(main)> Version.where(platform:'ruby',latest:true).joins('join gem_downloads d on d.rubygem_id=versions.rubygem_id').group(:id).order('sum(count) desc').limit(9999).pluck(:full_name).count{|n|!Gem::Package.new(open "https://rubygems.org/downloads/#{n}.gem").spec.cert_chain.empty? && (puts n; 1)}
rspec-expectations-3.9.3
rspec-core-3.9.3
rspec-mocks-3.9.1
rspec-support-3.9.4
rspec-3.9.0
tzinfo-2.0.2
minitest-5.14.2
net-ssh-6.1.0
@razum2um
razum2um / 01-readme.md
Last active October 31, 2019 22:21
rubyjedi-soap4r => No "warning: constant ::Fixnum is deprecated"

Proper SOAP support on newest rubies

TLDR: let's replace rubyjedi-soap4r with soap4r-ng

If someone requires latest atm rubyjedi-soap4r https://rubygems.org/gems/rubyjedi-soap4r/versions/2.0.2.1 he sees the warning:

...gems/rubyjedi-soap4r-2.0.2.1/lib/soap/mapping/encodedregistry.rb:149: warning: constant ::Fixnum is deprecated
@razum2um
razum2um / MyResponsiveComponent.js
Created February 20, 2019 10:44 — forked from gaearon/MyResponsiveComponent.js
Examples from "Making Sense of React Hooks"
function MyResponsiveComponent() {
const width = useWindowWidth(); // Our custom Hook
return (
<p>Window width is {width}</p>
);
}
@razum2um
razum2um / .block
Last active January 16, 2018 22:57
D3 v4 Line Chart
license: mit
@razum2um
razum2um / .block
Last active October 30, 2017 12:49
More bounding box collide
license:
### Keybase proof
I hereby claim:
* I am razum2um on github.
* I am razum2um (https://keybase.io/razum2um) on keybase.
* I have a public key ASC0xZ6lImqj-U2FzPyYHvYKt1jGi5PHIwUgkct4PBqvVQo
To claim this, I am signing this object:

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM