Skip to content

Instantly share code, notes, and snippets.

Avatar

Martin Vidner mvidner

  • SUSE
  • Prague, CZ, EU
View GitHub Profile
@mvidner
mvidner / gist:e37e4ce292b50b4e533a414ba315a778
Created Oct 26, 2017
How to make a CustomWidget disappear but not destroying it?
View gist:e37e4ce292b50b4e533a414ba315a778
#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 Oct 17, 2012 — forked from rubiojr/quick_vm.rb
Quick OpenStack Server Create with ruby Fog
View quick_vm.rb
#!/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