Archived posts in ' "Hints"

Back home

Scalable Docker Monitoring with Fluentd, Elasticsearch and Kibana 4

11/21/2014

Screen Shot 2014-11-20 at 14.38.27

Docker is a great set of technologies. Once you are comfortable with using it, you are presented with a set of challenges, you didn’t have before. To name some:

  • log consolidation: How to retrieve log files from dozens of containers?
  • monitoring: How much RAM and CPU is each container using?

There are a few articles on this topic out there. After reading them none of the solutions really hit me, but they all had some nice features which I chose to combine here. Read the rest of this post »

No Comments

Linksnappy Command Line Downloader (Python)

11/15/2014

Simple Python script to download files via Linksnappy.

No Comments

md2pdf – Command line Markdown to PDF converter with support for CSS stylesheets and custom fonts, Python

11/8/2014

I like to write my notes and reports in Markdown and then send them out in PDF. Gimli worked OK for a while but rasterizes files and doesn’t work with UTF8-characters. I finally came across a similar project in Python and now I’m very happy with it. You can define a custom style sheet in your .profile and md2pdf will use it.

No Comments

Access Docker container attributes in Ansible

10/5/2014

Ansible is a great automation solution. I mainly use it to provision servers and launch Docker instances on them. Sometimes I need container attributes, like PID or Port to configure Nginx or monitoring tools.

While the Ansible documentation gives you some hints, I didn’t find it 100% obvious on how to solve this. Basically all your newly-created containers will end up in a list called docker_containers. It has the same structure as docker inspect.

For the PID:

For the host port:

So you could add a PID-file for a container like this:

Also read the full docs here.

No Comments

Use Mac OSX Password Generator from Terminal

10/5/2014

I really like the password generator, built into Apple’s keychain and System preferences. Passwords are secure and memorable. Only problem is that accessing it takes many steps. Running it from the command line would be much faster.

Read the rest of this post »

No Comments

Advanced monit: Keep track of daemons, websites, RAIDs and partitons

08/19/2014

Introduction

Are you already hosting your own mail- or webserver and do you enjoy the flexibility, control and freedom self-hosting gives you? Besides the many advantages like better privacy and the power to customize it gives you personally, you can also offer your services to other people. Even tough there are a large number of budget hosting companies, many customers are willing to pay for better support or the comfort to have you around for questions. Read the rest of this post »

No Comments

Defragment Mac OSX from Recovery Mode

07/20/2014

Despite some notions that SSDs or HFS drives don’t need defragmenting, I have often read and experienced myself that defragmenting your Mac every few years will clearly make it faster.

I had some trouble running iDefrag and would like to share a little trick I learnt. Basically it will refuse to run a full defrag, while your system drive is mounted. Restarting didn’t help. Here is what I did in the end:
Read the rest of this post »

No Comments

Use Java script Bookmarklet to save website data as CSV

06/3/2014

Many times I get upset with websites, who display accounting data in a table, but don’t offer a way to download it. This includes banks, payment processors, etc. Even if they offer it, there is a chance it’s the wrong format for your purpose. Read the rest of this post »

No Comments

Import single WordPress site into WordPress MU Installation

06/1/2014

When you have a large number of blogs to look after, it can be a challenge to keep on top with security updates for plugins and WordPress Core. At the same time the bad guys are getting faster and faster to exploit these kinds of holes. Read the rest of this post »

No Comments

Using Hinton diagrams to visualize stock market correlations

04/27/2014

hinton

Forecasts are rather difficult, especially when they’re about the future. Or so the saying goes. While predictiong returns is a pointless exercise, there is some value in keeping an eye on correlations.
Read the rest of this post »

No Comments

High-performance SSH: Install HPN-SSH on OSX with keychain integration

04/19/2014

I use SSH for pretty much anything from VPN, server administration, database connections or iPython work on remote machines. When working from weird places and with weird internet connections SSH become painfully slow. I already use Mosh, but that also relies on ordinary SSH to initiate the connection.

Pittsburgh University has this OpenSSH-patch to remove some bottlenecks and make it 1000% faster (they claim). Read the rest of this post »

1 Comment

Lazy admin’s guide to automated updates (Part 2: Python pip)

04/14/2014

Last week we discussed Linux Debian’s apt-get update mechanism and how to fully automate essential updates. This week I’d like to demonstrate how to do the same thing for Python. I admit that keeping Python packages up-to-date is probably not half as essential as keeping internet-facing server infrastructure updated. Nonetheless I like to work with the latest versions of packages, as they might fix problems or add features. Read the rest of this post »

No Comments

Lazy admin’s guide to automated updates (Part 1: Debian Linux)

04/10/2014

This week’s massive SSL-security vulnerability showed how important regular security updates for all of our software is. Because – let’s face it – today’s world is largely powered by software. Software that is written by humans, who make mistakes when writing it. The rule should be: retire it or update it. Read the rest of this post »

No Comments

Pleasant places to live in China, Germany and Austria

02/5/2014

This morning I came across this post by Kelly Norton. He calculated the number of ‘pleasant’ days for each US zip-code area. California seems to win the race with more than 180 ‘pleasant’ days each year. A pleasant day is defined by the min- and max temperature not exceeding certain limits.
Read the rest of this post »

No Comments

Introducing: (A)SPEL web stack

01/12/2014

I’d like to officially name my current dev stack:

A.. for AngularJS. Drives the user frontend.
S.. for Supervisord. Takes care of processes.
P.. for Python. Quick way to implement almost any business logic.
E.. for Nginx. Fast web server for static files and to add SSL.
L.. for Linux.

No Comments