Skip to content

Instantly share code, notes, and snippets.

View chadmayfield's full-sized avatar

Chad Mayfield chadmayfield

View GitHub Profile
Phone shortcuts
------------------------
1. *#06# – IMEI number
2. *#0*# – Service menu on devices like the Galaxy S III
3. *#*#4636#*#* – Information about device, user statistics and battery
4. *#*#34971539#*#* – Details on camera
5. *#*#273282*255*663282*#*#* –Instant backup media files
6. *#*#197328640#*#* – Activating test mode devices
7. *#*#232339#*#* – Test for Wireless LAN
8. *#*#0842#*#* – Test for vibration and backlight
@chadmayfield
chadmayfield / view_conns.sh
Last active June 16, 2016 19:15
View established connections with hostnames
#!/bin/bash
netstat -tunlap | awk '{print $5}' | grep [0-9] | egrep -v '(127|0).0.0.*|::1'| awk -F ':' '{print $1}' | sort -u | xargs -n 1 host
#!/bin/bash
find / -path /proc -prune -o -path /dev -prune -o -type f -size +50M -exec ls -lh {} \; | awk '{ print $5 "\t: " $NF}' | sort --human-numeric-sort -r
@chadmayfield
chadmayfield / print_env.py
Created June 14, 2016 03:28
Print env in python
#!/usr/bin/python
import os
for param in os.environ.keys():
print "%20s %s" % (param,os.environ[param])
### Keybase proof
I hereby claim:
* I am chadmayfield on github.
* I am crm (https://keybase.io/crm) on keybase.
* I have a public key whose fingerprint is A22C 343E 104B B7A4 A257 30B3 E854 9105 B0B8 DBFB
To claim this, I am signing this object: