This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl --kubeconfig kube_config_cluster.yml get configmap -n kube-system full-cluster-state -o json | jq -r .data.\"full-cluster-state\" | jq -r . > cluster.rkestate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias archtree='ps ww -o sid,pgid,pid,args --forest -s `cat /var/run/supervisord.pid`' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Functions to convert IPv4 address to integer and vice-versa. | |
Written by Christian Stigen Larsen, http://csl.sublevel3.org | |
Placed in the public domain by the author, 2012-01-11 | |
Example usage: | |
$ ./ipv4 192.168.0.1 3232235521 | |
192.168.0.1 ==> 3232235521 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gdb --batch --eval-command 'call exit(0)' --pid <process id> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# concise logical disk enumeration | |
MegaCli -LDInfo -Lall -aAll | egrep 'Size|State|Number|Adapter|Virtual' | |
# concise physical disks enumeration | |
MegaCli -PDList -aALL | egrep 'Enclosure|Raw Size|Slot Number|Device Id|Firmware state|Inquiry|Adapter' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir /path/to/chroot | |
rpm --root /path/to/chroot --initdb | |
wget http://repo_url/centos-release-version.rpm | |
rpm -i --nodeps --root /path/to/chroot /path/to/centos-release-version.rpm | |
yum --installroot=/path/to/chroot --nogpgcheck install -y yum rpm-build | |
# -or- | |
yum --installroot=/path/to/chroot --nogpgcheck groupinstall -y Base | |
# to use yum inside the chroot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# extract old initrd | |
mkdir newinitrd | |
cd newinitrd | |
zcat ../oldinitrd.img | cpio -ivd | |
# make changes | |
# create new initrd | |
find . | cpio -o -H newc | gzip > /tmp/newinitrd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dnscmd.exe <DNS Server> /RecordAdd domain.com hostname /CreatePTR A ipaddress |