Skip to content

Instantly share code, notes, and snippets.

View plembo's full-sized avatar

Phil Lembo plembo

View GitHub Profile
@plembo
plembo / ROSFwdServiio.md
Last active April 16, 2018 16:38
RouterOS Port Forward for Serviio

Port forwarding for Serviio with RouterOS

Some Pro subscription services for the Serviio media server require Internet access.

On a network protected by a Mikrotik RouterOS device, this will probably need to be set up manually.

In the examples below the IP address of your local Serviio box is 10.0.0.5 and the router's Internet port is "ether-gateway".

In the graphical console

@plembo
plembo / ReadMdCmd.md
Created April 17, 2018 00:58
Read markdown at the command line

Read markdown on the command line

Neat trick I found in this Stack comment by @barry-staes:

pandoc README.md | lynx -stdin

Finally, a reason to start installing lynx on all my machines again.

@plembo
plembo / techdebtexp.md
Last active April 29, 2018 20:40
Technical debt explainers

Explaining Technical Debt

The Debt Metaphor

I thought borrowing money was a good idea, I thought that rushing software out the door to get some experience with it was a good idea, but that of course, you would eventually go back and as you learned things about that software you would repay that loan by refactoring the program to reflect your experience as you acquired it.

@plembo
plembo / pydoclikeperldoc.md
Created April 30, 2018 02:25
Pydoc is like perldoc

Pydoc is like perldoc

To get documentation for any given python module, do this

python -m pydoc <module_name>
@plembo
plembo / fccbalgorithms.md
Last active May 21, 2018 04:28
FCC Basic Algorithms

freeCodeCamp: Basic Algorithms

My lame answers to Basic Algorithms challenges on freeCodeCamp.

Reverse a String

function reverseString(str) {
  
  var a = str.split('');
  a = a.reverse();
 str = a.join('');
@plembo
plembo / telegramautoubuntu.md
Last active May 22, 2018 14:33
Install and autostart Telegram on Ubuntu

Install and autostart Telegram on Ubuntu

Tested on Ubuntu 16.04 LTS with Unity 7 desktop.

Download official Linux 64-bit binary package from https://desktop.telegram.org/.

Extract to /opt/Telegram (version is latest as of this writing):

sudo tar xJf tsetup.1.2.17.tar.xz -C /opt/
@plembo
plembo / latestgimp.md
Last active May 24, 2018 13:59
Getting the latest GIMP

Getting the latest GIMP

The GNU Image Manipulation Program may not quite be a PhotoShop killer, but for a lot of us it's close enough.

The latest version, v2.10.0 was release on 27 April 2018 and is a major improvement over previous versions.

Most Linux distributions still ship the previous version released in 2013, and as a result users who want to upgrade will have to find an alternative source.

The official package from the GIMP Project is in flatpak format.

That flatpak is hosted on Flathub.

@plembo
plembo / idswaprecipe.md
Last active June 2, 2018 15:49
Recipe for swappin ids on Linux

Recipe for swapping ids on Linux

Had to do this today on a rebuild of the home theater machine. Stupidly made theater the first user. That made it user 1000, group 1000. To make things consistent across my home network, I wanted to have my "myuser" user be uid and gid 1000 instead.

Basically followed the process described in this article.

Obviously, I needed to create myuser on the box and make them an admin (by adding to the "sudo" group), before I could do anything -- the theater user can't change its own ids.

Here's how I did it.

@plembo
plembo / 7zexamples-linux.md
Last active June 9, 2018 16:39
7z Examples for Linux

7z Examples for Linux

7zip on Linux is a port from Windows. The man page explicitly cautions against using it as a general purpose backup solution on Linux because it does not preserve file permissions. It can be more useful than Unix zip for creating cross-platform archives, however, as 7zip can be used to encrypt both data and filenames in an archive with strong 256-bit AEC encryption (Unix zip uses relatively weaker encryption limited to 96-bits for circa 2008 export compliance).

On Ubuntu, 7zip is suppled by the p7zip-full package.

As the result of syntax changes over the years anyone using 7zip on Linux should pay careful attention to its man pages and release notes.

@plembo
plembo / InternalCurrentDomain.md
Last active July 6, 2018 16:33
Internal Current Domain Record

Current Domain Record on internal DNS

Many simple Internet-facing web sites consist of a single host whose current domain (referred to as "@", or "$ORIGIN, in the zone file) is assigned the one A record for the domain, with subdomains like "www" assigned related CNAME records. For example, in the case of the "example.com" domain the DNS records might look like this:

@      IN     A      1h      35.207.55.147
www IN CNAME 1h .example.com.