Skip to content

Instantly share code, notes, and snippets.

@samisalkosuo
samisalkosuo / generate_username.py
Last active January 5, 2017 09:57
Simple function to generate random usernames.
import sys
def generate_username(formatStr,capitalize=True):
"""Generate random user name. formatStr is like CVC-CVC which generates username with consonant-vowel-consonant-consonant-vowel-consonant.abs
C=consonant
V=vowel
N=number
+=space
"""
@samisalkosuo
samisalkosuo / maze.py
Last active November 17, 2017 03:52
Some mazes classes translated from Ruby from book: Mazes for Programmers (https://pragprog.com/book/jbmaze/mazes-for-programmers). Used in MazinGame: https://github.com/samisalkosuo/mazingame
#!/usr/bin/env python
#Some mazes classes translated from Ruby
#from book "Mazes for Programmers" by Jamis Buck.
#https://pragprog.com/book/jbmaze/mazes-for-programmers
#
#Includes modifications.
#
#Execute this and you see mazes.
@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