Skip to content

Instantly share code, notes, and snippets.

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

Sergio Rubio rubiojr

🚀
>>>>>>>>> ⚠️ 💥 ☠️
View GitHub Profile
[frameos-experimental]
gpgcheck=1
gpgkey=http://mirror.frameos.org/RPM-GPG-KEY-FrameOS-5
baseurl=http://mirror.frameos.org/frameos/6/experimental/x86_64
name=FrameOS Experimental Repo
enabled=1
@rubiojr
rubiojr / trackpoint.conf
Created February 12, 2011 19:17
Adjust Lenovo/IBM Thinkpad trackpoint (upstart service)
description "IBM/Lenovo trackpoint sentivity adjustment"
start on runlevel 2
script
SYS_FILE="/sys/devices/platform/i8042/serio1/sensitivity"
if test -f $SYS_FILE; then
sudo echo -n 200 > $SYS_FILE
else
logger "Trackpoint sensitivity couldn't be adjusted."
@rubiojr
rubiojr / startvnc.pl
Created March 3, 2011 07:57
start mac vnc server: startvnc.pl password > file.sh
#!/usr/bin/perl
#
#
#[Macoy] original script taken from:
# [Macoy]http://www.macgeekery.com/user/unixgeek
# [Macoy] this script revised by macoy [http://macoy.wordpress.com]
# Usage: perl vncpasswd.pl [password]
# [Macoy]$ perl vncpass_macoy.pl [vnc_password] > startvnc.sh
# [Macoy]$ sh startvnc.sh
#----------------------------------------------------------------------------------
@rubiojr
rubiojr / spotify_dbus_example1.rb
Created March 8, 2011 15:02
ruby spotify dbus example
require 'rubygems'
require 'dbus'
require 'pp'
bus = DBus::SessionBus.instance
service = bus.service 'org.mpris.MediaPlayer2.spotify'
obj = service.object '/org/mpris/MediaPlayer2'
obj.introspect
player = obj["org.mpris.MediaPlayer2.Player"]
@rubiojr
rubiojr / isolinux-patch.rb
Created March 30, 2011 11:32
Patch RHEL5 derived ISOs isolinux config file
#!/usr/bin/env ruby
require 'tmpdir'
require 'fileutils'
require 'thread'
def progress_loop(thread , msg = "Working... " , step_lag = 0.1)
$stdout.sync = true
line_reset = "\r\e[0K" + msg
while thread.status
print line_reset + "|"
@rubiojr
rubiojr / isolinux.cfg
Created March 30, 2011 11:34
isolinux sample config file to auto kickstart RHEL5 ISOs
default kickstart
prompt 1
timeout 60
display boot.msg
F1 boot.msg
F2 options.msg
F4 param.msg
F5 rescue.msg
label local
@rubiojr
rubiojr / miniwm_anaconda.py
Created May 17, 2011 13:44
Minimal Anaconda Installer
#!/usr/bin/python
#
# anaconda: The Red Hat Linux Installation program
#
# (in alphabetical order...)
#
# Brent Fox <bfox@redhat.com>
# Mike Fulbright <msf@redhat.com>
# Jakub Jelinek <jakub@redhat.com>
# Jeremy Katz <katzj@redhat.com>
bash -c '
if [ ! -f /usr/bin/chef-client ]; then
cd /tmp
rpm -Uvh http://rbel.frameos.org/rbel6
yum install -y ruby rubygem-chef ntp
fi
mkdir -p /etc/chef
(
@rubiojr
rubiojr / rhel5-rbel.erb
Created May 20, 2011 10:49
rhel5 rbel chef bootstrap script
bash -c '
if [ ! -f /usr/bin/chef-client ]; then
cd /tmp
rpm -Uvh http://rbel.frameos.org/rbel5
yum install -y ruby rubygem-chef
fi
# install ntp, clock is important
yum install ntp
@rubiojr
rubiojr / rbvmomi_example1.rb
Created June 1, 2011 09:52
ruby vmware vsphere api example 1
require 'rubygems'
require 'rbvmomi'
vim = RbVmomi::VIM.connect :host => '10.60.1.71', :user => 'root', :password => 'temporal', :insecure => true
# get current time
vim.serviceInstance.CurrentTime
# get datacenter
dc = vim.serviceInstance.find_datacenter