Skip to content

Instantly share code, notes, and snippets.

🙈
lost in localhost

Lukáš Mešťan arzzen

View GitHub Profile
@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"
View git-delete-old-tags
#!/bin/bash
count=`git tag -l | wc -l`
keep=20
num=0
for t in `git tag -l --sort=taggerdate`
do
if [ "$num" -ge `expr $count - $keep` ]
then
@arzzen
arzzen / download.sh
Last active Jan 29, 2018
Download torrent
View download.sh
#!/bin/bash
# Install transmission dependences
# sudo apt-get install transmission-cli transmission-daemon transmission-common
# chmod +x download.sh
DOWNLOAD_DIR=${HOME}"/download"
TRANS_CLI="transmission-cli"
TRANS_SHOW="transmission-show"
TRANS_NOTIFY=${HOME}"/notify.sh"
You can’t perform that action at this time.