Skip to content

Instantly share code, notes, and snippets.

View arax's full-sized avatar

Boris Parak arax

  • Brno, Czech Republic
View GitHub Profile
@arax
arax / gist:5597702
Last active December 17, 2015 10:49
rOCCI -- parsing error from invalid Action rendering (rOCCI-server v0.5.x) and SecGroup mixin (OCCI-OS)
# 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)
@arax
arax / toggleTouchpad.sh
Created September 20, 2015 17:01
Toggle the touchpad (on/off)
#!/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=//'`
@arax
arax / git-delete-tags.sh
Created November 10, 2017 17:46
HowTo Delete git Tags - local & remote
TAGS=$(git tag | grep v4) # filter out tags to remove
for TAG in $TAGS ; do
git tag -d "$TAG" # remove local
git push origin :refs/tags/"$TAG" # remove from origin (remote)
done
@arax
arax / sys_explore.sh
Created May 20, 2018 10:44
Script gathering various internal data for system diagnostics and performance tuning
#!/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
@arax
arax / OIDC.jpg
Last active October 23, 2023 17:31
OpenStack with OpenID Connect and OAuth 2.0
OIDC.jpg