Skip to content

Instantly share code, notes, and snippets.

View JuanCrg90's full-sized avatar

Juan Carlos Ruiz JuanCrg90

View GitHub Profile
@JuanCrg90
JuanCrg90 / keybase.md
Last active May 24, 2018 20:31
Keybase proof

Keybase proof

I hereby claim:

  • I am juancrg90 on github.
  • I am juancrg90 (https://keybase.io/juancrg90) on keybase.
  • I have a public key ASAMM16703KTt6cw9bxOAlfjacpbG3JqVSO8py670CreWAo

To claim this, I am signing this object:

@JuanCrg90
JuanCrg90 / drop_queues.rb
Created July 28, 2018 16:22
bundle exec rails runner "eval(File.read 'drop_queues.rb')"
# bundle exec rails runner "eval(File.read 'drop_queues.rb')"
queues = Delayed::Job.all.map(&:queue).uniq
Delayed::Job.where(queue: queues).destroy_all
@JuanCrg90
JuanCrg90 / setup.sh
Created January 20, 2019 21:56
Setup Raspberry Pi NAS
# https://howtoraspberrypi.com/create-a-nas-with-your-raspberry-pi-and-samba/
sudo apt update
sudo apt upgrade
sudo mkdir -p /home/shares/public
sudo chown -R root:users /home/shares/public
sudo chmod -R ug=rwx,o=rx /home/shares/public
sudo apt install -y samba samba-common-bin
@JuanCrg90
JuanCrg90 / ignore_vcr.rb
Created January 31, 2020 18:37
Ignore VCR in ruby test
def test_request
WebMock.allow_net_connect!
VCR.turned_off do
response = Hashie::Mash.new(MyApi::Api.new('param').endpoint_call.json)
assert_equal 0, response.number
assert_equal 1234, response.total
end
end