Skip to content

Instantly share code, notes, and snippets.

View rubiojr's full-sized avatar
🚀
>>>>>>>>> ⚠️ 💥 ☠️

Sergio Rubio rubiojr

🚀
>>>>>>>>> ⚠️ 💥 ☠️
View GitHub Profile
@rubiojr
rubiojr / gnome_keyring.rb
Last active August 29, 2015 13:59
Read-only access to the GNOME keyring
#!/usr/bin/env ruby
require 'gir_ffi-gnome_keyring'
class Keyring
# Return all the keyring items
#
# returns: An Array of Hashes
#
def self.items
#!/usr/bin/env ruby
require 'time'
require 'pp'
RED = "\e[31m"
GREEN = "\e[32m"
YELLOW = "\e[33m"
CLEAR = "\e[0m"
BOLD = "\e[1m"
@rubiojr
rubiojr / otd-20130914.md
Last active December 23, 2015 02:59
One Tip a Day

VMware tools can't find Linux headers path in Saucy (13.10)

tags: vmware ubuntu saucy

apt-get install linux-headers
ln -s /usr/src/linux-headers-`uname -r`/include/generated/uapi/linux/version.h /usr/src/linux-headers-`uname -r`/include/linux/version.h

Then re-run the VMware tools installer

@rubiojr
rubiojr / weekly-news-archiver.sh
Last active December 20, 2015 15:09
#ruby #python #raspberrypi #devops
#!/bin/bash
#
# Needs wget and wkpdf
#
# Python Weekly News
FIRST=1
LAST=81
BASE_URL=http://www.pythonweekly.com/archive/
mkdir pwn
@rubiojr
rubiojr / s3put
Created May 31, 2013 06:45 — forked from mattbillenstein/s3put
s3put #s3 #python
#!/usr/bin/env python
import gevent.monkey
gevent.monkey.patch_all()
import boto
import config
import gevent
import gevent.pool
import os
@rubiojr
rubiojr / reload_iptables.sh
Created May 29, 2013 12:07 — forked from eqhmcow/reload_iptables.sh
reload_iptables.sh
IPTABLES=iptables
IPV=${IPTABLES%tables} # ip for ipv4 | ip6 for ipv6
PROC_IPTABLES_NAMES=/proc/net/${IPV}_tables_names
/sbin/modprobe --version 2>&1 | grep -q module-init-tools \
&& NEW_MODUTILS=1 \
|| NEW_MODUTILS=0
# Do not stop if iptables module is not loaded.
[ -e "$PROC_IPTABLES_NAMES" ] || exit 1
@rubiojr
rubiojr / putbench.py
Last active December 17, 2015 16:59
putbench.py
import swift.common.utils
import StringIO
import pprint
import random
import sys, os
import requests
from commandr import command, Run
from gevent import monkey
monkey.patch_all()
@rubiojr
rubiojr / proxy.rb
Created May 16, 2013 17:19 — forked from torsten/proxy.rb
proxy.rb
#!/usr/bin/env ruby
# A quick and dirty implementation of an HTTP proxy server in Ruby
# because I did not want to install anything.
#
# Copyright (C) 2009 Torsten Becker <[email protected]>
require 'socket'
require 'uri'
diff --git a/tests/openstack/requests/compute/volume_tests.rb b/tests/openstack/requests/compute/volume_tests.rb
index e08755e..c674904 100644
--- a/tests/openstack/requests/compute/volume_tests.rb
+++ b/tests/openstack/requests/compute/volume_tests.rb
@@ -4,20 +4,21 @@ Shindo.tests('Fog::Compute[:openstack] | volume requests', ['openstack']) do
@volume_format = {
'id' => String,
- 'name' => String,
+ 'displayName' => String,
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
#
# retrieved from: http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/
#