Wednesday, May 02, 2018

Cut and paste the below camel into a PERL environment.  Press return and then ctrl-d.  Enjoy!


                                                   sub j(\$){($
                     P,$V)=                      @_;while($$P=~s:^
                 ([()])::x){                    $V+=('('eq$1)?-32:31
           }$V+=ord(  substr(                 $$P,0,1,""))-74} sub a{
          my($I,$K,$  J,$L)=@_               ;$I=int($I*$M/$Z);$K=int(
         $K*$M/$Z);$J=int($J*$M             /$Z);$L=int($L*$M/$Z); $G=$
         J-$I;$F=$L-$K;$E=(abs($          G)>=abs($F))?$G:$F;($E<0) and($
          I,$K)=($J,$L);$E||=.01       ;for($i=0;$i<=abs$E;$i++ ){ $D->{$K
                  +int($i*$F/$E)      }->{$I+int($i*$G/$E)}=1}}sub p{$D={};$
                 Z=$z||.01;map{    $H=$_;$I=$N=j$H;$K=$O=j$H;while($H){$q=ord
                substr($H,0,1,"" );if(42==$q){$J=j$H;$L=j$H}else{$q-=43;$L =$q
              %9;$J=($q-$L)/9;$L=$q-9*$J-4;$J-=4}$J+=$I;$L+=$K;a($I,$K,$J,$ L);
              ($I,$K)=($J,$L)}a($I,$K,$N,$O)}@_;my$T;map{$y=$_;map{ $T.=$D->{$y}
              ->{$_}?$\:' '}(-59..59);$T.="\n"}(-23..23);print"\e[H$T"}$w= eval{
              require Win32::Console::ANSI};$b=$w?'1;7;':"";($j,$u,$s,$t,$a,$n,$o
                   'QIAKJR}*JV]wRAI*J?}T]*RJcJI[\]3;U]Uq*PM[wV]W]WCT*DM*SJ'.  'ZP[Z'.
                      'PZa[\]UKVgogK9K*QJ[\]n[RI@*EH@IddR[Q[]T]T]T3o[dk*JE'.  '[Z\U'.
                        '{T]*JPKTKK]*OJ[QIO[PIQIO[[gUKU\k*JE+J+J5R5AI*EJ00'.  'BCB*'.
                             'DMKKJIR[Q+*EJ0*EK';sub h{$\ = qw(% & @ x)[int    rand
                              4];map{printf  "\e[$b;%dm",int(rand 6)+101-60*   ($w
                               ||0);system(  "cls")if$w ;($A,$S)=    ($_[1],   $
                                _[0]);($M,   @,)= split  '}';for(     $z=256
                                ;$z>0; $z   -=$S){$S*=   $A;p @,}      sleep$_
                                [2];while   ($_[3]&&($    z+=$ S)       <=256){
                                p@,}}("".   "32}7D$j"     ."}AG".       "$u}OG"
                                ."$s}WG"    ."$t",""      ."24}("        ."IJ$a"
                                ."}1G$n"    ."}CO$o"     ."}GG$t"        ."}QC"
                                 ."$h}"      ."^G$e"    ."})IG"          ."$r",
                                 "32}?"       ."H$p}FG$e}QG$r".          "}ZC"
                                 ."$l",          "28}(LC" .""            ."".
                                 "$h}:"           ."J$a}EG".             "$c"
                                 ."}M"             ."C$k}ZG".            "$e"
                                 ."}"             ."dG$r","18"          ."}("
                                ."D;"            ."$C"  )}{h(16         ,1,1,0
                               );h(8,          .98,0,0   );h(16         ,1,1,1)
                               ;h(8.0         ,0.98,0,     1);         redo}###
                             #written                                 060204 by
                           #liverpole                                  @@@@@@@

Sunday, October 01, 2017

I don't make many windows scripts so here's one.

To delete everything in your Downloads folder older than 30 days save the following into clearDownload.bat on your desktop and then click it when you feel happy

forfiles -p "%userprofile%\Downloads" -s -m *.* /D -30 /C "cmd /c del /F/S/Q @path"

Friday, December 09, 2016

The National Popular Vote is a Fake News Story

(and you’re helping to spread it!)

If you are talking about the popular vote as something real, you are helping to spread fake news. I'm not a Trump supporter. I'm not trying to justify the electoral college. I don’t dispute that if if you add up all the votes cast for all 18 candidates on the ballots in the combined 50 states, Hillary Clinton’s total is higher than any other candidates.

I'm asking you to look at the reality of how our elections work. Whether you like it or not, the electoral college is how the winner of the election was determined and that's the ONLY race the candidates were trying to win.

What do California and Wisconsin have in common?  Neither one was considered a "battleground" state, and as such both states were ignored by one campaign.  

Could Trump have campaigned more in California (which is the most expensive state for media buys) and done better?  Certainly.  Could he have hypothetically cranked up the negative Hillary ads in California and knocked her total down?  Probably.   Could he have won California?  Of course not.  So is anyone surprised that Trump didn't care about the California results?  Does anyone think the numbers that came in in California are a representation of the BEST the Trump campaign could have done in California?  Of course not.  So Hillary won California by 4 million votes.  

In Wisconsin, Trump won by 24000 votes.  Jill Stein had 31000 votes and Gary Johnson had 106,000. The Clinton campaign chose not to campaign in Wisconsin, believing it to be a safe state.  Does anyone believe that if the Clinton campaign had chosen to focus on Wisconsin, they could have won?  Milwaukee had record low turnout.   If perhaps Hillary had come to Wisconsin we'd have a different President.  But certainly the vote would have been different.

Which leads us to this myth of "The National Popular Vote."  There is no such thing.  No one adds up the votes for the Presidential candidates in all the states.  And in fact very few states had the same candidates on the ballot.  Only Trump, Clinton and Johnson were on the ballot in all 50 states.  In Utah, Evan McMullin was on the ballot.  In California Gloria La Riva was on the ballot.  In New Hampshire Rocky De La Fuenta was on the ballot.  

In South Carolina there were 8 Presidential candidates for the voters to chose from.

This is why the idea that there is a "National Popular Vote" is pure fiction -- because people in different states were voting in different elections with different candidates.  And the campaigns were very different in each state.  People who voted for the Trump and Clinton campaigns in New York were voting for very different campaigns than people who voted for the Trump and Clinton campaigns in Montana.

So the "National Popular Vote" is a perfect example of a Fake New Story because it cobbles together unrelated facts as a way to prove something. The facts have nothing to do with the conclusion of the story.  It's also a fake news story because people keep sharing it and talking about it.  

So help us fight against fake news.  If you want to argue the electoral college is rubbish, you have plenty of ammunition.  You don't need imply that using fake news for your point is ok. The story that Hillary Clinton won the popular vote is fake news, because there is no such thing as a National Popular Vote. No one tried to win the national popular vote, and vote totals from different states are truly not the same election. The fact that Hillary Clinton won California by 4 million votes is not relevant in any way to the idea that there was a national consensus about who should be the President. Hillary Clinton got less than 50% of the total votes cast in all states. That doesn't mean she lost the popular vote either. It means there is no such thing as a "National Popular Vote."

Tuesday, March 01, 2016

Baffling post error

My wife was working on her windows based PC when suddenly it started making what she described as a weird beeping.  She shut it down and tried to restart, but the beeping was constant at boot, so she powered it off and left it for me.

Having recently tinkered with this PC (added an SSD and upgrade the RAM) I was familiar with the insides.  I immediately reseated the RAM, reset the CMOS.  Power on, same constant beeping.

I looked up the post codes and the closest was 4-4-4, which is cache error, but this seems much faster than any post code I had heard before.  So I turned it on, and let it keep booting -- and it actually did boot!  Kept beeping though.

To make a long story short, I finally figured out there was a key stuck down on the keyboard.

Thursday, January 07, 2016

The Militia is not the People

The original text:

A well regulated militia being necessary to the security of a free State, the right of the People to keep and bear arms shall not be infringed.

My reading:

There are two sets of citizens discussed in the Second Amendment.
One group is the set of ALL citizens, named "the People."

The other set is those who bear arms in the service of the government.  This includes armed police officers, National Guardsmen, Sheriffs, FBI agents etc.  They are named "the militia."  It seems crystal clear to me that the militia and the people are two different groups. When the Constitution is written there are no public police forces -- policing is usually a soldiers job.  

2A states that that in order for a State to be secure in it's freedom, the militia cannot be out of control -- they must be regulated.  The only check (regulation) on the militia is to make sure that the People have the ability to confront the militia.  They can of course do this through laws -- but since the militia is charged with enforcing the laws, to whom can the People turn when the militia is breaking the laws?

The people must be able to defend themselves against the militia with force and confront the militia with force.  And since the militia is armed by definition, to ensure the People can perform this regulatory function, the right of the People  to keep and bear arms shall not be infringed.

Saturday, December 26, 2015

Windows 10 Download Folder Blues

Like most people I leave my browsers download folder to the default "Downloads" on Windows 10.

I have on occasion had an issue where I download something and then want to upload it somewhere else right away, but when I browse to my Downloads folder Windows Explorer does not show me the contents of the directory,  Instead it says "Working on it."

This time it frustrated me enough I decided to fix the problem.  It turns out the reason what it that Windows 10 optimizes folders for certain types of data.  In my case (and probably yours too) my Download folder was set to type "Pictures."  What this means to Windows aside from "be slow" I don't know.  I assume there is a thumbnail generation process, indexing and other things that are technical but would add value to a folder filled with pictures.

But I don't need to wait for that, and as an engineer, I download a ton of stuff that are not pictures.  And you probably do too -- music, games, apps, documents, pdfs....  And Windows 10 already comes with a premade optimized folder for Documents, Pictures, Music and Videos.  So why should your Downloads folder be slow to access?

There is a simple fix.

Open up Windows explorer by pressing Windows-E
Right click on you "Downloads" folder on the left and choose "Properties"
Go to the "Customize Tab" and under "Optimize Folder" chose "General Items"

What are the consequences for this in terms of seeing thumbnails?  Probably significant -- but I would suggest that if you want to see thumbnails put your pictures in a folder that is optimized for pictures.  Likewise I notice that there are optimizations for Documents, Music and Videos.  And Windows 10 by default provides folders for all of those sort of things.  I suspect putting things in their right place will help you with searching you media as well as other things.

So the best practice imho is to download things and then if you intend to keep them, move them into folders for that type of content, and leave your Download optimized for general content.

Monday, October 12, 2015

October is Cyber Security Month

The President has declared October as Cybersecurity month.  It's not a bad idea -- just like you change the batteries in your smoke detectors once a year, maybe you should review your electronic vulbnerabilities?

My top ten security tips:

1) Change your passwords.  You've had them too long, you use the same password in too many places.  Somewhere someone has hacked a site that has your username and password in plain text.  Now they are getting ready to try that username/password somewhere else.  Beat them to the punch.

2) Use a safe browser.  That means anything that's not Internet Explorer.  I prefer chrome.

3) Use 2 step verification for your email account.  If your email doesn't provide 2 step authentication consider switching.

4) Get a free credit report and review it.  You are entitled to one free report a year.  BE VERY CAREFUL!  There are man scam sites that offer free credit reports.  Go through the site I linked to, which is maintained by the US Government.

5) Upgrade your home wifi to WPA2

6) Phone security:
  1. Lock your phone with a password 
  2. install Lookout on it so you can find it if it's gone, 
  3. make sure you have a remote wipe capability

7) (Windows only) Install a good anti-virus/malware.

8) Review your last two sets of credit card bills and actually look at them and validate each transaction.  It's common for hackers take out a small amount once to verify that they actually have a valid card, and then sell the verified number to an actual thief.

9) (expert level)Move to a secure chat client like BBM or Wickr.  Stop texting and using Facebook messenger, Google hangouts, AIM etc.

10 (expert level) use a PGP (pretty Good Protection) client like Mailvelope to start encrypting your email