Monday, January 14, 2019

How To Add a Facebook Like Button to Blogger Posts



And a quick follow up to the previous post (Adding Facebook Like to Website)

How To Add A Facebook Like Button to Blogger Posts

Edit blogger template and paste the following after the last "<data:post.body/>"

<!-- Like Button -->
<br/><br/><iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.canonicalUrl + &quot;&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;font=arial&amp;colorscheme=light&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:100px; height:21px;'/>
<!-- Like Button -->






Adding Facebook Like to Website



Real quick tutorial on how to add a Facebook like to your site.

1. Go to https://developers.facebook.com/docs/plugins/like-button

2. Enter your site's URL to Like

3. Click "Get Code"

4. Edit your sites HTML and add the "Step 1" box of code to just below your <body> tag.  For Blogger, this would be "Edit Template".

5. Add the "Step 3" box of code in the place you wish to put the like button.  For Blogger, this would be add an HTML/Javascript Widget.






Saturday, June 23, 2018

Monday, June 4, 2018

Microsoft Buys GitHub



Microsoft Buys GitHub for $7.5 Billion


GitHub is a development platform inspired by the way you work. From open source to business, you can host and review code, manage projects, and build software alongside millions of other developers.





Wednesday, November 22, 2017

Proxy serial over TCP with socat

I recently needed to talk to a serial port from a remote system.  I found a Linux tool called socat - Multipurpose relay (SOcket CAT) that worked perfectly.  The target was a Raspberry Pi with a connected serial device.

To install socat on the Raspberry Pi, and the friend Ubuntu system:

sudo apt-get udpate
sudo apt-get install socat

On the Raspberry Pi I started the socat server with:

# socat tcp-listen:8000,reuseaddr,fork file:/dev/ttyUSB0,nonblock,waitlock=/var/run/tty0.lock,b115200,raw,echo=0

This will connect to the serial port, and stay connected after disconnected clients.

On the Ubuntu friend system I started the socat client with:

socat pty,link=/dev/ttyUSB0,waitslave tcp:pi.oeey.com:8000

After each disconnect the socat client will disconnect as well.  To keep it running, throw it in a loop:

# while true ; do socat pty,link=/dev/ttyUSB0,waitslave tcp:pi.oeey.com:8000 ; sleep .001 ; done

I then used tio (or minicom) to talk to the remote serial port:

# tio -b 115200 /dev/ttyUSB0
[tio 16:53:30] tio v1.20
[tio 16:53:30] Press ctrl-t q to quit
[tio 16:53:30] Connected

> I sent something to the serial port







minicom - friendly serial communication program


minicom

minicom - is a menu driven communications program. It emulates ANSI and VT102 terminals. It has a dialing directory and auto zmodem download.

Installation


# on RedHat based:
yum install minicom

# on Debian based:
sudo apt-get install minicom

Special Keys


# Menu
CTRL-A Z

# To Quit
CTRL-A Q

# To send (via xmodem/ymodem/zmodem)
CTRL-A S

# To receive (via xmodem/ymodem/zmodem)
CTRL-A R

# To configure
CTRL-A O

Command Line


# Bring up minicom configuration
minicom -s

# Connect to ttyUSB0 with 115200 baud rate
minicom -b 115200 -D /dev/ttyUSB0
The default configuration is 115200 8N1 with Hardware Flow Control. I usually disable Hardware Flow Control in my setting and save to the default 'df1'.

Tio


Although minicom describes itself as "friendly", it can be painful to setup and use.  As a suggestion, if you don't need send/receive abilities like xmodem, tio is much easier to use.

References