Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/env bash
- # ^ important people do it this way ^ #
- #-------------------------------------------------------------------------------------------#
- # assorted bash grifts. probably related to pki, insecurity, maybe other things l8er. idk. #
- # definitely should probably work on most distros - besides gameboy color and broken ones. #
- #-------------------------------------------------------------------------------------------#
- # wildcard, cert chain, & cats - hint: use this to h~a-ck my website if u want.
- /acme.sh/acme.sh --issue --dns dns_cf -d markdriscoll.xyz -d '*.dev.markdriscoll.xyz' --server letsencrypt
- cat fullchain.cer \*. dev.markdriscoll.xyz .key | tee full-certificate.pem
- # scsi mode pages are inherently dishonest. do not blame innocent disks blame their capitalist manufacturers
- ls -al /dev/disk/by-id/ | grep "sd[a-z]" | grep ata | awk '{print $9'}
- # oh ur gameboy color doesnt have telnet installed? shouldve gone w gameboy advance they come w python2
- python -c "import telnetlib; tel=telnetlib.Telnet('us-cloud.company.com','443',10);"
- # acpi table surgery
- for i in /sys/firmware/acpi/tables/*; do sudo iasl -p $PWD/$(echo $i | cut -d\/ -f6) $i && sudo chown $USER $(echo $i | cut -d\/ -f6); done
- # web server for when need a web server - note: localtunnel requires node
- python3 -m SimpleHTTPServer 8000 &; sudo localtunnel -k ~/.ssh/id_rsa.pub 8000
- # git server for when u need a git server
- apt-get -y install git-core gitosis; adduser --home /home/git --gecos "git user" git; su git -c "ssh-keygen -t rsa -f /home/git/.ssh/id_rsa; gitosis-init < ~/.ssh/id_rsa"
- # assign top-level JSON entries to Shell Variables
- json='{"a":42, "b":"s t r i n g", "c": []}' ; eval $(echo $json | jq -r 'to_entries | .[] | select(.value | scalars) | .key + "=\"" + (.value | tostring) + "\";"' | tee /dev/tty)
- # mem suckers
- ps aux | sort -nk +4 | tail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement