Skip to content

Instantly share code, notes, and snippets.

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

Sergio Rubio rubiojr

🚀
>>>>>>>>> ⚠️ 💥 ☠️
View GitHub Profile
@rubiojr
rubiojr / gnome-keyring-query.c
Last active Aug 29, 2015
gnome-keyring-query.c
View gnome-keyring-query.c
// http://www.gentoo-wiki.info/HOWTO_Use_gnome-keyring_to_store_SSH_passphrases
// gcc gnome-keyring-query.c `pkg-config --cflags --libs gnome-keyring-1 glib-2.0` -o gnome-keyring-query
// https://github.com/rlaager/gnome-keyring-query-pkg
// also apt-get install libsecret-tools && secret-tool
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
#include "gnome-keyring.h"
@rubiojr
rubiojr / gnome_keyring.rb
Last active Aug 29, 2015
Read-only access to the GNOME keyring
View gnome_keyring.rb
#!/usr/bin/env ruby
require 'gir_ffi-gnome_keyring'
class Keyring
# Return all the keyring items
#
# returns: An Array of Hashes
#
def self.items
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: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: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: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))