Skip to content

Instantly share code, notes, and snippets.

View mvidner's full-sized avatar

Martin Vidner mvidner

  • SUSE
  • Prague, CZ, EU
View GitHub Profile
@mvidner
mvidner / gist:e37e4ce292b50b4e533a414ba315a778
Created October 26, 2017 08:41
How to make a CustomWidget disappear but not destroying it?
#We have such a Tab, wich has a TargetsTableWidget(A customWidget has a table and buttons),
#TargetsTableWidget would be listed after class TargetsTab
class TargetsTab < ::CWM::Tab
def initialize
@target_table_widget = TargetsTableWidget.new
self.initial = false
end
def contents
VBox(
@mvidner
mvidner / quick_vm.rb
Created October 17, 2012 14:34 — forked from rubiojr/quick_vm.rb
Quick OpenStack Server Create with ruby Fog
#!/usr/bin/env ruby
#
require 'rubygems'
require 'fog'
%w{OS_PASSWORD OS_USERNAME OS_AUTH_URL}.each do |env|
if ENV[env].nil?
$stderr.puts "Missing #{env} environment variable."
exit 1
end