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 python | |
import pika | |
import time | |
connection = pika.BlockingConnection(pika.ConnectionParameters( | |
host='localhost')) | |
channel = connection.channel() | |
channel.queue_declare(queue='Hello_World', durable=True) | |
print ' [*] Waiting for messages. To exit press CTRL+C' |
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
Rahuls-MacBook-Pro:binary-buildpack rakrup$ BUNDLE_GEMFILE=cf.Gemfile bundle exec buildpack-build | |
******* Using the stack 'cflinuxfs2' against the host 'local.pcfdev.io' | |
******* Fetching CF CLI details | |
/usr/local/bin/cf | |
cf version 6.29.1+d5129d651.2017-08-17 | |
******* Building cached buildpack | |
Cached buildpack created and saved as /Users/rakrup/Code/cloudfoundry/binary-buildpack/binary_buildpack-cached-v1.0.14-1505830048.zip with a size of 64K |
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
rakrup@Rahuls-MacBook-Pro:[~/Code/cloudfoundry/staticfile-buildpack]:$./scripts/integration.sh | |
+++ stat -f ./scripts | |
++ dirname ./scripts | |
+ export ROOT=. | |
+ ROOT=. | |
+ '[' '!' -f ./.bin/ginkgo ']' | |
+ '[' '!' -f ./.bin/buildpack-packager ']' | |
+ GINKGO_NODES=3 | |
+ GINKGO_ATTEMPTS=2 | |
+ cd ./src/staticfile/integration |
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 python | |
# Usage | |
# compare_files.py. <file_to_compare_1> <file_to_compare_2> | |
# ALGO | |
# 1. Check if both the files have same md5 checksum | |
# 2. If the checksum is same - means files are exactly same ; no need to check line by line | |
# 3. If the checksum doesnt match; we load the contents fo file to string | |
# 4. replace all the blank spaces and new line char with nothing. Baiscally get all text in a string. |
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 python | |
import sys | |
import json | |
import yaml | |
if sys.argv[2]=="yaml"; | |
print yaml.dump(yaml.load(json.dumps(json.loads(open(sys.argv[1]).read()))), default_flow_style=False) | |
if sys.argv[2]=="json"; | |
print json.dump(json.load(yaml.dumps(yaml.loads(open(sys.argv[1]).read()))), default_flow_style=False) |