I hereby claim:
- I am blackpioter on github.
- I am blackpioter (https://keybase.io/blackpioter) on keybase.
- I have a public key whose fingerprint is 550A 5D5B 0FF9 F873 8AE6 2257 312A D4E7 15E5 7DDC
To claim this, I am signing this object:
cat ZONEFILE| grep -v "@\|TTL\|Serial\|after\|;" | awk -F" " '{ if ($3 == "A") print $0 }' | awk '{print $4" IN PTR "$1".DOMAIN."}' |
## git reset hard to upstream | |
git reset --hard @{u} | |
## git remove directory from history | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do\n git branch --track ${branch##*/} $branch\ndone | |
git filter-branch -f --index-filter 'git rm --cached -r --ignore-unmatch DIRECTORY' \ | |
--prune-empty --tag-name-filter cat -- --all | |
git filter-branch --index-filter \ |
## nginx nx: error logs for time span after 15:00 | |
cat all | grep NAXSI_FMT | awk -F'[: ]' '$2 >= 15 { print }' > naxsi_after_15 | |
## nginx: log_format | |
log_format: | | |
timed_combined '$remote_addr $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" $request_time $upstream_response_time' |
## mysql: show mysql host,user,passwd | |
SELECT Host,user,password FROM mysql.user WHERE User = "root" ORDER BY (Host="localhost") ASC ; | |
## mysql: set empty root password | |
update user set password=PASSWORD("") where User='root'; | |
flush privileges; |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash -xe | |
################################################################################## | |
function usage(){ | |
echo "usage: $(basename $0) /path/to/jenkins_home jenkins.tar.gz" | |
} | |
function error_exit | |
{ |
#!/usr/bin/env python | |
import boto3 | |
def list_instances_env_role(env, role): | |
""" | |
List of instances with tag:Environment and tag:Role | |
""" |
awk -F: 'END {print "uid:"u" gid:"g" groups:"gg}{if($1=="Uid"){split($2,a," ");u=a[1]}if($1=="Gid"){split($2,a," ");g=a[1]}if($1=="Groups"){gg=$2}}' /proc/self/status |