Posts

Showing posts from December, 2016

ChatGPT - How Long Till They Realize I’m a Robot?

Image
I tried it first on December 2nd... ...and slowly the meaning of it started to sink in. It's January 1st and as the new year begins, my future has never felt so hazy. It helps me write code. At my new company I'm writing golang, which is new for me, and one day on a whim I think "hmmm maybe ChatGPT will give me some ideas about the library I need to use." Lo-and-behold it knew the library. It wrote example code. It explained each section in just enough detail. I'm excited....It assists my users. I got a question about Dockerfiles in my teams oncall channel. "Hmmm I don't know the answer to this either"....ChatGPT did. It knew the commands to run. It knew details of how it worked. It explained it better and faster than I could have. Now I'm nervous....It writes my code for me. Now I'm hearing how great Github Copilot is - and it's built by OpenAI too...ok I guess I should give it a shot. I install it, and within minutes it'...

Docker on RPi

Here are a few important commands I've learned about docker so far.  I've been working on getting Docker running on RPi which now has support for it.  It's a little different on RPi because RPi boards use the ARM architecture rather than the intel architecture, which most all other CPUs use.  That means that although Docker containers are supposed to be able to run on any machine with Docker installed, it's not true in the case where the container was built on intel and run on ARM or vice versa.  So you have to look for the right types of images to build on top of.  Anything on hub.docker.com that includes 'rpi' or 'arm' should usually be able to run on the RPi.  For example: https://hub.docker.com/r/joaquindlz/rpi-docker-lamp/ Docker run Docker start Docker stop Docker ps -t tag --name name of image -d run container as daemon in background list running containers: # docker ps list all containers: # docker ps -a ...

WordPress on RPi

I got it working on the RPi - this one didn't take too long because there weren't too many hiccups. Step1: https://www.raspberrypi.org/learning/lamp-web-server-with-wordpress/worksheet/ - start at section 4, as the previous blog posts here have outlined how to do the previous steps already.  One thing you'll need is to remember the password you created for MySQL - the username is 'root'.

Passwordless SSH access to the RPi

Got it working, and added some security changes. Step 1: see https://help.github.com/articles/generating-an-ssh-key/ about generating ssh keys if you haven't already got them present in ~/.ssh (make sure you've used ssh-add and make sure the value for AuthorizedKeysFile in /etc/ssh/sshd_config is set to '%h/.ssh/authorized_keys') Step 2: use http://raspi.tv/2012/how-to-set-up-keys-and-disable-password-login-for-ssh-on-your-raspberry-pi excluding the key gen section to get passwordless ssh working, turn off passwords, and get port forwarding working.  Remember, to update settings on the router, go to 192.168.0.1 - but only from the 1 of the 2 approved devices that you set. Step 3: test the ability to login from a remote ssh client : 'ssh -p pi@yourdomain.com'

Web Server with RPi 3

Got a web server running a raspberry pi 3 today! Step 1: Start up the pi and install raspbian Step 2: https://diyhacking.com/raspberry-pi-web-server/ (follow everything until the stuff about no-ip - then things were different because I'm using google domains) Step 2.5: (found this out later) Make sure to add a permanent lease for the internal IP address that the RPi has - do this using your router settings.  If you don't, then your router might unexpectedly change your RPi's IP and you'll have to figure out what it is again, and change the port forwarding as well. Step 3: add 2 entries to the Dynamic DNS section of your google domains page - 1st one is '@', 2nd is 'www'. Step 4: go on the RPi and install ddclient (sudo apt-get install ddclient) - when the install prompts come up, use the username and password from either of the new DDNS entries in google domains (expand it).  Use wlan0 (unless you're on ethernet now).  I think the rest shou...