Skip to content

Instantly share code, notes, and snippets.

View shoaibjdev's full-sized avatar

Shoaib R Khan shoaibjdev

View GitHub Profile
@kfox
kfox / tcpproxy.js
Created April 5, 2012 20:03
A basic TCP proxy written in node.js
var net = require("net");
process.on("uncaughtException", function(error) {
console.error(error);
});
if (process.argv.length != 5) {
console.log("usage: %s <localport> <remotehost> <remoteport>", process.argv[1]);
process.exit();
}
@taomaree
taomaree / chknfs.sh
Last active December 16, 2019 12:49
nfs ha keepalived configure file
#!/bin/bash
###filename: chknfs.sh
###usage: crontab */1 * * * * root /root/chknfs.sh > /dev/null 2>&1
keep="/data/.keep"
if [ ! -f $keep ]; then
umount -f /data && mount /data
fi
@rbowen
rbowen / rdo_rhelosp.md
Created January 20, 2015 17:07
RDO vs RHEL OSP

Community vs Commercial

When I talk about Red Hat's involvement in RDO (http://openstack.redhat.com/) the question I often get is, "doesn't that undermine sales of RHEL OSP (Red Hat's paid OpenStack offering)?"

Well, it's complicated.

What's RDO?

@schtobia
schtobia / nginx_client_cn_auth.conf
Last active August 22, 2023 11:18
CN-based client authentification with nginx. This emulates Apache's SSLRequire (%{SSL_CLIENT_S_DN_CN} in {"Really Me"})
map $ssl_client_s_dn $ssl_client_s_dn_cn {
default "";
~/CN=(?<CN>[^/]+) $CN;
}
server {
listen 80;
listen [::]:80;
listen 443 ssl;
@sahilsk
sahilsk / install_logstalgia_on_mac.sh
Last active May 10, 2022 11:47
Logstalgia on mac: Install & Usage
#Download and extract logstalgia
brew install wget
wget https://github.com/acaudwell/Logstalgia/releases/download/logstalgia-1.0.7/logstalgia-1.0.7.tar.gz
tar -zxvf logstalgia*.gz
cd logstalgia*
# Install logstlagia dependencies
#brew install ttfautohint --with-qt
brew install pkg-config glew sdl2 SDL2_image sdl SDL_image boost GLM freetype pcre
global
log 127.0.0.1 local0
user root
group root
daemon
defaults
log global
mode http
option httplog
create VMs
git clone https://github.com/kubernetes-incubator/kargo.git
cd kargo
cp ~/inventory.cfg inventory/.
vi inventory.cfg
(copy IPs and save)
date
ansible-playbook -u centos -b -i inventory/inventory.cfg cluster.yml
date (show elapsed time)
@sfoolish
sfoolish / kolla-multinode-local-registry-setup.md
Created December 21, 2016 01:50
Kolla Multinode Local Registry Setup

Kolla Multinode Local Registry Setup

Deploy node setup

install and configure docker

curl -sSL https://get.docker.io | bash
mkdir -p /etc/systemd/system/docker.service.d
tee /etc/systemd/system/docker.service.d/kolla.conf <<-'EOF'

[Service]

@dutchiechris
dutchiechris / ifcfg-vlan-bridge-example
Last active November 11, 2020 11:12
CentOS 7 ifcfg syntax for VLAN tagged interface + bridge for KVM (referenced from http://www.beginswithdata.com/2016/12/30/centos7-kvm-coreos/)
[root@server02 network-scripts]# cat ifcfg-enp14s0
DEVICE=enp14s0
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
[root@server02 network-scripts]# cat ifcfg-enp14s0.35
DEVICE=enp14s0.35
TYPE=Ethernet
@meanevo
meanevo / compile-haproxy.sh
Last active October 25, 2022 07:42 — forked from ryzy/a.sh
Compile HAProxy from source on CentOS 7
# Make sure you have these installed
yum install -y make gcc perl pcre-devel zlib-devel
# Download/Extract source
wget -O /tmp/haproxy.tgz http://www.haproxy.org/download/1.7/src/haproxy-1.7.2.tar.gz
tar -zxvf /tmp/haproxy.tgz -C /tmp
cd /tmp/haproxy-*
# Compile HAProxy
# https://github.com/haproxy/haproxy/blob/master/README
make \
TARGET=linux2628 USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_REGPARM=1 USE_PCRE=1 USE_PCRE_JIT=1 \