268 karma · joined March 6, 2010
But what to do. That's life! We all can use this as motivation!
And let's stop with the blame/reputation stuff - it was a mistake and they apologized. Not like YOU never made any mistakes!
The question I have is - can it outperform the command line? (see https://news.ycombinator.com/item?id=17135841 for more)
I almost always use awk/mawk for such things.
This was in the sports section
* serving of files and directories
* LetsEncrypt certificates and SSL
Because layoffs also promote a corrosive us-against-them dynamic that destroys the esprit de corps businesses need to succeed.
PS: I use google's email service and have the same id there as I have on YC.
When mankind first started to burn fossil fuels nobody anticipated that it would impact climate on a planetary scale. This is an idea that needs much more study before we rush into it.
# Encrypt a file
encrypt() { openssl enc -aes-256-cbc -salt -a -in $1 -out $2; }
# Decrypt a file
decrypt() { openssl enc -aes-256-cbc -d -a -in $1 -out $2; }
# Fetch weather forecast
weather() { curl "http://wttr.in/$1"; }
# Convert input text into a QR code
qrify() { curl "http://qrenco.de/$1"; }
# Fetch information about a stock
stock() { curl -s "https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=$1&apikey=KPCCCRJVMOGN9L6T" | awk '/\. / {$1=""; gsub("\"|,",""); print $0}'; }
# Conversion rate between currencies
currency() { curl -s "http://api.fixer.io/latest?base=${1^^}&symbols=${2^^}" | grep -Eo "[0-9]*[.][0-9]*"; }
# Fetch cheatsheet
cheat() { curl "http://cheat.sh/$1"; }
# Fetches DNS nameserver
dns_nameserver() { awk '/nameserver/ {print $2}' /etc/resolv.conf; }
# Fetches WAN ip address
wan_search() { dig +short myip.opendns.com @resolver1.opendns.com; }
# Show actual destination of a tinyurl. Eg: untiny "tinyurl.com/savepii"
untiny() { curl -s "http://x.datasig.io/short?url=http://$1" | awk -F '"' '/dest/ {print $4}'; }
# Get your remote IP addr
myip() { curl -s http://x.datasig.io/me | awk -F"\"" '/ip/ {print $4}'; }
# Fetch movie info
movie() { curl -s "http://www.omdbapi.com/?t=${1/ /+}&apikey=946f500a" | jq ". | {Ratings:[.Ratings[1].Source, .Ratings[1].Value ], Plot, Actors, Director, Genre, Rated, Year, Title}" | sed -e '/Ratings/{N;N;N;s/\n/ /g;s/"Ratings": \[ //;s/, /:/;s/ ]//}' | awk -F'"' '/: / {print $2 ": " $4}'; } # Encrypt a file
function encrypt() { openssl enc -aes-256-cbc -salt -a -in $1 -out $2 ; }
# Decrypt a file
function decrypt() { openssl enc -aes-256-cbc -d -a -in $1 -out $2 ; }
# Fetch weather forecast
function weather() { curl "http://wttr.in/$1"; }
# Convert input text into a QR code
function qrify() { curl "http://qrenco.de/$1"; }
# Fetch information about a stock
function stock() { curl -s "https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=AAPL&apikey=KPCCCRJVMOGN9L6T" | awk '/\. / {$1=""; gsub("\"|,",""); print $0}'; }
# Conversion rate between currencies
function currency { curl -s "http://api.fixer.io/latest?base=$1&symbols=$2" | grep -Eo "[0-9]*[.][0-9]*"; }
# Fetch movie info
function movie { curl -s "http://www.omdbapi.com/?t=${1/ /+}&apikey=946f500a" | jq ". | {Title, Year, Ratings:[.Ratings[1].Source, .Ratings[1].Value ], Rated, Genre, Director, Actors, Plot}" | awk -F "\"" '/:|%|Tomato/ {print $2 $3 $4}' | sed '/: \[/d' | perl -pe 's/,\n/: /'; }
# Fetch cheatsheet
function cheat() { curl "http://cheat.sh/$1"; }
# Fetches DNS nameserver ???
function dns_nameserver() { cat /etc/resolv.conf | grep -i ^nameserver | cut -d ' ' -f2; }
# Fetches WAN ip address ???
function wan_search() { dig +short myip.opendns.com @resolver1.opendns.com ; }
# Show actual destinatoin of a tinyurl. Eg: untiny "tinyurl.com/savepii"
function untiny() { curl -s "http://x.datasig.io/short?url=http://$1" | awk -F '"' '/d