This file contains hidden or 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
HOSTS: | |
centos-server-71-x64: | |
roles: | |
- master | |
platform: el-7-x86_64 | |
box: sofer/centos-71-base | |
box_url: https://vagrantcloud.com/sofer/centos-71-base | |
hypervisor: vagrant_libvirt | |
# this assume that the ssh user is vagrant. Tweak the .vagrant/beaker_vagrant_files/libvirt-centos.yml/Vagrantfile file | |
# to change this, adding : v.vm.ssh.username = 'centos' somewhere in the file. |
This file contains hidden or 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
#!/opt/chef/embedded/bin/ruby | |
require 'mysql' | |
require 'optparse' | |
options = {:localhost => '127.0.0.1'} | |
OptionParser.new do |opts| | |
opts.on("-l", "Use localhost instead of 127.0.0.1") do |l| | |
options[:localhost] = 'localhost' | |
end | |
end.parse! |
This file contains hidden or 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
def lookup(self, key_name, **kwargs): | |
if self._bucket_dict and key_name in self._bucket_dict: | |
value = Bucket._bucket[self.name][key_name] | |
k = Key(self) | |
prefix = '/' | |
if not value.startswith('/'): | |
prefix = '' | |
suffix = '/' | |
if not value.endwith('/'): | |
suffix = '' |
This file contains hidden or 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
''' Get a listing of objects for the container. ''' | |
def get_container(self, container, marker=None, limit=None, prefix=None, | |
delimiter=None, end_marker=None, path=None, | |
full_listing=False): | |
lst = [] | |
search = path | |
if search is None: | |
search = prefix | |
for key, value in self._swift_containers[container].iteritems(): | |
# works only for two level deep path. Enough to test. |
This file contains hidden or 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 swiftclient | |
c = swiftclient.client.Connection( | |
authurl='http://localhost:8080/auth/v1.0', | |
user='test:tester', | |
key='testing', | |
auth_version='1') | |
con_path = c.get_container(container='docker', | |
path='lvl_1/') |
This file contains hidden or 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
pkg install bison flex leveldb protobuf gmake ruby bzr mercurial valgrind leveldb go | |
export CC=clang | |
export CGO_CFLAGS="-I/usr/local/include" | |
export CGO_LDFLAGS="-L/usr/local/lib" | |
git clone https://github.com/influxdb/influxdb.git | |
sed -i -e 's,^SHELL.*,SHELL = /usr/local/bin/bash,' Makefile.in | |
./configure --with-flex=/usr/local/bin/flex --with-bison=/usr/local/bin/bison | |
gmake |
This file contains hidden or 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
--- main.c.orig | |
+++ main.c | |
@@ -833,7 +833,12 @@ main(int argc, char **argv, char **envp) | |
mySignal(SIGPIPE, SigPipe); | |
#endif | |
+#if GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 2 | |
+ orig_GC_warn_proc = GC_get_warn_proc(); | |
+ GC_set_warn_proc(wrap_GC_warn_proc); | |
+#else |
This file contains hidden or 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 sh | |
IP_PREFIX='10.11.12' | |
help () { | |
cat<<EOF | |
USAGE: $0 [-h] -i LAST_BLOCK_IP -m CIDR -v VLAN -n NAME | |
DESCRIPTION: |
This file contains hidden or 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 -x | |
START_DIR=$CWD | |
SHARE_DIR=/backup001/chem/home/chem/src/mfsbsd | |
KEYBOARD=dvorak | |
WANT_PHORONIX_TEST_SUITE=4.4.1 # set it to no to disable | |
# catch error from my own error function even in subshell. | |
err_handler () | |
{ | |
rc=$? |