*work-in-progress
- 500g Chicken thigh fillets, chopped
- 2x Peppers
- A couple of cloves of garlic (frozen is fine)
- 1x Cans chopped tomatoes
require 'libvirt' | |
require 'builder' | |
class Libvirt::Domain | |
def create_snapshot(sdesc=nil) | |
builder = Builder::XmlMarkup.new | |
snapshot_xml = builder.domainsnapshot do |ds| | |
if sdesc | |
ds.description(sdesc) | |
end |
/** | |
* Determines which Filesystem Method to use. | |
* The priority of the Transports are: Direct, SSH2, FTP PHP Extension, FTP Sockets (Via Sockets class, or fsockopen()) | |
* | |
* Note that the return value of this function can be overridden in 2 ways | |
* - By defining FS_METHOD in your <code>wp-config.php</code> file | |
* - By using the filesystem_method filter | |
* Valid values for these are: 'direct', 'ssh', 'ftpext' or 'ftpsockets' | |
* Plugins may also define a custom transport handler, See the WP_Filesystem function for more information. | |
* |
#!/usr/bin/env python | |
import sys | |
import email.parser | |
import base64 | |
if(len(sys.argv) < 2): | |
print "No email file specified!" | |
sys.exit(1) | |
p = email.parser.Parser() |
#!/usr/bin/env ruby | |
require 'snmp' | |
# usage: printerstatus.rb printer.host.name community.name | |
# no output unless error, returns zero if status is ok | |
SNMP::Manager.open(:Host=>ARGV[0],:Community=>ARGV[1]) do |manager| | |
resp = manager.get(["SNMPv2-SMI::mib-2.43.18.1.1.8.1.1"]) | |
resp.each_varbind do |varbind| | |
exit(0) if varbind.value.to_s == "noSuchInstance" |
# upgdiff.rb | |
# | |
# Prints the change in versions that will happen if "yum upgrade" is | |
# run on this CentOS/RHEL server, and if any of the upgrades will come | |
# from third party repositories. | |
# | |
# For example: | |
# | |
# [root@server] $ ruby upgdiff.rb | |
# yum-utils: 1.1.16-14.el5.centos.1 ==> 1.1.16-21.el5.centos |
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
pid logs/nginx.pid; | |
#!/usr/bin/env ruby | |
# DNS Bulk Resolver | |
# | |
# Resolves all the domains in the file argv[0], and www.$(each) | |
# Uses the resolv.conf file specified below (googledns.conf) | |
# Will hammer your DNS servers, be cautious. | |
# Creates a thread for each line in the file, be cautious. | |
# Be safe. | |
require 'resolv' |
#!/usr/bin/env ruby | |
# Ruby varnish purger | |
require 'net/http' | |
module Net | |
class HTTP::Purge < HTTPRequest | |
METHOD='PURGE' | |
REQUEST_HAS_BODY = false | |
RESPONSE_HAS_BODY = true |
#!/usr/bin/env python | |
import time | |
import sys | |
CEILING=10 | |
WIDTH=80 | |
def get_loadavg(): | |
f = open('/proc/loadavg','r') | |
line = f.read() |