Skip to content

Instantly share code, notes, and snippets.

🌀
lost in localhost

Lukáš Mešťan arzzen

🌀
lost in localhost
Block or report user

Report or block arzzen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@arzzen
arzzen / accesslog.sh
Last active Oct 4, 2019
accesslog.sh
View accesslog.sh
#!/bin/bash
LOGFILE="access.log"
LIMIT=10
while getopts l:f: option
do
case "${option}"
in
l) LIMIT=${OPTARG};;
@arzzen
arzzen / redis_simple_key_stats.sh
Created Aug 27, 2019
Redis simple key stats (total size, average size, count keys)
View redis_simple_key_stats.sh
#!/usr/bin/env bash
human_size() {
awk -v sum="$1" 'BEGIN {
hum[1024^3]="Gb";
hum[1024^2]="Mb";
hum[1024]="Kb";
for (x=1024^3; x>=1024; x/=1024) {
if (sum>=x) {
@arzzen
arzzen / mongodb_find_and_kill_slow_query.js
Created Aug 22, 2018
Find and (safely) kill long running MongoDB queries
View mongodb_find_and_kill_slow_query.js
var maxSecsRunning = 600;
var dryRun = true;
var currOp = db.currentOp();
for (var oper in currOp.inprog) {
var op = currOp.inprog[oper-0];
if (op.secs_running > maxSecsRunning && op.op == "command" ) {
print("Killing opId: " + op.opid
+ " running for over secs: "
+ op.secs_running
@arzzen
arzzen / GoogleHackMasterList.txt
Created Jan 13, 2018 — forked from cmartinbaughman/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
View GoogleHackMasterList.txt
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www” domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
View install-php7.2-mcrypt.sh
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
@arzzen
arzzen / search.sh
Last active Jan 2, 2018
Bash script for search in 1.4bilion text credentials.
View search.sh
#!/bin/bash
dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ "$1" != "" ]; then
letter1=$(echo ${1,,}|cut -b1)
if [[ $letter1 == [a-zA-Z0-9] ]]; then
if [ -f "$dir/data/$letter1" ]; then
cat "$dir/data/$letter1" | awk -F":" '{print $1"||"$2}' | grep -ai "$2$1$3"
else
letter2=$(echo ${1,,}|cut -b2)
View hour_parser.awk
#!/usr/bin/awk -f
BEGIN {
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
print "<payroll_list>"
print "<payroll>"
}
/programom HUMAN/{
print "</payroll>"
print "<payroll>"
}
View jenkins.css
/**
INFO:
replace "place-your-logo-here" with a logo for your company
replace "place-your-domain-here" with the domain of you jenkins so it finds the jenkins.png
replace the hey #2980b9 with a accent-color you love
**/
#jenkins-home-link {
background: url("place-your-logo-here") 100% 12px no-repeat;
background-size: 80px;
@arzzen
arzzen / cygwin-uninstaller.sh
Created Jan 22, 2017
Cygwin Uninstaller - git-quick-stats
View cygwin-uninstaller.sh
#!/usr/bin/env bash
echo "Cygwin Uninstaller - git-quick-stats"
test -d /usr/local/bin/git-quick-stats && rm -rf /usr/local/bin/git-quick-stats
git config --global --unset alias.quick-stats '! /usr/local/bin/git-quick-stats'
echo -e "...\ndone"
@arzzen
arzzen / cygwin-installer.sh
Created Jan 22, 2017
Cygwin Installer - git-quick-stats
View cygwin-installer.sh
#!/usr/bin/env bash
echo "Cygwin Installer - git-quick-stats"
chmod 0755 git-quick-stats && cp git-quick-stats /usr/local/bin/git-quick-stats
git config --global alias.quick-stats '! /usr/local/bin/git-quick-stats'
echo -e "...\ndone"
You can’t perform that action at this time.