Skip to content

Instantly share code, notes, and snippets.

@thyn
thyn / java.sh
Last active November 22, 2018 10:14
java
#!/bin/sh
JAVA_VER=jdk-9.0.4
JAVA_FILE=jdk-9.0.4_linux-x64_bin.tar.gz
cd /opt/
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz"
tar xzf $JAVA_FILE
rm -rf $JAVA_FILE
cd "/opt/${JAVA_VER}/"
alternatives --install /usr/bin/java java "/opt/${JAVA_VER}/bin/java" 1
alternatives --install /usr/bin/javac javac "/opt/${JAVA_VER}/bin/javac" 1
@thyn
thyn / select_xml.sql
Last active February 1, 2017 10:59
Leadsraiser
select email,tref7,tref8, UserCreationDate,
xmlFields,cast ( xmlFields.query( '(/d/i[@k="Reasons"][1]/text())') as varchar(200)),
* from actions where actionname ='set-unsubscribe-reasons'
@thyn
thyn / tcpdump
Created December 21, 2016 17:23
#write all to port 80
tcpdump dst port 80 -w - | tee tcp3 | tcpdump -r -
@thyn
thyn / Haprox2.0 standalone
Last active July 25, 2022 22:15 — forked from ryzy/a.sh
Compile OpenSSL 1.0.2 and HAProxy from the source on CentOS 7
# Compile and install HAProxy
rm -rf /tmp/haproxy-current
git clone http://git.haproxy.org/git/haproxy-2.0.git /tmp/haproxy-current
cd /tmp/haproxy-current
make \
TARGET=linux-glibc USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_REGPARM=1 USE_PCRE=1 USE_PCRE_JIT=1 \
USE_OPENSSL=1 SSL_INC=/usr/include SSL_LIB=/usr/lib ADDLIB=-lpthread USE_SYSTEMD=1
make install
# cp /tmp/haproxy-current/examples/haproxy.init /etc/init.d/haproxy