Skip to content

Instantly share code, notes, and snippets.

View kasunbg's full-sized avatar
🐶

Kasun Gajasinghe kasunbg

🐶
View GitHub Profile
@kasunbg
kasunbg / SSL-certs-OSX.md
Created June 15, 2019 11:12 — forked from croxton/SSL-certs-OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

import requests
import sys
import os
PLUGIN = 'credentials'
BACKDIR_COUNT = 10
if len(sys.argv) != 3:
print 'usage:\n\tpython CVE-2018-1999002.py [jenkins base url] [absolute file path]'
print ''
Jenkins.instance.getItemByFullName("manuri/test-build")
.getBuildByNumber(123)
.finish(
hudson.model.Result.ABORTED,
new java.io.IOException("Aborting build")
);
#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "usage: sh thread-analyze.sh <pid> <number-of-dumps> <interval>"
exit
fi
count=$2
for i in `seq 1 $count`;
do
jstack -l $1 > thread_dump_`date "+%F-%T"`.txt &
@kasunbg
kasunbg / README.md
Created January 18, 2018 07:58 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@kasunbg
kasunbg / stooge_loader.rb
Created November 23, 2017 18:22 — forked from bowsersenior/stooge_loader.rb
A demo of YAML anchors, references and nested values
require 'rubygems'
require 'yaml'
# A demonstration of YAML anchors, references and handling of nested values
# For more info, see:
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
stooges = YAML::load( File.read('stooges.yml') )
# => {
# "default" => {
@kasunbg
kasunbg / buildAllExtensions.sh
Created October 10, 2017 12:54 — forked from pulasthi7/buildAllExtensions.sh
Clones all the IS extensions repos
echo "building framework"
cd identity-framework
mvn clean install -Dmaven.test.skip=true
if [ $? -ne 0 ]
then
cd ..
echo Build failed at identity-framework
notify-send "Build failed at identity-framework"
exit 1
else
@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:
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select