Skip to content

Instantly share code, notes, and snippets.

View thikade's full-sized avatar

Thomas Hikade thikade

  • Alpium IT Solutions
  • Vienna
View GitHub Profile

Keybase proof

I hereby claim:

  • I am thikade on github.
  • I am thikade (https://keybase.io/thikade) on keybase.
  • I have a public key ASB6-F_8FoNtOtrfmJzbDZMdj1iIi7-imeiBYuZwvcQ-vAo

To claim this, I am signing this object:

@thikade
thikade / gist:4f8ac124b03e84f6962327e29bb96701
Created October 19, 2016 07:38
set Terminal window title from cmd line
perl -e 'print("\e]0;@ARGV\7");' $HOSTNAME
@thikade
thikade / httrack
Created October 20, 2016 12:37
httrack cmd line hintsheet
# Mirror
httrack.exe http://127.0.0.1:8080/index.html -O c:\websites --single-log --robots=0 --sockets=1 --timeout=3 --connection-per-second=1000 --mirror
# Update Mirror
httrack.exe http://127.0.0.1:8080/index.html -O c:\websites --single-log --robots=0 --sockets=1 --timeout=3 --connection-per-second=1000 --update
- set level of concurrency by: --sockets=N
- rate limit by: --connection-per-second=N
@thikade
thikade / OQL.md
Last active December 6, 2016 15:06
Eclipse MAT OQL Scratchpad

Get all Subjects and the count of principals contained:

SELECT s.principals, toString(s.principals.c.elements.first.item.username) AS WAS_UserName, toString(s.principals.c.elements.first.item.name) AS Username, s.principals.c.elements.size AS PrincipalCount FROM javax.security.auth.Subject s

@thikade
thikade / createurls.py
Created December 7, 2016 13:45 — forked from bkonkle/createurls.py
A script to create urls for Jmeter testing from your Apache access logs.
#!/usr/bin/env python
"""
Requires apachelog. `pip install apachelog`
"""
from __future__ import with_statement
import apachelog
import csv
import re
import sys
from optparse import OptionParser
@thikade
thikade / OPENSSL hints
Last active January 18, 2017 20:28
openssl tips & tricks
### Extract Private Key from PKCS12 file into PEM format
openssl pkcs12 -in key.p12 -passin pass:XXX -passout pass: -nocerts -out key.pem -nodes ; cat key.pem
ssldump -k ./key.pem port 9043
openssl ciphers -V | grep -i 0x9c
@thikade
thikade / Readme.md
Last active February 13, 2017 13:18
Find a class somewhere inside dozens of JAR files
@thikade
thikade / readme.md
Created February 13, 2017 13:35
Extract Private key from PKCS12 to use with wireshark / ssldump

Extract private key

openssl pkcs12 -in key.p12 -passin pass:*** -passout pass: -nocerts -out key.pem -nodes

cat key.pem

ssldump -k ./key.pem port 9043

@thikade
thikade / readme.md
Last active February 13, 2017 13:37
OpenSSL Hintsheet

List ciphers

openssl ciphers -V

Extract Private Key

openssl pkcs12 -in key.p12 -passin pass:*** -passout pass: -nocerts -out key.pem -nodes

@thikade
thikade / readme.md
Created February 14, 2017 10:27
reduce ext4 lvm filesystem
# Unmount the filesystem and check its' LV
umount /mnt/foo
e2fsck -f /dev/mapper/vg0-foo
 
# Shrink ext4 and then the LV to the desired size
resize2fs -p /dev/mapper/vg0-foo 40G
lvreduce -L 40G /dev/mapper/vg0-foo
 
# Before continuing, run e2fsck. If it bails because the partition