Skip to content

Instantly share code, notes, and snippets.

View mmaha's full-sized avatar

M Maha mmaha

  • Canada
View GitHub Profile
@mmaha
mmaha / dbstatus.sh
Last active September 30, 2015 03:27
Oracle Database Status script
#!/bin/sh
# Reference: http://docs.oracle.com/cd/B28359_01/server.111/b32009/strt_stp.htm
#
if [[ $EUID -ne 0 ]]; then
echo "This script needs to be run as root (or oracle)"
exit 1
fi
export ORACLE_HOME=`cat /etc/oratab | grep -v "^#" | grep -v "^$" | cut -d':' -f 2`
export ORACLE_SID=`cat /etc/oratab | grep -v "^#" | grep -v "^$" | cut -d':' -f 1`
@mmaha
mmaha / gist:4544164
Created January 16, 2013 02:35
Stop iptables on RHEL 6
# sudo service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
@mmaha
mmaha / Decode-Base64.md
Last active December 12, 2020 13:15
Decode SAML Assertion in Base64

Perl

perl -MMIME::Base64 -ne 'print decode_base64($_)' ./saml_input.txt | xmllint --format - | source-highlight  -s xml -f esc

Ruby

cat ./saml_input.txt | ruby -r Base64 -ne 'puts Base64.decode64($_)' | xmllint --format - | source-highlight  -s xml -f esc

Keybase proof

I hereby claim:

  • I am mmaha on github.
  • I am mmaha (https://keybase.io/mmaha) on keybase.
  • I have a public key whose fingerprint is CBD1 DEB9 D772 F906 FF2D 457F 9A95 E70D 7334 2690

To claim this, I am signing this object: