commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
client$ while true; do read -n30 ui; echo $ui |openssl enc -aes-256-cbc -a -k PaSSw ; done | nc localhost 8877 | while read so; do decoded_so=`echo "$so"| openssl enc -d -a -aes-256-cbc -k PaSSw`; echo -e "Incoming: $decoded_so"; done
This will establish a simple encrypted chat with AES-256-CBC using netcat and openssl only.
php -r "echo ini_get('allow_url_fopen');"
php -r "echo function_exists('curl_init');"
php -r "echo function_exists('json_decode');"
By default sudo 'remembers' password for a few minutes, so that you do not need to re-enter password for a series of sudo commands that might follow within a short time duration.
However, sometime you might want sudo to instantly 'forget' the password.
(Next sudo command will need you to reenter the password)
Credit: I first learned this while listening to one of the 'tuxradar' podcast.
this string of commands will release your dhcp address, change your mac address, generate a new random hostname and then get a new dhcp lease.