64Zbit.com
Tech is way, WAY interesting

Save Text Snippets to DayOne using Better Touch Tool

For a long time I've wanted a quick way to save text snippets in a timestamped, quickly searchabe form. Today I created a Better Touch Tool keyboad shortcut to save text snippets to a specific DayOne journal.

Here are the details on github so that you too can enjoy this amazing automation feature.

dougpark/dayone

Better Touch Tool create a DayOne journal entry. Contribute to dougpark/dayone development by creating an account on GitHub.

dougparkGitHub


How-build-computer-controlled-robot

Read the full article at www.amazon.com

The book that started it all for me. Sometime around 1979 #kim1 #6502 #robot #diy #developer


Raspberry Pi USB boot

How to install Ubuntu Desktop on Raspberry Pi 4 | Ubuntu

Ubuntu is an open source software operating system that runs from the desktop, to the cloud, to all your internet connected things.

Install Ubuntu Desktop on Raspberry Pi 4

Covers the basics of updating your Pi 4 to USB boot.


Pluto Attacks

Html5, Phaser 2, Action packed arcade game

Pluto Attacks was previously hosted at povingames.com

Play Now

"The Plutonians are not happy with us calling their home a 'dwarf' planet. So when they discovered a trick in the space time continuum they sent an infinite number of drones to attack Earth. We created an energy weapon that can siphon off the energy from the drones weapons. This powers the Earths vessel and creates a powerful energy shield. Remember, don't let even one alien escape!"

Poving Games released this intense shooter based on the classic Phaser Invaders example and then taken it into complete overdrive! You don't have to shoot, that is done automatically. You just move left and right and blast away the plutonains. It all starts quite calmly and you'll no doubt do a perfect clearance of the first few levels.

Read More at phaser.io

Read More at html5games.net

How To Play

You can start at Normal level 1 if you want to see how it all began. Typical space game with normal dodge and shoot action. You can even level up to the 20’s and still play a dodge and shoot game. However, it will drive you crazy and you will get bored.

The fun begins at about Fun level 20. Everything is faster and you quickly realize there is more to the game then just dodge and shoot. In fact dodging is no longer possible. There are explosions, lots and lots of explosions.

Plutonians are not happy with the reclassification of their home world to Dwarf Planet. So when they discovered a trick in the space time continuum they send an infinite number of drones to attack Earth. Earth learned just enough about their technology to use it to their own advantage. We created an energy weapon that can siphon off the energy from the drones weapons. This powers the Earth vessel and creates a powerful energy shield.

For desktop just press the space bar to start and then left and right arrows to move. That’s it.

For mobile just tap to start and then use your finger to move back and forth. It’s actually easier and more fun on mobile.

Levels go by pretty quickly. Hey, it’s a game with only two buttons and you can master it in 60 seconds. By level 20 it’s moving right along and by level 30 it’s actually pretty good. Have Fun!

Tip: Don’t let any aliens escape!

Pluto Attacks


Future Projects

I've been doing this for decades and now I want to be an HTML5 game devloper. I'm starting with a server! Well, I have very little experience with game development, graphics, animation, sound, so it's going to be a fun journey.

Stories in the pipeline:

  • VSCode Remote
  • Installing Docker, Docker-Compose
  • Nodejs with socket.io
  • Nodemon sounds like Pokemon, yep!
  • SSL and Letsencrypt certificates
  • Working with Apache, MySQL and PHP
  • Hosting your own VPS backend with Linode for $5 a month
  • HTML5 games and AJAX are best buds
  • HTML5 games and socket.io are even better buds

macOS - BitBar - Get Wi-Fi SSID with shell script

So, Jason Snell got me hooked on BitBar (BitBar (by Mat Ryer - @matryer) lets you put the output from any script/program in your Mac OS X Menu Bar.) and I've been working on a plugin ever since. Here's a quick way to get your current Wi-Fi SSID.

function display-ssid {
    echo "---"
ssid=$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I  | awk -F' SSID: '  '/ SSID: / {print $2}') 
    echo "Wi-Fi: $ssid | terminal=false bash='$0' param1=copy param2=$ssid"

}

Get wireless SSID through shell script on Mac OS X

Is there any way to get the SSID of the current wireless network through a shell script on Mac OS X?

Mark SzymanskiStack Overflow

SSID with shell script


How to answer questions in a helpful way

We all work together. I always try to assume the other person is asking a serious question. Depending on how tired I am I may not answer in the best way. Here are some tips to stay on track.

How to answer questions in a helpful way

Answer Questions Well by Julia Evans


How to think like a programmer — lessons in problem solving

How to think like a programmer — lessons in problem solving

by Richard Reis How to think like a programmer — lessons in problem solvingBy Richard Reis [https://twitter.com/richardreeze]If you’re interested inprogramming, you may well have seen this quote before: > “Everyone in this country should learn to program a computer, because it teachesyou to thi…

How to think like a programmer


The Gateless Gate

"This classic Zen Buddhist collection of 49 koans with commentary by Mumon was originally published in 1934, and later included in Paul Reps and Nyogen Senzaki's popular anthology Zen Flesh, Zen Bones. Due to non-renewal it is currently in the public domain in the US (although other parts of Zen Flesh, Zen Bones are not)." source link

I was playing with CSS and Html and made a nice little web app.

Check out my project and read all 49 koans


Hyperlegible Typeface

I love this and will need it sooner than I expect.

"Atkinson Hyperlegible font is named after Braille Institute founder, Robert J. Atkinson.  What makes it different from traditional typography design is that it focuses on letterform distinction to increase character recognition, ultimately improving readability."

https://www.brailleinstitute.org/freefont

A Free Hyperlegible Typeface from the Braille Institute

Atkinson Hyperlegible is a free typeface developed by the Braille Institute and Applied Design Works that makes text more readab

Jason Kottkekottke.org

Hyperlegible Typeface


Get the most from Siri music

I'm terrible a playing music, this helps.

Hey Siri, Play Some Music: All the Music Commands (and more …)

How to play Music by Activity and Mood

Apple Music has a couple of not so obvious activities and moods, which you can use to specify what to play:

  • *Hey Siri play (some) music for *
  • *Hey Siri play music*

Here is a list of some *moods* we have tested, we’ve added the station they will trigger:

  • *Peaceful / Meditation / Meditate / Bedtime / Sleeping* -> station Meditation
  • *Happy / Cheerful / Whimsical* -> station Happy Music
  • *Wild / Party / Fun* -> station Partying
  • *Stimulating / Exciting / Motivate(d) / Waking Up / Upbeat* -> station Motivated Music
  • *Angry* -> station Angry music
  • *Calm / Sad / Blue / Somber* -> station sad music
  • *Intimate / Erotic / Baby Making* -> station Getting it on
  • *Mellow / Chill / Soothing* -> station chill music
  • *Love / Passion / Tender / Romance / Romantic* -> station Romantic and Love Music

Here we go with some *activities*, which we’ve tested (musically =):

  • *Seperate / Split(ing) / Break(ing) Up* -> station Breaking Up
  • *Exercise / Cardio / Work(ing) Out* -> station Working Out
  • *Dinner Party / Cooking / Entertaining* -> station Entertaining
  • *Dance / Dancing* -> station Dance
  • *Focus(ing) / Study(ing) / Concentrate / Concentration* -> station Focusing
  • *Family Time / Safe for Kids* -> station Family Time
  • *Family / Kids* -> station Disney

Nodemon for Docker

I just installed Nodemon in my development Docker container. Here are the details.

Game developers need a quick and easy server solution. Docker, nodejs, mysql, sqlite, socket.io are working great for me. This is part of my upcoming series on how to make it all work. Its way, WAY easier than you might think.


Use Prism for Syntax Highlighting in Ghost

Configure Ghost and Prism to provide code syntax highlighting for all popular formats including javascript, php, html, css, markdown and more.

Ghost is a great CMS and it's easy to add a code syntax highlighter such as Prism.

Versions

Ghost version 3.3
Prism version 1.21

Prism

There are two ways to use Prism: 1) download and serve from your website or 2) serve from a Content Delivery network (CDN). The CDN option is actually easier and better for your viewers. There is a chance that many sites use Prism and once your browser has it in its local cache it won't need to download it again, which makes it faster and uses less bandwidth. So, that's what you will learn about today.

Step 1 - Go to the Prism website and learn a little about it. Look at the Theme bubbles down the right-side of the page. Find a theme that you like and want to use on your Ghost powered blog. I use the "Okaidia" theme on this website. Also, notice that there are many, many language features supported. If you will always just use a few languages then you can hard code them into your setting and only use them. However, if like me there is no telling which language you will post about next then you should use the autoloader feature.

Take note of the latest Prism version. As of this writting I'm using version 1.21.0. You will want to use the most current version.

CDN

Step 2 - Find a CDN that hosts Prism. I chose cdnjs.com to serve the Prism files. It's free, easy to use and fast. I recommend you go to cdnjs.com and search for Prism. You will see that there are a lot of options. You don't need all of those, just the ones you are interested in.

Step 3 - There are 3 main parts of Prism you need to make this work. The first part is the CSS. To load this from cdnjs.com looks like this.

Part 1: Choose your theme:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.21.0/themes/prism-okaidia.min.css">

Link to Prism okaidia theme

Notice this version contains the word okaidia which means it has the color scheme for the Theme I like. You should search for the Theme that you chose in step 1.

Part 2: Find the core js file:

<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.21.0/components/prism-core.min.js"></script>

Link to Prism core library

It contains the core of the Prism library.

Part 3: Find the language modules you want to use, or find the autoloader version.

<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.21.0/plugins/autoloader/prism-autoloader.min.js"></script>

Link to Prism autoloader

These are the 3 minimum components needed to use Prism with Ghost.

Now that you have identified the 3 main components and their links to the CDN, it's time to put them into your Ghost blog.

Code Injection

Ghost makes this very easy to do with the Code injection feature on their admin page.

Step 4 - Go to your ghost admin page, it is defaulted to site.tld/ghost, and login with your admin account.

Click on the Code injection menu option on the left. You should see two main sections "Site Header" and "Site Footer".

Part 1 - Place the CSS link in the Site Header section. It should look something like this:

Site Header portion of Code injection

That's all there is, just copy and paste the above CSS link into the Site Header section.

Part 2 - The Site Footer works the same, just copy and paste the core link and the autoloader link. If you decided to go with language specific options this is where you would load them instead of the autoloader link.

Remember these links are loaded on every page of your blog even if you don't use them on that page, so keep it simple, small and fast.

Site Footer portion of Code injection

Configuration Complete

That's all there is to configuring Ghost to use Prism. The next portion will show you how to use them on your blog.

Step 1 - Create a new post in Ghost and press the + icon to add a new section to your page, and then immediately type ``` that's 3 back-tick special characters under the ~ symbol on the top left of your keyboard. They are not single quotes ' or double quotes ".

This puts Ghost into the code entry mode. You can copy and paste your code in here.

Step 2 - Notice on the right hand side of the code entry box there is a place for language. This is where you type in the language for this code snippet. Ghost has done some of the work for you. You don't have to prepend the language type with language- or lang- as talked about in the Prism documentation, just put in what you are working with. Such as: js, javascript, html, php, json, css, etc..

Sample html script with language type shown in top-right corner

That's it! You code snippets will now be syntax highlighted with Prism.

Further Reading

For more examples and tips on how to add line numbers and a copy-to-clipboard button check out this Ghost tutorial.

Examples

Here are a few examples to look at.

function createBoard(team) {

    let out = "";
    out += "<div class='text-center'>";
    for (col = 1; col <= 10; col++) {
        for (row = 1; row <= 10; row++) {
            let calcId = team + "-" + zeroPad(row, 2) + zeroPad(col, 2);
            let link = ` '${team}', ${row}, ${col}, '${calcId}'`;
            out += `  <a class='m-0 p-1 btn btn-dark' href="javascript:fire(${link});" role='button'>`
            out += "   <span class='title'>";
            out += "    <span id='" + calcId + "' class='badge badge-dark oi' data-glyph='target'>" + " " + "</span>";
            out += "   </span>";
            out += "  </a>";
        }
        out += " <br> ";
    }
    out += "</div>";

    $('#board-' + team).html(out);

}

Sample Javascript code

@import "ios.css";
/* @import "darkMode.css"; */
@import "toggleSwitch.css";

@font-face {
    font-family: Revamped;
    src: url("../font/Revamped.ttf") format('truetype');
}

/* get screen width based on device */
:root {
    /* desktop vars */
    --screen-w1: 500px;
    --screen-w2: 495px;
}

@media screen and (max-width: 500px) {
    :root {
        /* mobile vars */
        --screen-w1: 97vw;
        --screen-w2: 94vw;
    }
}

Sample CSS code

public function getGame($userName, $roomName, $gameToken)
    {

        //load game
        $this->game = $this->loadGame($gameToken);

        return $this->game;
    }

Sample PHP code

<!-- Main Nav Bar -->
        <div class="w3-top hide main">
            <div class="w3-bar w3-round-large z-nav-background z-width" xstyle="max-width:500px">
                <span class="">
                    <a onclick="showPanel('lobby')" class="w3-bar-item w3-round-large z-nav-text">Lobby</a>
                </span>

                <button onclick="showPanel('E-Space')" class="w3-button z-nav-text w3-border w3-border-blue w3-hover-black w3-small">E-Space</button>
                <button onclick="showPanel('F-Space')" class="w3-button z-nav-text w3-border w3-border-blue w3-hover-black w3-small">F-Space</button>

            </div>
        </div>

Sample HTML code

ALTER TABLE `activeUserTable`
  ADD PRIMARY KEY (`id`),
  ADD KEY `time_index` (`time`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `activeUserTable`
--
ALTER TABLE `activeUserTable`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
COMMIT;

Sample SQL code


Studio Ghibli 50 free stills

Studio Ghibli just announced they’ll be uploading 50 free stills from each of their movies: “feel free to use them as you wish, within the bounds of common sense”

Link to the original article


Discover Phaser - The Book

@photonstorm Thanks to @thomaspalef for this excellent resource. . Worth every penny.

Link to the original article


iOS is Boring

I’m a big Apple fan and I have lots of Apple products and the real problem is that iOS is boring. Tim Cook is known for efficiency and Jonathan Ive loves his basic looks, however, when combined they are boring! iOS used to have lots of little details that were exciting to find, but now they are hard to find, hard to discover, and boring when found. They need to let their developers have a little fun, stay in their human guidelines of course, but still have a little fun. Hardware optimization makes sense, but don’t over optimize the software. It can provide a path to fun.


The Anatomy of the Underwater Fiber Optic Cables That Connect the Internet

The Anatomy of the Underwater Fiber Optic Cables That Connect the Internet

Link to the original article


An Explanation for Why People Don’t Often See ‘B’ Batteries

An Explanation for Why People Don’t Often See ‘B’ Batteries

Link to the original article


The Internet of Things - Nuts & Volts Magazine - For The Electronics Hobbyist

Everything starts somewhere...

The Internet of Things - Nuts & Volts Magazine - For The Electronics Hobbyist

NUTS & VOLTS MAGAZINE (NOVEMBER2014)

NewImage

THE INTERNET OF THINGS By Bryan Bergeron    View Digital Edition  

» Skip to the Extras Since the birth of the Internet, there has been talk of total connectivity — between people, people and their possessions, and things to things. Up until recently, the reality has been that such ecosystems existed only in academic and corporate research centers. Today, the Internet of Things (IoT) is a practical reality in many settings.

Read the original artical at: The Internet of Things - Nuts & Volts Magazine - For The Electronics Hobbyist


The Joy of Tech comic... A gathering of robots!

The Joy of Tech comic... A gathering of robots!

NewImage

More info at: The Joy of Tech comic... A gathering of robots!


AI, Apple and Google — Benedict Evans

AI, Apple and Google — Benedict Evans

There are really two things going on here - you’re using voice to fill in a dialogue box for a query, and that dialogue box can run queries that might not have been possible before. Both of these are enabled by machine learning, but they’re built quite separately, and indeed the most interesting part is not the voice but the query. In fact, the important structural change behind being able to ask for ‘Pictures with dogs at the beach’ is not that the computer can find it but that the computer has worked out, itself, how to find it. You give it a million pictures labelled ‘this has a dog in it’ and a million labelled ‘this doesn’t have a dog’ and it works out how to work out what a dog looks like. Now, try that with ‘customers in this data set who were about to churn’, or ‘this network had a security breach’, or ‘stories that people read and shared a lot’. Then try it without labels ('unsupervised' rather than 'supervised' learning). 

Today you would spend hours or weeks in data analysis tools looking for the right criteria to find these, and you’d need people doing that work - sorting and resorting that Excel table and eyeballing for the weird result, metaphorically speaking, but with a million rows and a thousand columns.  Machine learning offers the promise that a lot of very large and very boring analyses of data can be automated - not just running the search, but working out what the search should be to find the result you want. 

More info at: AI, Apple and Google — Benedict Evans


‘We Hardly Understand Anything’: Rodney Brooks On Artificial Intelligence | Radio Boston

‘We Hardly Understand Anything’: Rodney Brooks On Artificial Intelligence | Radio Boston

If you’re going to talk about robots, there’s no better person to talk with than Rodney Brooks. He’s the former director of MIT’s Computer Science and Artificial Intelligence Laboratory. He’s also co-founder of two companies: iRobot, maker of the Roomba, and now Rethink Robotics.

He’s spent his entire life thinking about robots and artificial intelligence. He sat down with us to talk how he built his first machine, what technology we have yet to tackle and why Stephen Hawking and Elon Musk are wrong to fear the future of robots.

More info at: ‘We Hardly Understand Anything’: Rodney Brooks On Artificial Intelligence | Radio Boston


Robot Surgeons Are Taking Over the Operating Room - IEEE Spectrum

Robot Surgeons Are Taking Over the Operating Room - IEEE Spectrum

Advanced surgical robots are already helping doctors perform operations with previously unimaginable precision. But fairly soon, doctors may be able to hand the scalpel over entirely—at least for simple, repetitive procedures—freeing up human surgeons’ valuable time for more complex work.

Some of the latest surgical robots can already plan and execute simple surgical tasks entirely on their own, select optimal approaches and tools, and even use deep learning to observe and replicate new procedures. So we’ve rounded up a few of the coolest robo-surgeons just for you.

More info at: Robot Surgeons Are Taking Over the Operating Room - IEEE Spectrum


Researchers want robots to feel pain | The Verge

Researchers want robots to feel pain | The Verge

Researchers in Germany are developing a way for robots to feel pain, in the hopes that doing so will enable them to better protect humans. The researchers, from Leibniz University of Hannover, are working on an "artificial robot nervous system to teach robots how to feel pain," IEEE Spectrum reports, and presented their project at a robotics and automation conference in Sweden last week. Under the system, robots would identify pain and quickly respond to avoid further damage to their parts.

More info at: Researchers want robots to feel pain | The Verge


Rethinking Knowledge in the Internet Age - Los Angeles Review of Books

Rethinking Knowledge in the Internet Age - Los Angeles Review of Books

The internet started out as the Information Highway, the Great Emancipator of knowledge, and as an assured tool for generating a well-informed citizenry. But, over the past 15 years, that optimism has given way to cynicism and fear — we have taught our children that the net is a swamp of lies spun by idiots and true believers, and, worse still, polluted by commercial entities whose sole aim is to have us click to the next ad-riddled page.

More info at: Rethinking Knowledge in the Internet Age - Los Angeles Review of Books