Skip to content

Instantly share code, notes, and snippets.

@samisalkosuo
samisalkosuo / Deploy_Oracle.sh
Last active June 17, 2022 09:37
Oracle 12c silent installation files, including response files. Start installation executing Deploy_Oracle.sh. See also here: http://sami.salkosuo.net/silent-service/.
#!/bin/sh
#Set up Linux and oracle
echo "Deploying Oracle..."
if [[ "$1" != "" ]] ; then
DEFAULT_PWD=$1
echo "Using user specified default password"
else
DEFAULT_PWD=passW0RD
@samisalkosuo
samisalkosuo / gist:c0811e968d905420b194
Last active August 29, 2015 14:10
Open port in iptables firewall
#Open firewall for port
FW_PORT=9877
iptables -I INPUT 1 -p tcp -m tcp --dport $FW_PORT -j ACCEPT
iptables -I INPUT 1 -p tcp -m tcp --sport $FW_PORT -j ACCEPT
iptables -I OUTPUT 1 -p tcp -m tcp --sport $FW_PORT -j ACCEPT
iptables -I OUTPUT 1 -p tcp -m tcp --dport $FW_PORT -j ACCEPT
#save firewall rules
/sbin/service iptables save
/sbin/service iptables restart
import hashlib
h = hashlib.new('sha256')
h.update(str)
print h.hexdigest()