Skip to content

Instantly share code, notes, and snippets.

@waleedsamy
waleedsamy / nxfetch.sh
Last active April 4, 2017 08:42
This script will fetch an artifact from a Nexus server(or any other repository) using maven.
#!/bin/bash
# Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging
#shopt -o -s xtrace
usage()
{
cat <<EOF
usage: $0 options
This script will fetch an artifact from a Nexus server using maven, please make sure maven 3 is installed.
@waleedsamy
waleedsamy / fixup.txt
Created June 29, 2016 08:17 — forked from lucasdavila/fixup.txt
Fixing mac os yosemite issue "bash: fork: Resource temporarily unavailable"
# see the current limits
$ sysctl -a | grep maxproc
# increase it
$ sudo sysctl -w kern.maxproc=xxxx
$ sudo sysctl -w kern.maxprocperuid=xxx
# run at startup
$ sudo vim /etc/sysctl.conf
@waleedsamy
waleedsamy / ab.rb
Last active June 12, 2016 15:59 — forked from kylewlacy/ab.rb
Apache Bench Homebrew Formula
# Based on https://github.com/simonair/homebrew-dupes
# That repo seems to be dead, and I don't really feel like making a pull request.
require 'formula'
class Ab < Formula
homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html'
url 'http://mirror.23media.de/apache//httpd/httpd-2.4.20.tar.bz2'
sha1 'cefe8ea4a3f81c7a08e36c80ebbd792c67ab361b'
depends_on 'libtool' => :build
@waleedsamy
waleedsamy / igit.sh
Last active June 24, 2016 10:16 — forked from matthewriley/gist:4694850
Install Git from source
# Install Git from source
# usage: curl https://gist.githubusercontent.com/waleedsamy/baebc5af66390425f0e4/raw/022bc3c16d18ed918822734a310ed5443f5f5286/igit.sh > ~/igit.sh && chmod +x ~/igit.sh && ~/igit.sh
gitversion=${1-2.9.0}
if [ "$(uname)" == "Darwin" ]; then
echo "Do something under Mac OS X platform like installing xcode"
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
sudo yum -y groupinstall "Development tools"
sudo yum -y install wget curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel
@waleedsamy
waleedsamy / README.md
Last active August 5, 2021 19:19 — forked from vitkin/README.md
compile wstunnel for apache 2.2.15 on centos CentOS release 6.6 (Final)

Backport WebSocket to Apache 2.2

This is my variation from the original patch and that also includes the suggested correction for the bug with secure websocket 'wss://'.

The difference is that I avoid modifying the mod_utils.c and the mod_proxy.h so that if the mod_proxy module has been embedded in the main httpd binary then it will work and you won't get the