
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
{ top -n 5 -b > /tmp/top.out; vmstat 1 50 > /tmp/vm.out; iostat -tkx -p ALL 1 10 > /tmp/io.out; mpstat -A 1 10 > /tmp/mp.out; ps auwwx > /tmp/ps1.out; ps axHo %cpu,stat,pid,tid,pgid,ppid,comm,wchan > /tmp/ps2.out; sar -A 1 50 > /tmp/sar.out; free > /tmp/free.out; } | |
tar -cjvf outputs_$(hostname)_$(date +"%d-%b-%Y_%H%M").tar.bz2 /tmp/*.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################### | |
## toggleTouchpad.sh | |
## | |
## Toggle the touchpad on/off. | |
########################################################################### | |
# Get the id number of the touchpad. | |
tp_id=`xinput list | grep -i touchpad | awk '{ print $6 }' | sed 's/id=//'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Action | |
~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:134:in `category': could not match Category: down;scheme="http://schemas.ogf.org/occi/infrastructure/network/action#up";class="action";title="Activate network" (RuntimeError) | |
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:73:in `block in categories' | |
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:71:in `each' | |
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:71:in `categories' | |
from ~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser.rb:41:in `parse' | |
# Security group from OCCI-OS | |
~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:134:in `category': could not match Category: 36; scheme="http://schemas.openstack.org/infrastructure/security/group#"; class="mixin"; title="default"; rel="http://schemas.ogf.org/occi/infrastructure/security#group"; location="/security/default/" (RuntimeError) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:134:in `category': could not match Category: egicf2012_demo;scheme="https://occi.schema/occi/infrastructure/os_tpl#";class="mixin";title="egicf2012-demo";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/egicf2012_demo/" (RuntimeError) | |
from /home/arax/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:73:in `block in categories' | |
from /home/arax/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:71:in `each' | |
from /home/arax/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser/text.rb:71:in `categories' | |
from /home/arax/.rvm/gems/ruby-1.9.3-p392/gems/occi-3.2.0.alpha.1/lib/occi/parser.rb:41:in `parse' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'httpi' | |
require 'curb' | |
require 'pp' | |
require 'json' | |
################################ | |
# kinit user@REALM | |
# kinit -k -t /ticket/path | |
################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Category: compute;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind" | |
Category: small;scheme="https://occi.my.scheme/occi/infrastructure/resource_tpl#";class="mixin" | |
X-OCCI-Attribute: occi.core.title="My Test VM" | |
Link: </storage/e60aa2b8-0c86-5973-b93e-30c5c46d6eac>;rel="http://schemas.ogf.org/occi/infrastructure#storage";category="http://schemas.ogf.org/occi/infrastructure#storagelink";occi.core.target="/storage/e60aa2b8-0c86-5973-b93e-30c5c46d6eac" | |
Link: </network/e4bd81c4-adda-5626-840d-39bb7959db97>;rel="http://schemas.ogf.org/occi/core#resource";category="http://schemas.ogf.org/occi/infrastructure#networkinterface";occi.core.target="/network/e4bd81c4-adda-5626-840d-39bb7959db97" | |
D, [2013-02-22T13:20:35.249918 #31553] DEBUG -- : ### Prepare response ### | |
D, [2013-02-22T13:20:35.250061 #31553] DEBUG -- : ### Initialize response OCCI collection ### | |
D, [2013-02-22T13:20:35.250307 #31553] DEBUG -- : ### Reset OCCI model ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
require 'highline/import' | |
keystore = Java::JavaSecurity::KeyStore.getInstance("PKCS12") | |
path = ask "Enter full path to the PKCS#12 file: " | |
fis = Java::JavaIo::FileInputStream.new(path) | |
password = ask("Enter you PKCS#12 password: ") { |q| q.echo = false } | |
password = Java::JavaLang::String.new(password).to_char_array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gets the username associated with a password | |
# password:: _String_ the password | |
# [return] _Hash_ with the username | |
def get_username(password) | |
xpath = "USER[PASSWORD=\"#{password}\"]/NAME" | |
username = retrieve_from_userpool(xpath) | |
# No exact match, trying to match password with each | |
# of the pipe-separated DNs stored in USER/PASSWORD | |
if username.nil? |
NewerOlder