Skip to content

Instantly share code, notes, and snippets.


  • Austin, Texas, US
Block or report user

Report or block jamshid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jamshid / docker-compose.yml
Last active Nov 12, 2019
Sample docker-compose.yml voting app to test the weave network plugin with Docker Swarm
View docker-compose.yml
# Copied from, to test the
# "weave" Docker Swarm network plugin
# on a two node network (docker-server-manager and docker-server-worker).
# While both provide a cross-server container network, weave supports multicast and encryption.
# The sample app deploys fine with the standard "overlay" network:
# docker stack deploy -c ./docker-compose.yml voteapp
# The below curls work as expected -- in the container network the service names resolve
* Can download libpam4j and JNA jars from:
* SETUP: useradd zuser1 ; echo zuser1:password | chpasswd ; useradd zuser2 ; echo zuser2:password | chpasswd
* BUILD 1.8: javac -classpath ./jna-4.0.0.jar:./libpam4j-1.8.jar:.
* BUILD 1.9X: javac -classpath ./jna-4.1.0.jar:./libpam4j-1.9X.jar:.
* FAILS: sudo java -classpath ./jna-4.0.0.jar:./libpam4j-1.8.jar:. PAMTest zuser1:password zuser2:password
* If you get a strange JVM crash on CentOS 6 in code related to JNA and PAM,
* try uninstalling this RedHat package related to fingerprint scanners:
* sudo yum remove fprintd-pam
* Run this program with 100-500 threads -- the jvm usually crashes with
* a stack like below (from hs_error.log ). Probably related to issues like:
* Probably also affected by machine resource limits.
jamshid / install-python2.7-centos6
Last active Feb 7, 2016
Is this really the best way to install python2.7 on CentOS?
View install-python2.7-centos6
yum install -y bzip2-devel zlib zlib-devel openssl openssl-devel
cd /opt
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local
make && make altinstall
cd /tmp
jamshid /
Last active Nov 16, 2019
Docker environment hack, to put the names of running containers in /etc/hosts
# An alternative to "links", run this script after starting or stopping any
# container. It's a hack to update the host machine (vagrant) /etc/hosts with
# the current active docker containers and tell dnsmasq to refresh.
# Then start each machine with "-dns ${DOCKER_HOST_IP}", e.g.
# $ docker run -d -name mycontainer1 -dns MYPRODUCT
# You can't seem to set the DNS during "docker build".
# Diagnostic command to run in host or while logged into containers:
You can’t perform that action at this time.