Skip to content

Instantly share code, notes, and snippets.

View kasunbg's full-sized avatar
🐶

Kasun Gajasinghe kasunbg

🐶
View GitHub Profile
@kasunbg
kasunbg / config
Last active September 17, 2017 01:18
Terminator for Linux: Better keybindings and theme support. cat ~/.config/terminator/config
[global_config]
focus = system
title_transmit_bg_color = "#5cb05e"
window_state = maximise
[keybindings]
close_term = <Primary><Shift>w
close_window = <Primary>q
copy = <Primary>c
paste = <Primary>v
search = <Primary>f
INFO [org.apache.axis2.transport.http.HTTPSender] - Unable to sendViaPost to url[https://localhost:9853/services/AuthenticationAdmin]
org.apache.axis2.AxisFault: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:78)
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.comm
@kasunbg
kasunbg / gist:7b9b0d896bab5359f89f639fb6c9fbaa
Created August 24, 2016 04:56 — forked from bahayman/gist:9369651
tcpdump http monitor
Use TCPDUMP to Monitor HTTP Traffic
1. To monitor HTTP traffic including request and response headers and message body:
tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i all
2. To monitor HTTP traffic including request and response headers and message body from a particular source:
tcpdump -A -s 0 'src example.com and tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
3. To monitor HTTP traffic including request and response headers and message body from local host to local host:
@kasunbg
kasunbg / release-script.sh
Created June 1, 2016 11:38
automated-maven-release-process
#!/bin/sh
REPO_NAME=$1
#possible values: 1.7 1.8
JDK_TO_USE=$2
HOME=/build/release-builds/kasung/
JDK_18=/build/software/java/jdk1.8.0_20
JDK_17=/build/software/java/jdk1.7.0_51
@kasunbg
kasunbg / rsync-for-carbon-depsync.sh
Last active March 9, 2019 15:36
wso2 carbon DepSync via rsync
#!/bin/sh
#A snippet to synchronize the CARBON_HOME/repository/deployment/server folders between manager and all worker nodes.
#Add a file called workers-list.txt that has a syntax like follows separated by new lines.
#[email protected]:~/setup/192.168.1.1/as/as_worker/repository/deployment/server
manager_server_dir=~/wso2as-5.2.1/repository/deployment/server
pem_file=~/.ssh/carbon-440-test.pem
#delete the lock on exit
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected])
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select