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 opensuse:leap | |
RUN zypper --non-interactive ref \ | |
&& zypper --non-interactive install --type pattern devel_basis devel_C_C++ devel_kernel \ | |
&& zypper --non-interactive install libxtables-devel libnetfilter_conntrack-devel xtables-addons libjson-c-devel \ | |
&& zypper --non-interactive install kernel-default kernel-default-devel kmod \ | |
&& zypper --non-interactive install libpcap-devel git \ | |
&& zypper --non-interactive clean | |
RUN mkdir /build |
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 centos:6 | |
ADD RPM-GPG-KEY-elrepo.org /etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org | |
ADD elrepo.repo /etc/yum.repos.d/elrepo.repo | |
RUN rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm \ | |
&& yum remove -y kernel-headers kernel kernel-devel \ | |
&& yum update -y \ | |
&& yum --enablerepo=elrepo-kernel install -y kernel-lt kernel-lt-devel kernel-lt-doc.noarch kernel-lt-headers \ | |
&& yum groupinstall -y "Development Tools" \ |
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 debian:wheezy | |
RUN echo "deb http://ftp.debian.org/debian/ wheezy-backports main non-free contrib" >> /etc/apt/sources.list \ | |
&& apt-get update \ | |
&& apt-get upgrade -y \ | |
&& apt-get -t wheezy-backports install -y linux-image-amd64 linux-headers-amd64 \ | |
&& apt-get install -y build-essential iptables-dev iptables conntrack libnetfilter-conntrack-dev \ | |
&& apt-get install -y autoconf libtool git libpcap-dev \ | |
&& apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y |
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 bash | |
lockfile -r 0 /tmp/store-fetcher.lock || exit 1 | |
/usr/bin/store-fetcher -dir=/var/storedata | |
echo "" | |
echo "" | |
echo "removing lock file: /tmp/store-fetcher.lock" | |
rm -f /tmp/store-fetcher.lock |
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 bash | |
HEADERSDIR=/opt/dir/ | |
function add() { | |
grep -H "X-SHMSCDN: HIT" $1 || perl -pi -e '$/="";s/\r\n\r\n/\r\nX-SHMSCDN: HIT\r\n\r\n/;' $1 | |
} | |
if [ "$1" = "-add" ]; then | |
shift 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
#!/usr/bin/env bash | |
#ls /mnt/wu/storedata/header/v1/ | xargs -l1 grep -i "public" | |
#ls /mnt/wu/storedata/header/v1/ | xargs -l1 grep -i "private" | |
# Change the directory to reflect your use case | |
DIR=/mnt/wu/storedata/header/v1/ | |
FILES=($(/bin/ls "$DIR")) |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"net" | |
"time" | |
) | |
func main() { |
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
package main | |
/* | |
license note | |
Copyright (c) 2016, Eliezer Croitoru | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
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 bash | |
set -x | |
iptables -t nat -L PREROUTING |grep bypasspool | |
if [ "$?" -ne "0" ];then | |
iptables -t nat -I PREROUTING -m set --match-set bypasspool dst,src -j ACCEPT | |
fi | |
ipset create bypasspool hash:ip |
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 debian:squeeze | |
#MAINTAINER Chris Bennett <[email protected]> | |
MAINTAINER Eliezer Croitoru <[email protected]> | |
ENV DEBIAN_FRONTEND noninteractive | |
ADD sources.list /etc/apt/sources.list | |
ENV PATH="/data/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | |