A Pen by Damien Nozay on CodePen.
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
# ftp + recursive copy | |
# License: MIT - http://opensource.org/licenses/MIT | |
import ftplib | |
import os | |
import getpass | |
import ssl | |
class RecursiveCopyMixin(object): | |
def rput(self, sourcedir, remotedir): |
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
cd /tmp | |
sudo yum install -y openssl-devel zlib-devel bzip2-devel wget | |
VERSION=2.7.8 | |
wget https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tgz | |
tar -xvzf Python-${VERSION}.tgz | |
cd Python-${VERSION} |
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
Gist to test if your XMLRPC server is susceptible to the "billion laughs" attack. | |
See https://docs.python.org/2/library/xml.html#xml-vulnerabilities. |
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
# some servers do not send "401 retry" responses when authentication is needed | |
# and return "403 forbidden" instead; e.g. jenkins does that. | |
import urllib2 | |
import logging | |
# configure logging for library | |
class NullHandler(logging.Handler): | |
def emit(self, record): | |
pass |
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
# some of the steps were described here: | |
# https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions | |
# install LTS package | |
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | |
rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key | |
yum install jenkins java-1.6.0-openjdk nginx | |
# check version |
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
[0] http://marc.info/?a=97993518700001&r=1&w=2 | |
[1] http://lists.linux-ha.org/pipermail/linux-ha/2001-January/002608.html | |
[2] http://osdir.com/ml/linux.drbd/2001-08/msg00017.html | |
[3] http://www.cs.technion.ac.il/Labs/csl/projects/Ensemble/ | |
[4] http://hpux.connect.org.uk/hppd/hpux/Distributed/censemble-0.10/ | |
[5] http://censemble.com/ | |
[6] https://github.com/dnozay/CEnsemble | |
Link [0] is just a bunch of posts that were posted by 'Mark Hayden <mark () northforknet ! com>' | |
Link [1] explains what DBD (DISTRIBUTED BLOCK DEVICE) is; not to be confused with DRBD. |
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
goal | |
---- | |
The goal is send syslog traffic to a remote host and use unpriviledged ports; | |
so that I can have my logstash (http://logstash.net/) server not need to | |
run as root. On vSphere 5.1, tcp 1514 is covered by the syslog rule, but | |
in my case udp is preferred. | |
installation | |
------------ |
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 the packages | |
# yum install php-fpm php-ldap | |
then make sure php-fpm can create sessions | |
and change user and group to be nginx | |
see /etc/php-fpm.d/www.conf for more details | |
# sed -i -e 's/apache/nginx/g' /etc/php-fpm.d/www.conf | |
# sed -i -e 's/;catch_workers_output = yes/catch_workers_output = yes/' /etc/php-fpm.d/www.conf |
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
Feb 19 19:56:24 jenkins-slave1 kernel: hrtimer: interrupt took 4942027 ns | |
Feb 19 21:45:03 jenkins-slave1 kernel: INFO: task kswapd0:59 blocked for more than 120 seconds. | |
Feb 19 21:45:03 jenkins-slave1 kernel: Tainted: P --------------- 2.6.32-431.el6.x86_64 #1 | |
Feb 19 21:45:03 jenkins-slave1 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. | |
Feb 19 21:45:03 jenkins-slave1 kernel: kswapd0 D 0000000000000003 0 59 2 0x00000000 | |
Feb 19 21:45:03 jenkins-slave1 kernel: ffff88013976fb38 0000000000000046 0000000000000000 ffff88013976fa90 | |
Feb 19 21:45:03 jenkins-slave1 kernel: ffff88013976fa90 ffff88013aa52308 ffffffff81fcf800 ffffffff811f35a0 | |
Feb 19 21:45:03 jenkins-slave1 kernel: ffff88013df44638 ffff88013976ffd8 000000000000fbc8 ffff88013df44638 | |
Feb 19 21:45:03 jenkins-slave1 kernel: Call Trace: | |
Feb 19 21:45:03 jenkins-slave1 kernel: [<ffffffff811f35a0>] ? proc_delete_inode+0x0/0x80 |