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
#!/usr/bin/env ruby | |
require 'excon' | |
require 'json' | |
require 'net/dns' | |
include Net::DNS | |
# | |
# Run an arbitrary command using parallel-ssh against all the nodes | |
# registered in the puppet master | |
# Needs pssh (parallel-ssh) installed. |
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/sh | |
yum install -y qemu-img iscsi-initiator-utils scsi-target-utils.x86_64 qemu-img --nogpgcheck | |
mkdir /data | |
qemu-img create /data/netdisk01.raw 10G | |
losetup /dev/loop0 /data/netdisk01.raw | |
cp /etc/tgt/targets.conf /etc/tgt/targets.conf.bak | |
cat > /etc/tgt/targets.conf <<EOF | |
default-driver iscsi | |
<target iqn.2008-09.com.example:server.target1> | |
backing-store /dev/loop0 |
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
diff --git a/internal/ui/inprogresslist/inprogresslist.go b/internal/ui/inprogresslist/inprogresslist.go | |
index d05f3b4..e25a0c8 100644 | |
--- a/internal/ui/inprogresslist/inprogresslist.go | |
+++ b/internal/ui/inprogresslist/inprogresslist.go | |
@@ -57,7 +57,7 @@ func (i *InProgressList) isShown(tree *gtk.TreeView) { | |
func (i *InProgressList) updateFileList() { | |
//TODO: use leveldb to speed things up without walking the filesystem | |
- i.listBox.BindModel(nil, nil, nil) | |
+ i.listBox.BindModel(nil, nil) |
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
package main | |
import ( | |
"fmt" | |
"net/url" | |
) | |
func main() { | |
u, _ := url.Parse(`file:///c:/go`) | |
fmt.Println(u.Path) // prints /c:/go |
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 'rbvmomi' | |
require 'pp' | |
require 'alchemist' | |
hyper = 'thunder03' | |
vim = RbVmomi::VIM.connect :host => hyper, :user => 'root', :password => 'secret', :insecure => true | |
# | |
# get current time |
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
diff --git a/cfg/config.go b/cfg/config.go | |
index e4fc20d..c278b9b 100644 | |
--- a/cfg/config.go | |
+++ b/cfg/config.go | |
@@ -1,11 +1,14 @@ | |
package cfg | |
import ( | |
+ "bytes" | |
"encoding/json" |
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
#!/usr/bin/env ruby | |
# | |
# Before we start, make sure you have Essex support in Fog | |
# | |
# Essex support has not been merged into upstream Fog so you'll need | |
# a custom ruby fog build to run through the examples | |
# | |
require 'fog' | |
require 'pp' | |
require 'highline/import' |
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
# Ubuntu Upstart service file | |
description "munin-graphite" | |
start on (filesystem and net-device-up) | |
stop on runlevel [!2345] | |
env DAEMON=/usr/local/bin/munin-graphite | |
expect fork | |
respawn |
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/sh | |
# | |
# http://jbrazile.blogspot.com.es/2012/01/scripted-vmdkova-images-wboxgrinder-and.html | |
# | |
NAME=$1 | |
OS=$2 | |
IMAGE= | |
SZMB=384 | |
INSTDIR=/tmp/ova-gen/boxes | |
BUILDDIR=/tmp/ova-gen/builds |
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 'excon' | |
require 'pp' | |
require 'yajl' | |
# Auth parameters | |
username = 'root' | |
password = 'secret' | |
host = '192.168.1.1' | |
# Will parse returned JSON content | |
parser = Yajl::Parser.new |
NewerOlder