Skip to content

Instantly share code, notes, and snippets.

View miglen's full-sized avatar
👨‍💻

Miglen Evlogiev miglen

👨‍💻
View GitHub Profile

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.

@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
@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 <wls@miglen.com>
@date 2:52 PM 5/18/2013
"""
#Variables
_username='system'
#!/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 #
# #
#!/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
@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 <evlogiev@evlogiev.com>
# Mysql credentials
MYSQLUSER="root"
MYSQLPASS="password"
# Additional variables
@miglen
miglen / multitail.sh
Created December 18, 2013 14:36
Multi tail script
#!/bin/sh
# When this exits, exit all back ground process also.
trap 'kill $(jobs -p)' EXIT
# iterate through the each given file names,
for file in "$@"
do
# show tails of each in background.
tail -f $file &
#!/bin/bash
#
# @description Script used to switch between prefork and worker mpm
# @author Miglen Evlogiev <miglen@hp.com>
# @version 0.1
# @date 3/9/14 18:03 PM CET
# @usage apachempm.sh <mpm_method> or status
# <mpm_method> = worker or prefork
# you may add it to your .bash_profile as alias apachempm="/path/to/apachempm.sh"
#
@miglen
miglen / proxy.bat
Created October 3, 2014 09:47
This is simple script which is using the Windows registry files to modify (disable/enable) the HP (or any other given) proxy. I find it annoying whenever I need to disable my proxy to go to my Internet settings and click like 10 times.
@echo off
rem HP Proxy switch on/off
rem Author: Miglen Evlogiev <code@miglen.com>
rem Date: 3/10/2014
rem Version: 0.1
setlocal ENABLEEXTENSIONS
set KEY_NAME=HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings
set VALUE_NAME=AutoConfigURL

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides