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
'''Removes .hgsub and any subrepos when switching branches in the parent repository | |
To activate this hook, add this to your ~/.hgrc file: | |
[extensions] | |
switch_branch_with_subrepo = | |
[hooks] | |
preupdate.switch_branch_with_subrepo = python:switch_branch_with_subrepo.preupdate | |
''' |
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 rpyc | |
import logging | |
import time | |
class ClientWrapper: | |
def __init__(self): | |
logging.info('client - before connect') | |
self._connection = rpyc.connect('127.0.0.1',39876) | |
logging.info('client - after connect') |
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 rpyc | |
import logging | |
import time | |
class ClientWrapper: | |
def __init__(self): | |
logging.info('client - before connect') | |
self._connection = rpyc.connect('127.0.0.1',39876) | |
logging.info('client - after connect') |
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
from threading import Thread | |
import rpyc | |
import logging | |
import time | |
class ClientWrapper(Thread): | |
def __init__(self): | |
Thread.__init__(self) | |
logging.info('client - before connect') |
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
env['LDFLAGS'] = "$_LIBDIRFLAGS $LINKFLAGS -ggdb3" | |
env.Execute("echo $LDFLAGS") | |
t = env.Command('$THIRD_PARTY/lib/libcurl.a', | |
'%s.tar.bz2' % name, | |
['mkdir -p $THIRD_PARTY/build', | |
'cd $THIRD_PARTY/build && tar jxf $THIRD_PARTY/%s' % zip_file, | |
'cd $THIRD_PARTY/build/%s && CFLAGS="$_CPPINCFLAGS $CCFLAGS $CFLAGS -ggdb3" CXXFLAGS="$_CPPINCFLAGS $CCFLAGS $CXXFLAGS -ggdb3" LDFLAGS="$LDFLAGS" ./configure --prefix=$THIRD_PARTY --without-ssl --with-pic --without-libssh2 --without-librtmp --without-libidn --without-axtls --without-ca-bundle --without-libssh2 --without-zlib --enable-static=yes --disable-shared --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher --disable-sspi --disable-tls-srp --enable-ares' % name, | |
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
# Configure base_env | |
base_env = Environment() | |
#... | |
# The snippet below enforces having different object instances of the builders | |
# to workaround the shallow copy of env.Clone() | |
other_env = base_env.Clone() | |
del other_env['BUILDERS']['StaticObject'] | |
del other_env['BUILDERS']['SharedObject'] | |
other_env.Tool('gcc') |
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
merb : chef-server (api) : worker (port 4000) ~ Started request handling: Thu Aug 30 16:38:43 +0200 2012 | |
merb : chef-server (api) : worker (port 4000) ~ Routed to: {"admin"=>false, "action"=>"create", "controller"=>"clients", "name"=>"builder"} | |
merb : chef-server (api) : worker (port 4000) ~ Params: {"admin"=>false, "action"=>"create", "controller"=>"clients", "name"=>"builder"} | |
merb : chef-server (api) : worker (port 4000) ~ Failed to authenticate. Ensure that your client key is valid. - (Merb::ControllerExceptions::Unauthorized) | |
/usr/lib/ruby/gems/1.8/gems/chef-server-api-10.12.0/app/controllers/application.rb:56:in `authenticate_every' | |
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:352:in `send' | |
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:352:in `_call_filters' | |
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:344:in `each' | |
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/me |
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
root@host:~# usermod --groups disk -a virtualbox |
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
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "windows2008r2" | |
config.vm.guest = :windows | |
# Max time to wait for the guest to shutdown |
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
class Chef | |
class Resource | |
class S3 | |
class File < Chef::Resource | |
def initialize(name, run_context=nil) | |
super | |
@resource_name = :s3_file | |
@provider = Chef::Provider::S3::File | |
@action = :create |