Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
>>>>>>>>> ⚠️ 💥 ☠️

Sergio Rubio rubiojr

🚀
>>>>>>>>> ⚠️ 💥 ☠️
View GitHub Profile
View jsp_http_redirect
<% response.sendRedirect("/secyta/"); %>
View gist:34659
ssh-dss AAAAB3NzaC1kc3MAAACBAJ8+WXtChElWyJ3PjlA9HoX6j/njnfKibvsKOSqaGqCAANZjqHFRCNN1JmR32xd2fNRCpo063J5VY64Su4fQfAW+SdfQBbQHuCW6b8LEis8ST3omeENXZUImajmFKLDOsKTbDTcbblm+l5QhlHvrzaSHxMKuy+a5nbM31oC3JwhrAAAAFQCUwi0WViUI0M7vnmpRsL2OAfT61QAAAIAG/HlUKIqSqgMv/E2dbbes4jtRertUn7nXqR3a1Ed4g8uPn1/lul0y8BRRY8MdPcEe/zYxJuQbY33iNs4YWjp8mE2mdBvbCVQO5+wg3g61/XmgmIE7InP77WlOhyYNEgvIHGOfcF2Ncwx6OHS07Dkfz3mo6O6nfugRLLZzZVp0VgAAAIB/F77K1z1M8vLzPjsgvqj3Flb2RQBd96g9nJLgVtV1iFM1yMr/TwQbrSpqQkQ3rysfTUsB/WXkI0y09vsBFEvMZOqBGe3ZWbMO1n5B+D7ziA4m0mWhAEL6/0p8MW86rzSWR8/lJ6jBUdcCSWtMthRPkmDgFNtfdXhgxtUfLIxPPQ== rubiojr csic key
View notable deploy notes
== Sinatra/0.3.2 has taken the stage on port 4567 for development with backup byRack::Handler::Thin
>> Thin web server (v1.0.0 codename That's What She Said)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
Segmentation fault
------------
DataMapper.setup(:default, "sqlite3:///home/rubiojr/notable/notes.db")
Notable::Note.auto_migrate!
View gist:99659
tg3: eth1: Link is up at 1000 Mbps, full duplex.
tg3: eth1: Flow control is off for TX and off for RX.
bonding: bond0: link status definitely up for interface eth1.
tg3: eth1: Link is down.
bonding: bond0: link status definitely down for interface eth1, disabling it
tg3: eth1: Link is up at 1000 Mbps, full duplex.
tg3: eth1: Flow control is off for TX and off for RX.
bonding: bond0: link status definitely up for interface eth1.
tg3: eth1: Link is down.
bonding: bond0: link status definitely down for interface eth1, disabling it
View gist:99660
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
View gist:99661
eth1: Tigon3 [partno(BCM95704A41) rev 2100 PHY(serdes)] (PCIX:133MHz:64-bit) 10/100/1000BaseT Ethernet 00:14:5e:3e:0f:7b
eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] Split[0] WireSpeed[0] TSOcap[1]
eth1: dma_rwctrl[769f4000]
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
pciehp: Address64 -------- Resource unparsed
View gist:107523
class Vlan < CouchFoo::Base
property :vid, Integer
property :name, String property :description, String
property :network, String
property :environment, String
end
Vlan.create :vid => 54, :name => 'foobar'
Vlan.find_by_vid 54
Vlan.all.each do |v|
View gist:122150
#! /usr/bin/python
# macgen.py script generates a MAC address for Xen guests
#
import random
mac = [ 0x00, 0x16, 0x3e,
random.randint(0x00, 0x7f),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff) ]
print ':'.join(map(lambda x: "%02x" % x, mac))
View TLS ruby ldap auth
require 'rubygems'
require 'net/ldap'
ldap = Net::LDAP.new
ldap.host = 'foo.bar.stuff'
ldap.port = 636
ldap.encryption :method => :simple_tls
ldap.auth 'cn=user, dc=foo, dc=bar', 'something-secret'
if ldap.bind
View sha1 + base64 password generation
require 'digest/sha1'
require 'base64'
d = Digest::SHA1.new
hash = Base64.encode64(d.digest('something secret'))