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/env python | |
import socket | |
import sys | |
from struct import pack,unpack | |
SERVER='ewcs2.ewcs.com' | |
VOLUME='vmimages' | |
DEFAULT_SERVER_PORT=24007 | |
GETSPEC=2 |
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
# /etc/init/debug.conf | |
start on ( starting JOB!=debug \ | |
or started JOB!=debug \ | |
or stopping JOB!=debug \ | |
or stopped JOB!=debug ) | |
script | |
exec 1>>/var/log/upstart.log | |
echo -n "$UPSTART_JOB/$UPSTART_INSTANCE ($0):$$:`date`:" | |
echo "Job $JOB/$INSTANCE $UPSTART_EVENTS. Environment was:" | |
env |
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
input { | |
file { | |
path => "/var/log/glusterfs/*.log" | |
sincedb_path => "/var/tmp/.glusterfs.sincedb" | |
format => "plain" | |
type => "glusterfs" | |
} | |
file { | |
path => "/var/log/glusterfs/bricks/*.log" | |
sincedb_path => "/var/tmp/.glusterfs.bricks.sincedb" |
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
[Unit] | |
Description=GlusterFS an clustered file-system server | |
After=network.target rpcbind.service | |
Before=network-online.target | |
[Service] | |
Type=forking | |
PIDFile=/run/glusterd.pid | |
LimitNOFILE=65536 | |
ExecStart=/usr/sbin/glusterd -p /run/glusterd.pid |
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 "rexml/document" | |
include REXML | |
service_document = Document.new `tools/scripts/data-deposit-api/test-service-document` | |
collection = XPath.first(service_document, "//collection/@href") | |
feed_of_studies = Document.new `tools/scripts/data-deposit-api/test-collection-get #{collection}` | |
first_study = XPath.first(feed_of_studies, "//entry") | |
id = first_study.elements["id"].text | |
study_edit_uri = first_study.attributes["xml:base"] |
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
include glusterfs | |
@@glusterfs_peer { $fqdn: tag => 'assassinscreedonline_content', ensure => absent } | |
Glusterfs_peer <<| (tag == 'peergroup1') and (title != $fqdn) |>> | |
glusterfs::brick { '/data/gluster/aco/content/brick': host => $fqdn, tag => 'aco_c' } | |
glusterfs::volume { 'aco_content': | |
bricktag => 'aco_c', | |
settings => { 'nfs.disable' => 'on' } |
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
class Meta: | |
queryset = Item.objects.prefetch_related('components').all() | |
#... | |
def dehydrate_quantity(self, bundle): | |
if len(bundle.data['components']): | |
qty = min([ int(x.component.quantity/x.quantity) for x in bundle.obj.components.all() ] ) | |
bundle.data['quantity'] = qty | |
return bundle.data['quantity'] |
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
[2013-10-18 11:44:23,935][WARN ][http.netty ] [Alibar] Caught exception while handling client http traffic, closing connection [id: 0xb7a1d1d0, /127.0.0.1:39162 => /127.0.0.1:9200] | |
java.lang.NoClassDefFoundError: org/elasticsearch/http/netty/NettyHttpChannel | |
at org.elasticsearch.http.netty.HttpRequestHandler.messageReceived(HttpRequestHandler.java:43) | |
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) | |
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) | |
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) | |
at org.elasticsearch.common.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:145) | |
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) | |
at org.elasticsearch.common.net |
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
import pythoncom | |
import wmi | |
import win32net | |
import win32api | |
import win32con | |
import pywintypes | |
from ctypes import windll |
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
winrepo: | |
module.run: | |
- name: pkg.refresh_db | |
install_win32net: | |
pkg.installed: | |
- name: win32net | |
- refresh_db: True | |
- require: | |
- pkg: winrepo |
OlderNewer