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 python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
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 python | |
""" | |
Forked from https://gist.github.com/bradmontgomery/2219997 | |
Usage:: | |
./dummy-web-server.py [<port>] | |
Send a GET request:: | |
curl http://localhost | |
Send a HEAD request:: | |
curl -I http://localhost |
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
mkdir a1 a2 | |
ln -s a1 a | |
echo "rm -f a; ln -s a2 a; echo a1 still alive" > a1/test.sh | |
echo "rm -f a; ln -s a1 a; echo a2 still alive" > a2/test.sh | |
while true; do sh a/test.sh; ls -l; sleep 1; done |
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
/tmp/incrontest IN_MOVED_TO sh /root/incrontest.sh $@/$# |
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
# Verified on AWS RHEL 7.6 ARM: https://aws.amazon.com/marketplace/server/procurement?productId=c95b737d-270a-4f6a-9429-b7dc4b5d14c2 | |
Login as root | |
AS root user, edit the repo file (different suffix for intel machines): | |
$ vi /etc/yum.repos.d/redhat-rhui-arm.repo | |
Find the below section: | |
[rhui-rhel-7-server-for-arm-64-rhscl-rhui-rpms] |
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
# Install Zenoss | |
# Zenoss requirements | |
yum -y remove mysql-libs.x86_64 | |
# Download Zenoss | |
wget https://codeload.github.com/zenoss/core-autodeploy/tar.gz/4.2.5 | |
tar -xvf 4.2.5 | |
cd core-autodeploy-4.2.5 |
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 io.netty.channel.*; | |
import java.util.Queue; | |
import java.util.concurrent.ConcurrentLinkedQueue; | |
public class WriteQueueOutboundChannelHandler extends ChannelOutboundHandlerAdapter { | |
private static final int QUEUE_SIZE_WARNING = 5000; | |
private ChannelHandlerContext ctx; | |
private final Queue<Object> messageQueue = new ConcurrentLinkedQueue<>(); | |
private int qSize = 0; //should make access synchronized |
NewerOlder