summaryrefslogtreecommitdiffstats
path: root/content/posts
diff options
context:
space:
mode:
Diffstat (limited to 'content/posts')
-rw-r--r--content/posts/git-on-rhel5.rst39
-rw-r--r--content/posts/piwik-in-docker-for-pelican.rst95
-rw-r--r--content/posts/recover-softraidlvm.rst2
-rw-r--r--content/posts/revive-euer-blog.rst92
-rw-r--r--content/posts/utf8-irssi-madness.rst15
5 files changed, 236 insertions, 7 deletions
diff --git a/content/posts/git-on-rhel5.rst b/content/posts/git-on-rhel5.rst
new file mode 100644
index 0000000..d46229f
--- /dev/null
+++ b/content/posts/git-on-rhel5.rst
@@ -0,0 +1,39 @@
+Install GIT on RHEL5 without Internet
+#####################################
+:date: 2014-02-18 13:37
+:tags: rhel, git
+
+I was facing the problem that i desperately needed git on one of the
+development Redhat 5 systems which had no direct internet connection. As EPEL is an open
+repository to retrieve all kinds of cool packages also Git is available there.
+All i needed to do was to find out the dependencies, copy the packages to the
+host and you are done.
+
+You need the following packages:
+
+- git (EPEL)
+ - perl-Git (dep) (EPEL)
+ - perl-error (EPEL)
+ - perl-termreadkey (EPEL)
+ - perl (installed in my case) (core)
+
+Today (2014-02-18) i downloaded the following packages:
+
+.. code-block:: bash
+
+ #?/bin/sh
+ # on internet-available node:
+ wget 'http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/perl-Error-0.17010-1.el5.noarch.rpm' \
+ 'http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/perl-TermReadKey-2.30-4.el5.x86_64.rpm' \
+ 'http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/perl-Git-1.8.2.1-1.el5.x86_64.rpm' \
+ 'http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/git-1.8.2.1-1.el5.x86_64.rpm' \
+ # you may need this as well.
+ # http://mirror.bytemark.co.uk/centos/5.10/os/x86_64/CentOS/perl-5.8.8-41.el5.x86_64.rpm
+ scp *.rpm <lab-host>:~
+ ssh <lab-host>
+ sudo rpm -i *.rmp
+
+If they go 404 have a look at
+http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/ for EPEL (replace
+5Server with 6Server for RHEL6) and http://mirror.bytemark.co.uk/centos/ for
+core packages for RHEL.
diff --git a/content/posts/piwik-in-docker-for-pelican.rst b/content/posts/piwik-in-docker-for-pelican.rst
new file mode 100644
index 0000000..1bf5df0
--- /dev/null
+++ b/content/posts/piwik-in-docker-for-pelican.rst
@@ -0,0 +1,95 @@
+Piwik for this blog
+####################
+:date: 2014-02-18 08:00
+:tags: piwik, docker, pelican
+
+I was looking for a simple analytics tool for this blog. As everyone seems to
+be using **piwik** and everyone loves **docker** for rapid deployment. As i am
+always short on resources on all my machines i decided to deploy piwik on
+another of my VMs which is ``mediengewitter.krebsco.de`` instead of directly on
+``euer.krebsco.de`` Again it was a case of 'how-hard-can-it-be?'.
+Turns out everything is much harder than expected.
+As always this this is the digest of some hours work.
+
+Installing piwik in docker
+==========================
+After testing out all kinds of non-working Dockerfiles, this is what worked for
+me:
+
+.. code-block:: bash
+
+ git clone https://github.com/makefu/docker-piwik.git piwik
+ cd piwik
+ ./build
+
+ # if you want persistence, see:
+ mkdir -p /media/ext/piwik/{www,mysql}
+ cat README
+
+Running piwik
+=============
+Because docker handles it's own network, the docker image port 80 must be
+forwarded to the host (i use 10000). Also i want data persistence via exported filesystems.
+
+.. code-block:: bash
+
+ docker run -p=10000:80 -d
+ \ -v /media/ext/piwik/www:/var/www
+ \ -v /media/ext/piwik/mysql:/var/lib/mysql piwik
+ # or ./run
+
+Adding piwik to pelican
+=======================
+Integration of piwik tracking to pelican **should** be straight forward, just
+add the following to your ``pelicanconf.py``:
+
+.. code-block:: python
+
+ PIWIK_URL='mediengewitter.krebsco.de:10000'
+ # first piwik site is always id 1
+ PIWIK_SITE_ID=1
+
+Bit nothing seemed to be happening, turns out my theme of choice does not
+support piwik so i had to add this feature explicitly to the skin (by stealing
+the code from another theme). I created a pull request for my code:
+https://github.com/getpelican/pelican-themes/pull/195 .
+If it will never be merged, use my repository for themes:
+
+.. code-block:: bash
+
+ cd <pelican-dir>
+ git clone git@github.com:makefu/pelican-themes.git -b add-piwik-to-gum themes
+
+Add piwik to another skin
+=========================
+If you are using another skin without piwik integration, this is basically what you
+need to do:
+
+1. Add piwik.html to '``<skin>/templates``'
+
+.. code-block:: html
+
+ {% if PIWIK_URL and PIWIK_SITE_ID %}
+ <script type="text/javascript">
+ {% if PIWIK_SSL_URL %}
+ var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ PIWIK_SSL_URL }}/" : "http://{{ PIWIK_URL }}/");
+ {% else %}
+ var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ PIWIK_URL }}/" : "http://{{ PIWIK_URL }}/");
+ {% endif %}
+ document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+ </script><script type="text/javascript">
+ try {
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {{ PIWIK_SITE_ID }});
+ piwikTracker.trackPageView();
+ piwikTracker.enableLinkTracking();
+ } catch( err ) {}
+ </script><noscript><p><img src="http://{{ PIWIK_URL }}/piwik.php?idsite={{ PIWIK_SITE_ID }}" style="border:0" alt="" /></p></noscript>
+ {% endif %}
+
+2. Add this line somewhere near the end but before </body></html> to '``<skin>/templates/base.html``':
+
+.. code-block:: html
+
+ ...
+ {% include 'piwik.html' %}
+ ...
diff --git a/content/posts/recover-softraidlvm.rst b/content/posts/recover-softraidlvm.rst
index efc070d..a2cd31a 100644
--- a/content/posts/recover-softraidlvm.rst
+++ b/content/posts/recover-softraidlvm.rst
@@ -1,6 +1,6 @@
Recover Softraid/LVM
####################
-Date: 2012-02-06 10:24
+:date: 2012-02-06 10:24
:tags: mdadm, softraid, lvm
MD Array fails to assemble
diff --git a/content/posts/revive-euer-blog.rst b/content/posts/revive-euer-blog.rst
new file mode 100644
index 0000000..a6470ce
--- /dev/null
+++ b/content/posts/revive-euer-blog.rst
@@ -0,0 +1,92 @@
+Revive this Blog
+##################################
+:date: 2013-02-17 14:26
+:tags: openssh, dropbear
+
+2 years ago i lost this blog in an unexpected VPS shutdown and of course i had
+no backups (duh!) and had not used any kind of version management.
+Thanks to archive.org at least the content of the blog left intact. I guess
+that's why it is sometimes called **'The WaybackUp Machine'**.
+
+My old blog can be found at
+https://web.archive.org/web/20121213091551/http://euer.krebsco.de/ and
+even the rss feed is intact.
+
+
+The old blog was created using **octopress**, a static site generator written in
+ruby. Because the markdown files were essentially lost i thought it is time to
+try out something new.
+I chose **pelican**, a static site generator written in python because in a
+worst-case scenario i could fix the python code. I will also test out
+reStructured Text instead of Markdown.
+
+Installation of pelican
+-----------------------
+
+.. code-block:: bash
+
+ #?/bin/sh
+ virtualenv my-blog
+ cd my-blog
+ . bin/activate
+ pip install pelican
+ pelican-quickstart
+ ...
+
+Importing RSS
+-------------
+Pelican supports importing old rss feeds.
+I tried importing the archive.org rss feed but besides the date and title of
+the post and the date the markup was pretty much broken, the code with line
+numbering resulted in a broken <pre>-table. This happens for rst and markdown
+output.
+
+In addition the importer uses pandoc, a haskell markup transformer which is
+with all dependencies like 100mb in size.
+
+For the records here is what was needed:
+
+.. code-block:: bash
+
+ #? /bin/sh
+ . bin/activate
+ yaourt -Sy aur/pandoc-static
+ pelican-import --feed https://web.archive.org/web/20120709004415/http://euer.krebsco.de/atom.xml -o content/posts
+ # cleanup all the posts in content/posts
+
+Configure pelican
+-----------------
+Pelican needs to be configured in ``pelicanconf.py``:
+
+.. code-block:: python
+
+ AUTHOR = 'makefu'
+ SITENAME = 'only code is pure'
+ # rss feed to be built
+ FEED_ALL_ATOM = 'feeds/all.atom.xml'
+ # for RSS in the headline
+ MENUITEMS = (( 'RSS', '/feeds/all.atom.xml'),)
+
+ # add robots.txt
+ STATIC_PATHS = [ 'extra/robots.txt', ]
+ EXTRA_PATH_METADATA = { 'extra/robots.txt': {'path': 'robots.txt'}, }
+
+ # twitter link
+ SOCIAL = (('@makefoo', 'http://twitter.com/makefoo') ,)
+ # add disqus comments
+ DISQUS_SITENAME = 'euer'
+ # all the other lines of config
+
+
+Configure themes
+----------------
+Themes need to be retrieved separately.
+
+.. code-block:: bash
+
+ #? /bin/sh
+ # omit --recursive for a subset, gum is in the core
+ git clone --recursive https://github.com/getpelican/pelican-themes themes
+
+ # add the theme line to pelicanconf
+ echo 'THEME="themes/gum"' >> pelicanconf.py
diff --git a/content/posts/utf8-irssi-madness.rst b/content/posts/utf8-irssi-madness.rst
index 5b6fb87..fb86115 100644
--- a/content/posts/utf8-irssi-madness.rst
+++ b/content/posts/utf8-irssi-madness.rst
@@ -1,25 +1,27 @@
-Title: Utf8 in an Irssi/tmux/putty/windows Stack
-Date: 2012-06-22
-Tags: irssi, utf8
+Utf8 in an Irssi/tmux/putty/windows Stack
+#########################################
+:date: 2012-06-22 00:00
+:tags: irssi, utf8
Getting irssi running with utf8 support in a putty/tmux stack is madness. Here
is what you have to do.
add lines in .{ba,z}shrc:
- :::bash
+.. code-block:: bash
+
export LANG=en_US.utf8
export LC_ALL=en_US.utf8
add lines in .tmux.conf:
+.. code-block:: bash
- :::bash
set-option -g default-terminal "rxvt"
set-window-option -g utf8 on
in irssi:
+.. code-block:: bash
- :::bash
/set term_charset UTF-8
/set recode_autodetect_utf8 ON
/set recode_fallback UTF-8
@@ -30,6 +32,7 @@ in irssi:
/quit
in putty config:
+.. code-block:: bash
window -> translation -> Received data assumed to be in which character set: UTF-8
-> Use Unicode line drawing code points