Syncing Raspberry

Ok,

I managed to sync with rclone but it's not doing what I want the way I want it.
After a bit of research, I'll probably change my web hosting provider for one that allows me to setup my owncloud server. Since with rclone, I can't share the folder to my dropbox, this is a no go.

I don't need a lot of speed or storage space, I just want to easily transfer logs from the pi to my computer and code from the mac to the pi. I'm still searching for the best option.

Raspberry Setup part 1

All right,

So, finishing the setup phase, I decided to erase my SD card and put the latest Raspbian Stretch Lite version on it. (if you need a guide, here's the link)
Don't forget to add an empty and extension-less file called ssh to the boot directory if you need ssh access with the new stretch version. (This was On by default before). I also had to erase my known ssh hosts (/Users/username/.ssh/known_hosts) to convince OS X that I'm not being hacked.

Then I configured my wifi connexion using sudo raspi-config and had to add these lines to /etc/dhcpcd.conf so that the wifi connexion to the internet would come first and the wired connexion to my mac would be second :
interface eth0
metric 500

interface wlan0
metric 200


Then the classic sudo apt-get update, verify the latest versions of python and python3 are there and sudo apt-get install python-pip python3-pip.
Finally, I created a dropbox account for the pispresso project and unfortunately, there's no ARM compiled dropboxd :-( This is very sad. I had to search for alternatives and ended up installing rclone but didn't manage to sync anything yet... to be continued.

Syntax higlighting

I'm trying to figure out the best way to do syntax highlighting on blogger. Here's the latest attempt :

class Receiver(object):
    def __init__(self, sock, proj):
        self.sock = sock
        self.proj = proj
        self.end = proj.end
        self.closing = proj.closing
        self.parse = proj.parse
        self.ack = proj.ACK
        self.data = bytearray()

    def receive(self):
        yield self.sock.receive(self.end)
    
    def is_ack(self, data):
        if self.ack and data == self.ack:
            return True
I found a lot of pages, stackoverflow questions and posts about that and most seemed more complicated than needed or trying to push a mod/click baiting...

I ended up using SyntaxHiglighter by Alex Gorbatchev by pasting this code just before the </head>.
  <!-- SYNTAX HIGHLIGHTER -->
  <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"/>
  <!-- PYTHON BRUSH --> 
  <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js" type="text/javascript" />
  <!-- SYNTAX THEME -->
  <link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css"></link>
  <!-- RUN SYNTAXHIGHLIGHTER -->
  <script type='text/javascript'>
   SyntaxHighlighter.config.bloggerMode = true;
   SyntaxHighlighter.all();
  </script>

I'm not sure which version is in the /pub/sh/current/ folder but even though the website says v3, his github is now at v4 and hasn't been updated since a year ago. I've also put in the "add css" section of the blogger theme designer a slightly modified version of the RDark code found on his website.

There are two downsides though, one is that it's not working in Opera Developer with my ad blocker and second is that it loads pretty slowly on my computer. I wish I had time to strip down the blogger code and/or run my own blog app on my domain... oh well!

First Post

Hello,

Here we are, I decided to start a blog to document my next experiment/learning experience.
For the last three years, I've been working on the road and living off hotel rooms. The only thing I travel with, except clothes and bathroom essentials, is my coffee machine, coffee beans and grinder. (I have a Bialetti Moka Elettrika and buy about 500g of Santropol Espresso Black for every two weeks I'm away)

Now that I'm planning to spend more time at home, I went back to my old love, my Rancilio Silvia (2008, v2?) & her friend the Rocky grinder,  I switch between two kinds of coffee : Santropol Espresso Black and Cafe Union Espresso Bar.

In ten years, I only had to bring Silvia to the repair man once and I'm not too sure what he fixed. But I recently found myself a passion for DIY programming and electronics.  I bought a raspberry pi B+ two years ago and used it as a server to log data about some gear at work. Then I had some other great plans that never happened and recently decided to convert it in a media server/ wifi repeater for hotel rooms where wifi was terrible. The media server thing never took off since I was travelling South America and couldn't find a decent way to build a remote that would make my girlfriend happier to use than my fire tv stick's.

So here I am with a new project for my pi. I want to build a web server that could monitor a Google calendar and power on my coffee machine in time so that when my alarm sounds, the coffee machine is already warm. Also, I'm tired of temperature surfing, so I would like to use my pi as a PID to control the thermostat of Silvia. As a bonus, I'd like to log/plot everything I can and find a way that my pi improves itself (time to turn on the machine, PID controller, etc). The goal here, is mostly to learn new things more than end up with improved brew and a remote controllable coffee machine.

Finally, I'm an intermediate python programmer and I fix computer and creative problems* as a day job but I have no knowledge of electronics and only basic knowledge of electricity. Everything I've been programming so far has been to fix very specific local issues on a local network of known machines. So I'm looking forward to use python for web programming.

*yeah... I mean, people have ideas then paint themselves in a corner and I have to fix them and the idea so that everyone is happy.

This is a test

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.