Skip to content

Instantly share code, notes, and snippets.

View miglen's full-sized avatar
👨‍💻

Miglen Evlogiev miglen

👨‍💻
View GitHub Profile
@miglen
miglen / db-dump-www-backup.sh
Last active December 20, 2015 23:09
Mysql db dump and www backup script
#!/bin/bash
# Backup mysql dbs and web directory
# Date: 12-08-2013
# Author: Miglen Evlogiev <[email protected]>
# Mysql credentials
MYSQLUSER="root"
MYSQLPASS="password"
# Additional variables
#!/bin/bash
#
# Bash Script for Thread dump
# On WAS Application Server
#
if [ "$#" -ne 2 ]
then
echo "Usage: `dirname $0`/$0 <WAS Directory> <ServerName>"
exit 1
#!/bin/bash
#####################################################################
# This scipt is for decryption of lost username & password #
# located in boot.properties files of Managed & Admin Servers #
# in WebLogic Server. #
# #
# It scans for boot.properties files and decrypt their content #
# using integrated WLST scripting and SerializedSystemIni.dat #
# #
@miglen
miglen / WLST_new_manage_server.py
Created May 18, 2013 12:31
Script for creation of new manage server.
"""
Script for connecting and creating new Manage Server in WLS
@author: Miglen Evlogiev <[email protected]>
@date 2:52 PM 5/18/2013
"""
#Variables
_username='system'
@miglen
miglen / Apache Tomcat 8 Start stop script init.d script
Last active November 10, 2022 20:03 — forked from valotas/tomcat.sh
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under

Disclaimer: I have no idea if this are indeed the correct answers. I just solved the exercises like this. I think that they are right though.

I have added my own code to this gist. It is ugly as hell, just like you can expect from code created in a contest like this.

Beautiful Strings

Difficulty: easy

It is simple to see that a greedy solution is good enough.