back in Facebook Jail... again

Someone sent me this video of hot muscle guys in santa outfits dancing.  So i posted it on my wall.  And I guess there's like one frame on in the video where his shorts go up for a split second.

And because i posted it, i got auto put in facebook jail.

No warning.  No nothing.  Just instantly in Facebook Jail.

Docker foo

BUILD YOUR OWN IMAGE:

docker pull ubuntu
docker run --name brad-fun-test -it ubuntu:latest bash

(Inside the instance install some stuff like curl and netcat:
apt-get update
apt-get install netcat
apt-get install curl
exit
)
docker ps -a
docker commit 2efdac31b04a brad-fun-test-2019-06-23-v1


PUBLISH IT:

$ docker commit -m "Testing 123" -a "Totes" 2efdac31b04a bradtesting/testrepo:brad-fun-test-2019-06-23-v1

 $ docker push bradtesting/testrepo:brad-fun-test-2019-06-23-v1

And in the future:
$ docker  push bradtesting/testrepo:tagname

How to handle Timezones/Timechange (EDT/EST) crons on Ubuntu

Ubuntu does not honor the CRON_TZ variable the way that RedHat based Linux does.

Therefore you have to do a check for the EDT/EST from for it to work, and if it matches run the command.
You have to put the cron line in twice. Once for EDT and once for EST.

But this way you can control that the cron always runs at the same time regardless of EST or EDT.

/etc/cron.d# more test-cron
# Ubuntu does not recognize CRON_TZ=America/New_York
# Runs at 6am
1 10 * * Mon,Tue,Wed,Thu,Fri root test `TZ=America/New_York date +"\%Z"` = "EDT" && /usr/local/bin/mycommand
1 11 * * Mon,Tue,Wed,Thu,Fri root test `TZ=America/New_York date +"\%Z"` = "EST" && /usr/local/bin/mycommand

How to get your Vault Progress on a Mac or Linux box running MTG Arena under Wineskins:

I run MTG:Arena on my mac under Wineskins. It's flawless.

Anyhow, since MacOSX is really just BSD with a pretty GUI, I decided to make a simple command to get my Vault progress status.

So here it is:

$ find /Applications/MTGArena.app/ -name output_log* -exec grep vaultProgress\" {} \;  | tail -1
  "vaultProgress": 14.5,


That's it.

Here's another way if you want to parse it with jq, since it's returning in json (although it's json inside of a text blog):

$ find /Applications/MTGArena.app/ -name output_log* -exec grep -A28 "<== PlayerInventory.GetPlayerInventory" {} \; | tail -28 | jq .vaultProgress
14.5

Managing your Host based Firewall in MacOSX

VPN's make you LESS secure, not more secure.

Am I the only one who thinks it's funny that all these virus scanning/security companies offer VPN services for home users proclaiming to make your network "more secure"?

Let's think about this for a second. Let's say you have a firewall in your home network, and you VPN to some 3rd party outside your network. Your IP is now exposed OUTSIDE YOUR NETWORK with NO FIREWALL to protect you. So if you wrongfully had say sshd running on your box (on mac, it would be simply clicking the "Remote access" checkbox), and let's say you set a simple password for your root account (or did the OS Upgrade that reset the mac root password TO NOTHING), your box would be exposed to the open internet, with no firewall to block port 22 and no password for the root account.

In other words, using a VPN exposes you to an easy hack.

For this reason I always check "netstat -an |egrep tcp.*LISTEN" on my mac to see what ports are listening before using a VPN. Because all those ports are going to be open to the world for hackers.

Something to think about. Don't think VPN's make you more secure. It's actually the opposite.

Fun With MacOSX Screensaver

1- It's October so install a jack-o-lantern screensaver! :)

https://www.killerrobots.com/jack-o-lantern/Jack-O-Lantern.zip

2- I wrote a script to make my screensaver go off after 45 seconds. (the lowest MacOSX will let you go in the GUI is 1 minute).

#!/bin/sh
user=`/usr/bin/id -u -nr`
sudo -u $user defaults -currentHost write com.apple.screensaver CleanExit -string "YES"
sudo -u $user defaults -currentHost write com.apple.screensaver PrefsVersion -int 100
sudo -u $user defaults -currentHost write com.apple.screensaver showClock -string "NO"
sudo -u $user defaults -currentHost write com.apple.screensaver idleTime -int 45
sudo -u $user defaults -currentHost write com.apple.screensaver tokenRemovalAction -int 0

##########
# sudo -u $user defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName -string "iLifeSlideshows" path -string "/System/Library/Frameworks/ScreenSaver.framework/Resources/iLifeSlideshows.saver" type -int 0
# sudo -u $user defaults -currentHost write com.apple.ScreenSaverPhotoChooser LastViewedPhotoPath -string ""
# sudo -u $user defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedFolderPath -string "/Path/To/Pictures/To/Show"
# sudo -u $user defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedSource -int 3
# sudo -u $user defaults -currentHost write com.apple.ScreenSaver.iLifeSlideShows styleKey -string "VintagePrints"
##########
sleep 2
sudo killall -hup cfprefsd

How to play Magic the Gathering with a standard deck of cards

Requirements:  2 standard decks of playing cards.

Instructions:   Separate the 2 standard decks of cards into suits (clubs, hearts, diamonds, and spades).   Now mix all the hearts and spades together into one deck.  Then mix all the diamonds and clubs into the other deck.  Put 2 Jokers into each deck.

Use the following chart to determine what each card is, and use the standard rules of Magic.