Skip to content

Instantly share code, notes, and snippets.

View gipsh's full-sized avatar
💭
Loading......

gipsh gipsh

💭
Loading......
View GitHub Profile
@gipsh
gipsh / sadp_discovery.rb
Created February 22, 2018 17:37
sadp send discovery
require 'socket'
MULTICAST_ADDR = "239.255.255.250"
PORT= 37020
MSG = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Probe><Uuid>13A888A9-F1B1-4020-AE9F-05607682D23B</Uuid><Types>inquiry</Types></Probe>"
begin
socket = UDPSocket.open
socket.setsockopt(Socket::IPPROTO_IP, Socket::IP_TTL, [1].pack('i'))
socket.send(MSG, 0, MULTICAST_ADDR, PORT)
ensure
@gipsh
gipsh / README.MD
Last active May 15, 2017 04:55
Replace or change a key on ec2 instance

AWS doesnt let you change your ec2 instance key from the admin console.

If you need to replace a key for an ec2 instance:

  1. if you already have the key/pub generated, jump to #3.

  2. Create a new key from command line:

ssh-keygen -t rsa -C "my-new-key"
@gipsh
gipsh / gist:8d25eded61f4a8f7ef26c8ee3ffd6b7f
Created November 18, 2016 16:47
crear certificados afip
1. Primero genero la key
openssl genrsa -out afip-cuit.key 2048
2. Despues genero el CSR
openssl req -new -key afip-cuit.key -sha256 -subj "/C=AR/O=MISA S.A/CN=misa.com/serialNumber=CUIT 301234567890" -out afip-cuit.csr
3. Con esto puedo generar el cert el site de afip.
If you want to integrate your dashboard with mercadopago.
Do you need to add `mercadopago` gem to your Gemfile