Skip to content

Instantly share code, notes, and snippets.

View arzzen's full-sized avatar
🤖
I'm borg...

arzzen

🤖
I'm borg...
  • ::1
  • 04:03 (UTC)
View GitHub Profile
#!/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 / cygwin-installer.sh
Created January 22, 2017 13:33
Cygwin Installer - git-quick-stats
#!/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"
@arzzen
arzzen / cygwin-uninstaller.sh
Created January 22, 2017 13:36
Cygwin Uninstaller - git-quick-stats
#!/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 / jenkins.css
Created September 5, 2017 07:49
test
/**
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;
#!/usr/bin/awk -f
BEGIN {
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
print "<payroll_list>"
print "<payroll>"
}
/programom HUMAN/{
print "</payroll>"
print "<payroll>"
}
@arzzen
arzzen / search.sh
Last active January 2, 2018 19:53
Bash script for search in 1.4bilion text credentials.
#!/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)
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
@arzzen
arzzen / GoogleHackMasterList.txt
Created January 13, 2018 15:29 — forked from cmartinbaughman/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
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&#8221; 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
@arzzen
arzzen / mongodb_find_and_kill_slow_query.js
Created August 22, 2018 06:45
Find and (safely) kill long running MongoDB queries
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 / redis_simple_key_stats.sh
Created August 27, 2019 11:43
Redis simple key stats (total size, average size, count keys)
#!/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) {