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
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
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
''' 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
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
#!/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
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
#!/usr/bin/ruby | |
require 'faraday' | |
require 'json' | |
conn = Faraday.new(:url => 'http://localhost:5000') | |
responce = conn.post do |post| | |
post.url '/v3/auth/tokens' | |
post.headers['Content-Type'] = 'application/json' | |
post.body = { |
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
Modified lib/puppet/provider/mongodb.rb | |
diff --git a/lib/puppet/provider/mongodb.rb b/lib/puppet/provider/mongodb.rb | |
index 6bbc350..d82fa83 100644 | |
--- a/lib/puppet/provider/mongodb.rb | |
+++ b/lib/puppet/provider/mongodb.rb | |
@@ -55,8 +55,11 @@ class Puppet::Provider::Mongodb < Puppet::Provider | |
if bindip | |
first_ip_in_list = bindip.split(',').first | |
- if first_ip_in_list.eql? '0.0.0.0' |
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
heat_template_version: 2014-10-16 | |
description: > | |
Extra config to add swap space to nodes. | |
# Parameters passed from the parent template - note if you maintain | |
# out-of-tree templates they may require additional parameters if the | |
# in-tree templates add a new role. | |
parameters: | |
controller_servers: |