Browse Source

Convert the whole site to use Pelican instead of Jekyll

master
Gergely Polonkai 8 months ago
parent
commit
d5c1c942f0
No known key found for this signature in database GPG Key ID: 38F402C8471DDE93
100 changed files with 241 additions and 5620 deletions
  1. +0
    -3
      .bundle/config
  2. +2
    -4
      .gitignore
  3. +0
    -2
      .hyde.el
  4. +0
    -11
      404.md
  5. +0
    -1
      CNAME
  6. +0
    -5
      Gemfile
  7. +0
    -78
      Gemfile.lock
  8. +74
    -0
      Makefile
  9. +14
    -0
      Pipfile
  10. +151
    -0
      Pipfile.lock
  11. +0
    -10
      README.md
  12. +0
    -18
      _config.yml
  13. +0
    -55
      _data/contacts.yaml
  14. +0
    -1738
      _data/symbolon.json
  15. +0
    -5
      _drafts/cut-at-ten.md
  16. +0
    -15
      _drafts/gtk-actionable-in-action.md
  17. +0
    -17
      _drafts/measuring-coverage-with-codecov-for-libtool-projects.md
  18. +0
    -326
      _drafts/writing-a-gnome-shell-extension.md
  19. +0
    -67
      _drafts/writing-an-sdk.md
  20. +0
    -27
      _includes/about.html
  21. +0
    -46
      _includes/blog-post.html
  22. +0
    -16
      _includes/head.html
  23. +0
    -35
      _includes/header.html
  24. +0
    -17
      _includes/pagination.html
  25. +0
    -9
      _includes/post-list.html
  26. +0
    -4
      _includes/read_time.html
  27. +0
    -11
      _includes/tag-link.html
  28. +0
    -115
      _layouts/default.html
  29. +0
    -15
      _layouts/page.html
  30. +0
    -16
      _layouts/post.html
  31. +0
    -15
      _layouts/posts-by-tag.html
  32. +0
    -8
      _layouts/story.html
  33. +0
    -43
      _make_tags.sh
  34. +0
    -29
      _posts/2011-05-12-ethical-hacking-2011.markdown
  35. +0
    -88
      _posts/2011-05-12-gentoo-hardened-desktop-with-gnome-3-round-one.markdown
  36. +0
    -35
      _posts/2011-05-13-zabbix-performance-tip.markdown
  37. +0
    -29
      _posts/2011-05-18-gentoo-hardened-desktop-with-gnome-3-round-two.markdown
  38. +0
    -41
      _posts/2011-05-27-citrix-xenserver-vs-debian-5-0-upgrade-to-6-0.markdown
  39. +0
    -25
      _posts/2011-05-27-oracle-database-incompatible-with-oracle-linux.markdown
  40. +0
    -22
      _posts/2011-06-10-proxy-only-non-existing-files-with-mod-proxy-and-mod-rewrite.markdown
  41. +0
    -30
      _posts/2011-09-18-inverse-of-sort.markdown
  42. +0
    -16
      _posts/2011-12-11-why-you-should-always-test-your-software-with-production-data.markdown
  43. +0
    -29
      _posts/2012-03-20-php-5-4-released.markdown
  44. +0
    -34
      _posts/2012-03-27-fast-world-fast-updates.markdown
  45. +0
    -28
      _posts/2012-06-14-wordpress-madness.markdown
  46. +0
    -28
      _posts/2012-06-18-ssh-login-failed-on-red-hat-enterprise-linux-6-2.markdown
  47. +0
    -35
      _posts/2012-06-22-upgrades-requiring-a-reboot-on-linux-at-last.markdown
  48. +0
    -80
      _posts/2012-09-05-some-thoughts-about-that-dead-linux-desktop.markdown
  49. +0
    -76
      _posts/2012-09-07-how-to-start-becoming-a-web-developer.markdown
  50. +0
    -19
      _posts/2012-09-10-do-not-track-in-ie10-vs-apache.markdown
  51. +0
    -64
      _posts/2012-09-16-symfony-2-create-role-and-class-based-acls-with-your-roles-coming-from-the-orm.markdown
  52. +0
    -25
      _posts/2012-10-07-smsgateway-and-smssender.markdown
  53. +0
    -20
      _posts/2012-10-13-changing-the-session-cookie-s-name-in-symfony-2.markdown
  54. +0
    -22
      _posts/2012-12-20-symfony-2-configuration-array-of-associative-arrays.markdown
  55. +0
    -14
      _posts/2013-01-05-development-man-pages-on-fedora.markdown
  56. +0
    -32
      _posts/2013-01-06-registering-an-enum-type-in-glib-s-type-system.markdown
  57. +0
    -17
      _posts/2013-01-14-git-rm-cached-madness.markdown
  58. +0
    -52
      _posts/2013-01-17-jms-diextrabundle-s-greppatternfinder-grep-exits-with-status-code-2-on-fedora-18.markdown
  59. +0
    -32
      _posts/2013-02-19-mount-device-or-resource-busy-after-enabling-multipath.markdown
  60. +0
    -27
      _posts/2013-02-27-why-i-stopped-using-annotation-based-routing-in-symfony-today.markdown
  61. +0
    -62
      _posts/2013-03-01-programming-as-i-see-it.markdown
  62. +0
    -38
      _posts/2013-03-05-fedora-can-t-change-active-directory-password-via-kpasswd.markdown
  63. +0
    -17
      _posts/2013-03-05-haversine-in-mysql.markdown
  64. +0
    -28
      _posts/2013-03-13-dvorak-and-me.markdown
  65. +0
    -28
      _posts/2013-04-09-renaming-a-symfony-2-bundle.markdown
  66. +0
    -111
      _posts/2013-05-06-installing-otrs-in-fedora-18-with-selinux-enabled.markdown
  67. +0
    -30
      _posts/2013-09-16-swe-glib-final-release.markdown
  68. +0
    -25
      _posts/2013-09-24-from-symfony-to-django-in-two-days.markdown
  69. +0
    -29
      _posts/2013-11-05-first-impressions-of-windows-8.markdown
  70. +0
    -33
      _posts/2014-07-18-list-git-branches-and-their-remote-tracking-branches-side-by-side.markdown
  71. +0
    -36
      _posts/2014-08-16-registering-an-enum-type-in-glib-glib-mkenums-magic.markdown
  72. +0
    -16
      _posts/2014-09-17-nyanmacs.markdown
  73. +0
    -25
      _posts/2014-10-07-rounding-numbers-to-n-decimals-in-emacs.markdown
  74. +0
    -46
      _posts/2015-02-26-using-git-bisect-to-find-the-first-good-commit.markdown
  75. +0
    -23
      _posts/2015-04-25-good-bye-digital-ocean-hello-again-github.markdown
  76. +0
    -32
      _posts/2015-04-28-cross-browser-border-radius-sass-mixin-with-varargs.markdown
  77. +0
    -39
      _posts/2015-06-07-paramconverter-a-la-django.markdown
  78. +0
    -20
      _posts/2015-08-19-foss-failmeter.md
  79. +0
    -228
      _posts/2015-08-27-how-my-email-gets-to-that-other-guy.markdown
  80. +0
    -53
      _posts/2016-01-13-emacs-implement-a-gobject-s-virtual-function.md
  81. +0
    -33
      _posts/2016-02-26-vala-interface-madness.md
  82. +0
    -46
      _posts/2016-09-28-emacs-package-to-generate-gobject-boilerplate.md
  83. +0
    -65
      _posts/2016-10-04-git-merge-stages.md
  84. +0
    -98
      _posts/2016-11-03-how-i-started-with-emacs.md
  85. +0
    -27
      _posts/2016-11-10-edit-file-as-other-user-in-emacs.md
  86. +0
    -28
      _posts/2016-11-18-get-passwords-from-id-manager.md
  87. +0
    -47
      _posts/2016-11-30-add-python-docstring-to-the-beginning-of-anything.md
  88. +0
    -20
      _posts/2016-12-08-slugify-in-python3.md
  89. +0
    -115
      _posts/2016-12-22-finding-non-translated-strings-in-python-code.md
  90. +0
    -34
      _posts/2017-01-02-rename-automatically-named-foreign-keys-with-alembic.md
  91. +0
    -91
      _posts/2017-03-26-category-based-logging-with-flask.md
  92. +0
    -27
      _posts/2017-10-02-add-sysadmin-day-to-emacs-calendar.md
  93. +0
    -37
      _posts/2018-07-19-recurring-events.md
  94. +0
    -214
      _posts/2018-07-26-check-if-last-git-commit-has-test-coverage.md
  95. +0
    -58
      _posts/_md-to-org.py
  96. +0
    -30
      about.html
  97. +0
    -30
      blog/atom.xml
  98. +0
    -12
      blog/index.html
  99. +0
    -4
      blog/tag/active-directory.md
  100. +0
    -4
      blog/tag/apache.md

+ 0
- 3
.bundle/config View File

@@ -1,3 +0,0 @@
---
BUNDLE_PATH: "vendor"
BUNDLE_DISABLE_SHARED_GEMS: "true"

+ 2
- 4
.gitignore View File

@@ -1,4 +1,2 @@
/vendor
_site/
/.bundle
/vendor
/output/
/gergelypolonkaieu_site.egg-info/

+ 0
- 2
.hyde.el View File

@@ -1,2 +0,0 @@
(setq hyde/git/remote "origin"
hyde/git/remote-branch "master")

+ 0
- 11
404.md View File

@@ -1,11 +0,0 @@
---
layout: page
title: Not Found
permalink: /404.html
---

The page you are looking for is not here. Maybe it was but I have removed it. Most likely it was intentionally. If you think I made a mistake, please tell me.

{% if page.url contains '/akarmi' %}
If you are looking for the pictures that used to be here, you should definitely contact me. For reasons.
{% endif %}

+ 0
- 1
CNAME View File

@@ -1 +0,0 @@
gergely.polonkai.eu

+ 0
- 5
Gemfile View File

@@ -1,5 +0,0 @@
source 'https://rubygems.org'

gem 'jekyll'
gem 'jekyll-gist'
gem 'jekyll-paginate'

+ 0
- 78
Gemfile.lock View File

@@ -1,78 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
faraday (0.17.0)
multipart-post (>= 1.2, < 3)
ffi (1.11.1)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.7.0)
concurrent-ruby (~> 1.0)
jekyll (4.0.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (>= 0.9.5, < 2)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 1.8)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-paginate (1.1.0)
jekyll-sass-converter (2.0.1)
sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.1.0)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
multipart-post (2.1.1)
octokit (4.14.0)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
rouge (3.12.0)
safe_yaml (1.0.5)
sassc (2.2.1)
ffi (~> 1.9)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.6.0)

PLATFORMS
ruby

DEPENDENCIES
jekyll
jekyll-gist
jekyll-paginate

BUNDLED WITH
2.0.2

+ 74
- 0
Makefile View File

@@ -0,0 +1,74 @@
PY?=python3
PELICAN?=pelican
PELICANOPTS=

BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/output
CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py

DEBUG ?= 0
ifeq ($(DEBUG), 1)
PELICANOPTS += -D
endif

RELATIVE ?= 0
ifeq ($(RELATIVE), 1)
PELICANOPTS += --relative-urls
endif

help:
@echo 'Makefile for a pelican Web site '
@echo ' '
@echo 'Usage: '
@echo ' make html (re)generate the web site '
@echo ' make clean remove the generated files '
@echo ' make regenerate regenerate files upon modification '
@echo ' make publish generate using production settings '
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
@echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 '
@echo ' make devserver [PORT=8000] serve and regenerate together '
@echo ' make ssh_upload upload the web site via SSH '
@echo ' make rsync_upload upload the web site via rsync+ssh '
@echo ' '
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
@echo ' '

html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)

clean:
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)

regenerate:
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)

serve:
ifdef PORT
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
else
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
endif

serve-global:
ifdef SERVER
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b $(SERVER)
else
$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b 0.0.0.0
endif


devserver:
ifdef PORT
$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
else
$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
endif

publish:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)


.PHONY: html help clean regenerate serve serve-global devserver publish

+ 14
- 0
Pipfile View File

@@ -0,0 +1,14 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
pelican = {extras = ["markdown"],version = "*"}
gergelypolonkaieu-site = {editable = true,path = "."}
typogrify = "*"

[requires]
python_version = "3.7"

+ 151
- 0
Pipfile.lock View File

@@ -0,0 +1,151 @@
{
"_meta": {
"hash": {
"sha256": "3848a327090b82fa6faf252335283a4c4648c0848fcf02cd841428b45a36c238"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"blinker": {
"hashes": [
"sha256:471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6"
],
"version": "==1.4"
},
"docutils": {
"hashes": [
"sha256:6c4f696463b79f1fb8ba0c594b63840ebd41f059e92b31957c46b74a4599b6d0",
"sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827",
"sha256:a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99"
],
"version": "==0.15.2"
},
"feedgenerator": {
"hashes": [
"sha256:5ae05daa9cfa47fa406ee4744d0b7fa1c8a05a7a47ee0ad328ddf55327cfb106"
],
"version": "==1.9"
},
"gergelypolonkaieu-site": {
"editable": true,
"path": "."
},
"jinja2": {
"hashes": [
"sha256:74320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f",
"sha256:9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de"
],
"version": "==2.10.3"
},
"markdown": {
"hashes": [
"sha256:2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a",
"sha256:56a46ac655704b91e5b7e6326ce43d5ef72411376588afa1dd90e881b83c7e8c"
],
"version": "==3.1.1"
},
"markupsafe": {
"hashes": [
"sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473",
"sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161",
"sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235",
"sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5",
"sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff",
"sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b",
"sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1",
"sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e",
"sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183",
"sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66",
"sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1",
"sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1",
"sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e",
"sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b",
"sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905",
"sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735",
"sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d",
"sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e",
"sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d",
"sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c",
"sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21",
"sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2",
"sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5",
"sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b",
"sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6",
"sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f",
"sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f",
"sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"
],
"version": "==1.1.1"
},
"pelican": {
"extras": [
"markdown"
],
"hashes": [
"sha256:656d8ff9f778951f4e317c9e6530e92b02698c5961ebf019c583775a30f857f6",
"sha256:be7ea9a09311374322b5579c88975ae003409e40c833e761780a0d0dbd84e756"
],
"index": "pypi",
"version": "==4.2.0"
},
"pygments": {
"hashes": [
"sha256:71e430bc85c88a430f000ac1d9b331d2407f681d6f6aec95e8bcfbc3df5b0127",
"sha256:881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297"
],
"version": "==2.4.2"
},
"python-dateutil": {
"hashes": [
"sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c",
"sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"
],
"version": "==2.8.1"
},
"pytz": {
"hashes": [
"sha256:1c557d7d0e871de1f5ccd5833f60fb2550652da6be2693c1e02300743d21500d",
"sha256:b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be"
],
"version": "==2019.3"
},
"six": {
"hashes": [
"sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c",
"sha256:d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73"
],
"version": "==1.12.0"
},
"smartypants": {
"hashes": [
"sha256:8db97f7cbdf08d15b158a86037cd9e116b4cf37703d24e0419a0d64ca5808f0d"
],
"version": "==2.0.1"
},
"typogrify": {
"hashes": [
"sha256:8be4668cda434163ce229d87ca273a11922cb1614cb359970b7dc96eed13cb38"
],
"index": "pypi",
"version": "==2.0.7"
},
"unidecode": {
"hashes": [
"sha256:1d7a042116536098d05d599ef2b8616759f02985c85b4fef50c78a5aaf10822a",
"sha256:2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8"
],
"version": "==1.1.1"
}
},
"develop": {}
}

+ 0
- 10
README.md View File

@@ -1,10 +0,0 @@
# gergely.polonkai.eu

## Initial start

```
git clone $REPO
cd $REPO
bundle install --path vendor/bundle
bundle exec jekyll server
```

+ 0
- 18
_config.yml View File

@@ -1,18 +0,0 @@
# Site settings
title: Gergely Polonkai
email: gergely@polonkai.eu
description: "developer, systems engineer and administrator"
url: "http://gergely.polonkai.eu"
timezone: Europe/Budapest
name: Gergely Polonkai
paginate: 10
paginate_path: "/blog/page/:num"
exclude: ['README.md', 'Gemfile', 'Gemfile.lock', 'CNAME', ".hyde.el", "vendor"]
include: ['.well-known']
plugins:
- jekyll-gist
- jekyll-paginate

# Build settings
markdown: kramdown
permalink: pretty

+ 0
- 55
_data/contacts.yaml View File

@@ -1,55 +0,0 @@
- text: E-mail
link: mailto:gergely@polonkai.eu
image: email.png
icon: envelope-o
- text: Stack Exchange
link: http://stackexchange.com/users/1369500/gergelypolonkai
image: stackexchange.png
icon: stack-exchange
- text: LinkedIn
link: http://www.linkedin.com/in/gergelypolonkai
image: linkedin.png
icon: linkedin
- text: Skype
link: skype:gergely.polonkai
image: skype.png
icon: skype
- text: Facebook
link: http://facebook.com/Polesz
image: facebook.png
icon: facebook
- text: Google+
link: https://plus.google.com/+GergelyPolonkai/about
image: google_plus.png
icon: google-plus
- text: Twitter
link: http://twitter.com/GergelyPolonkai
image: twitter.png
icon: twitter
- text: Tumblr
link: http://gergelypolonkai.tumblr.com
image: tumblr.png
icon: tumblr
- text: deviantArt
link: http://gergelypolonkai.deviantart.com
image: deviantart.png
icon: deviantart
- text: Hashnode
link: https://hashnode.com/@gergelypolonkai
image: hashnode.png
- text: Keybase
link: https://keybase.io/gergelypolonkai
image: keybase.png
icon: keybase
- text: Liberapay
link: https://liberapay.com/gergelypolonkai
image: liberapay.png
icon: liberapay
- text: Mastodon
link: https://social.polonkai.eu/@gergely
image: mastodon.png
icon: mastodon
- text: Pay me a coffee
link: https://paypal.me/GergelyPolonkai/250
image: paypal.png
icon: paypal

+ 0
- 1738
_data/symbolon.json
File diff suppressed because it is too large
View File


+ 0
- 5
_drafts/cut-at-ten.md View File

@@ -1,5 +0,0 @@
``` lisp
(defun cut-at-ten ()
(while (re-search-forward "," (save-excursion (end-of-line) (point)) t 10)
(newline-and-indent)))
```

+ 0
- 15
_drafts/gtk-actionable-in-action.md View File

@@ -1,15 +0,0 @@
---
layout: post
title: "GtkActionable in action"
author:
name: "Gergely Polonkai"
email: "gergely@polonkai.eu"
---

I have seen several people (including myself) struggling with
disabling/enabling menu items, toolbar buttons and similar UI
interfaces based on different conditions. It gets even worse if there
are multiple representations of the same action in the same
application, e.g. a menu item and a toolbar button exists for the same
action. But with GTK+ 3.4, we have GtkAction, which is exactly for
this kind of situations.

+ 0
- 17
_drafts/measuring-coverage-with-codecov-for-libtool-projects.md View File

@@ -1,17 +0,0 @@
---
layout: post
title: "Measuring code coverage with codecov for libtool projects"
author:
name: "Gergely Polonkai"
email: "gergely@polonkai.eu"
---

I have recently found [codecov][https://codecov.io/]; they offer free
services for public GitHub projects. As I have recently started writing
tests for my SWE-GLib project, I decided to give it a go. Things are not
this easy if you use GNU Autotools and libtool, though…

The problem here is that these tools generate output under `src/.libs/`
(given that your sources are under `src/`) and `gcov` has hard times
finding the coverage data files. Well, at least in the codecov
environment, it works fine on my machine.

+ 0
- 326
_drafts/writing-a-gnome-shell-extension.md View File

@@ -1,326 +0,0 @@
---
layout: post
title: "Writing a GNOME Shell extension"
---

I could not find a good tutorial on how to write a GNOME Shell
extension. There is a so called step by step
[instruction list](https://wiki.gnome.org/Projects/GnomeShell/Extensions/StepByStepTutorial)
on how to do it, but it has its flaws, including grammar and clearance.
As I wanted to create an extension for my SWE GLib library to display
the current position of some planets, I dug into existing (and working)
extensions’ source code and made up something. Comments welcome!

---

GNOME Shell extensions are written in JavaScript and are interpreted
by [GJS](https://wiki.gnome.org/action/show/Projects/Gjs). Using
introspected libraries from JavaScript is not a problem for me (see
SWE GLib’s
[Javascript example](https://github.com/gergelypolonkai/swe-glib/blob/master/examples/basic.js);
it’s not beautiful, but it’s working), but wrapping your head around
the Shell’s concept can take some time.

The Shell is a Clutter stage, and all the buttons (including the
top-right “Activities” button) are actors on this stage. You can add
practically anything to the Shell panel that you can add to a Clutter
stage.

The other thing to remember is the lifecycle of a Shell
extension. After calling `init()`, there are two ways forward: you
either use a so called extension controller, or plain old JavaScript
functions `enable()` and `disable()`; I will go on with the former
method for reasons discussed later.

If you are fine with the `enable()`/`disable()` function version, you
can ease your job with the following command:

```
gnome-shell-extension-tool --create-extension
```

This will ask you a few parameters and create the necessary files for
you. On what these parameters should look like, please come with me to
the next section.

## Placement and naming

Extensions reside under `$HOME/.local/share/gnome-shell/extensions`,
where each of them have its own directory. The directory name has to be
unique, of course; to achieve this, they are usually the same as the
UUID of the extension.

The UUID is a string of alphanumeric characters, with some extras added.
Generally, it should match this regular expression:
`^[-a-zA-Z0-9@._]+$`. The convention is to use the form
`extension-name@author-id`, e.g. `Planets@gergely.polonkai.eu`. Please
see
[this link](https://wiki.gnome.org/Projects/GnomeShell/Extensions/UUIDGuidelines)
for some more information about this.

## Anatomy of an extension

Extensions consist of two main parts, `metadata.json` and
`extension.js`.

The `metadata.json` file contains compatibility information and, well,
some meta data:

```json
{
"shell-version": ["3.18"],
"uuid": "planets@gergely.polonkai.eu",
"name": "Planets",
"description": "Display current planet positions"
}
```

Here, `shell-version` must contain all versions of GNOME Shell that is
known to load and display your extension correctly. You can insert minor
versions here, like I did, or exact version numbers, like `3.18.1`.

In the `extension.js` file, which contains the actual extension code,
the only thing you actually need is an `init()` function:

```javascript
function init(extensionMeta) {
// Do whatever it takes to initialize your extension, like
// initializing the translations. However, never do any widget
// magic here yet.

// Then return the controller object
return new ExtensionController(extensionMeta);
}
```

## Extension controller

So far so good, but what is this extension controller thing? It is an
object which is capable of managing your GNOME Shell extension. Whenever
the extension is loaded, its `enable()` method is called; when the
extension is unloaded, you guessed it, the `disable()` method gets
called.

```javascript
function ExtensionController(extensionMeta) {
return {
extensionMeta: extensionMeta,
extension: null,

enable: function() {
this.extension = new PlanetsExtension(this.extensionMeta);

Main.panel.addToStatusArea("planets",
this.extension,
0, "right");
},

disable: function() {
this.extension.actor.destroy();
this.extension.destroy();

this.extension = null;
}
}
}
```

This controller will create a new instance of the `PlanetsExtension`
class and add it to the panel’s right side when loaded. Upon
unloading, the extension’s actor gets destroyed (which, as you will
see later, gets created behind the scenes, not directly by us),
together with the extension itself. Also, for safety measures, the
extension is set to `null`.

## The extension

The extension is a bit more tricky, as, for convenience reasons, it
should extend an existing panel widget type.

```javascript
function PlanetsExtension(extensionMeta) {
this._init(extensionMeta);
}

PlanetsExtension.prototype = {
__proto__ = PanelMenu.Button.prototype,

_init: function(extensionMeta) {
PanelMenu.Button.prototype._init.call(this, 0.0);

this.extensionMeta = extensionMeta;

this.panelContainer = new St.BoxLayout({style_class: 'panel-box'});
this.actor.add_actor(this.panelContainer);
this.actor.add_style_class_name('panel-status-button');

this.panelLabel = new St.Label({
text: 'Loading',
y_align: Clutter.ActorAlign.CENTER
});

this.panelContainer.add(this.panelLabel);
}
};
```

Here we extend the Button class of panelMenu, so we will be able to do
some action upon activate.

The only parameter passed to the parent’s `_init()` function is
`menuAlignment`, with the value `0.0`, which is used to position the
menu arrow. (_Note: I cannot find any documentation on this, but it
seems that with the value `0.0`, a menu arrow is not added._)

The extension class in its current form is capable of creating the
actual panel button displaying the text “Loading” in its center.

## Loading up the extension

Now with all the necessary import lines added:

```javascript
// The PanelMenu module that contains Button
const PanelMenu = imports.ui.panelMenu;
// The St class that contains lots of UI functions
const St = imports.gi.St;
// Clutter, which is used for displaying everything
const Clutter = imports.gi.Clutter;
```

As soon as this file is ready, you can restart your Shell (press
Alt-F2 and enter the command `r`), and load the extension with
e.g. the GNOME Tweak Tool. You will see the Planets button on the
right. This little label showing the static text “Planets”, however,
is pretty boring, so let’s add some action.

## Adding some periodical change

Since the planets’ position continuously change, we should update our
widget every minute or so. Let’s patch our `_init()` a bit:

```javascript
this.last_update = 0;

MainLoop.timeout_add(1, Lang.bind(this, function() {
this.last_update++;
this.panelLabel.set_text("Update_count: " + this.last_update);
}))
```

This, of course, needs a new import line for `MainLoop` to become available:

```javascript
const MainLoop = imports.mainloop;
const Lang = imports.lang;
```

Now if you restart your Shell, your brand new extension will increase
its counter every second. This, however, presents some problems.

SWE GLib queries can sometimes be expensive, both in CPU and disk
operations, so updating our widget every second may present problems.
Also, planets don’t go **that** fast. We may update our timeout value
from `1` to `60` or something, but why don’t just give our user a chance
to set it?

## Introducing settings

Getting settings from `GSettings` is barely straightforward, especially
for software installed in a non-GNOME directory (which includes
extensions). To make our lives easier, I copied over a
[convenience library](https://github.com/projecthamster/shell-extension/blob/master/convenience.js)
from the [Hamster project](https://projecthamster.wordpress.com/)’s
extension, originally written by Giovanni Campagna. The relevant
function here is `getSettings()`:

```javascript
/**
* getSettings:
* @schema: (optional): the GSettings schema id
*
* Builds and return a GSettings schema for @schema, using schema files
* in extensionsdir/schemas. If @schema is not provided, it is taken from
* metadata['settings-schema'].
*/
function getSettings(schema) {
let extension = ExtensionUtils.getCurrentExtension();

schema = schema || extension.metadata['settings-schema'];

const GioSSS = Gio.SettingsSchemaSource;

// check if this extension was built with "make zip-file", and thus
// has the schema files in a subfolder
// otherwise assume that extension has been installed in the
// same prefix as gnome-shell (and therefore schemas are available
// in the standard folders)
let schemaDir = extension.dir.get_child('schemas');
let schemaSource;
if (schemaDir.query_exists(null))
schemaSource = GioSSS.new_from_directory(schemaDir.get_path(),
GioSSS.get_default(),
false);
else
schemaSource = GioSSS.get_default();

let schemaObj = schemaSource.lookup(schema, true);
if (!schemaObj)
throw new Error('Schema ' + schema + ' could not be found for extension '
+ extension.metadata.uuid + '. Please check your installation.');

return new Gio.Settings({ settings_schema: schemaObj });
}
```

You can either incorporate this function into your `extension.js` file,
or just use `convenience.js` file like I (and the Hamster applet) did
and import it:

```javascript
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension;
const Convenience = Me.imports.convenience;
```

Now let’s create the settings definition. GSettings schema files are XML
files. We want to add only one settings for now, the refresh interval.

```xml
<?xml version="1.0" encoding="utf-8"?>
<schemalist>
<schema id="org.gnome.shell.extensions.planets" path="/org/gnome/shell/extensions/planets/">
<key name="refresh-interval" type="i">
<default>30</default>
<summary>Refresh interval of planet data</summary>
<description>Interval in seconds. Sets how often the planet positions are recalculated. Setting this too low (e.g. below 30) may raise performance issues.</description>
</key>
</schema>
</schemalist>
```
you need to compile these settings with

glib-compile-schemas --strict schemas/

Now let’s utilize this new setting. In the extension’s `_init()`
function, add the following line:

```javascript
this._settings = Convenience.getSettings();
```

And, for `getSettings()` to work correctly, we also need to extend our
`metadata.json` file:

```json
"settings-schema": "planets"
```

After another restart (please, GNOME guys, add an option to reload
extensions!), your brand new widget will refresh every 30 seconds.

## Displaying the planet positions

## The settings panel

## Start an application

+ 0
- 67
_drafts/writing-an-sdk.md View File

@@ -1,67 +0,0 @@
---
layout: post
title: "Lessens you learn while writing an SDK"
date: 2016-03-19 12:34:56
tags: [development]
published: false
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

In the last few months I’ve been working on a GLib based SDK for
client applications that want to communicate with a Matrix.org
homeserver.

For whoever doesn’t know it, Matrix is a decentralized network of
servers (Homeservers). Clients can connect to them via HTTP and send
messages (events, in Matrix terminology) to each other. They are
called events because these messages can be pretty much anything from
instant messages through automated notifications to files or, well,
actual events (such as a vCalendar); anything that you can serialize
to JSON can go through this network.

My original intention was to integrate Matrix based chat into
Telepathy, a DBus based messaging framework used by e.g. the GNOME
desktop (more specifically Empathy, GNOME's chat client.) After
announcing my plans among the Matrix devs, I quickly learned some
things:

1. they are more than open to any development ideas
1. they really wanted to see this working
1. they would have been happy if there were a GLib or Qt based SDK

With my (far from complete) knowledge in GLib I decided to move on
with this last point, hoping that it will help me much when I finally
implement the Telepathy plugin.

## Matrix devs are open minded

What I learned very quickly is that Matrix devs are very open minded
folks from different parts of the world. They are all individuals with
their own ideas, experiences and quirks, yet, when it comes to that,
they steer towards their goals as a community. Thus, getting
additional information from them while reading the spec was super
easy.

## The specification is easy to understand

Except when it is not. For these cases, see the previous point.

Jokes asidu, anyone who worked with communications protocols or JSON
APIs before can get along with it fast. The endpoints are all
documented, and if something is unclear, they are happy to help
(especially if you patch up the spec afterwards.)


## Copying the SDK for a different language is not (always) what you want

I started my SDK in C, trying to mimic the Python SDK. This was a
double fail: the Python SDK was a volatile WiP, and C and Python are
fundamentally different.

During the upcoming weeks this became clear and I switched to the Vala
language. It is much easier to write GObject based stuff in Vala,
although I had to fall back to C to get some features working. I also
planned and implemented a more object oriented API, which is easier to
use in the GObject world.

+ 0
- 27
_includes/about.html View File

@@ -1,27 +0,0 @@
<p>
Gergely Polonkai is a systems engineer of a telco company, and
also a freelancer self- and software developer.
</p>

<p>
He is learning about different IT subjects since the late
1990s. These include web development, application building,
systems engineering, IT security and many others. He also dug his
nose deeply into free software, dealing with different types of
Linux and its applications,
while also writing and contributing to some open source projects.
</p>

<p>
On this site he is writing posts about different stuff he faces
during work (oh my, yet another IT solutions blog), hoping they
can help others with their job, or just to get along with their
brand new netbook that shipped with Linux.
</p>

<p>
“I believe one can only achieve success if they follow their own
instincts and listen to, but not bend under others’ opinions. If
you change your course just because someone says so, you are
following their instincts, not yours.”
</p>

+ 0
- 46
_includes/blog-post.html View File

@@ -1,46 +0,0 @@
<article class="{% if page.post_listing %}col-sm-5 col-md-6 {% endif%}post">
{% if page.post_listing %}
<ul class="list-inline">
<li class="col-md-8">
{% endif %}
<header class="post-header">
{% if page.tag %}
<h5>
{% else %}
<h3>
{% endif %}
{% if page.post_listing %}
<a href="{{ post.url }}">
{% endif %}
{{ post.title }}
{% if page.post_listing %}
</a>
{% endif %}
{% if page.tag %}
</h5>
{% else %}
</h3>
{% endif %}
<div class="meta pull-left">
{{post.author.name}}
</div>
<div class="meta pull-right">
{{post.date | date: "%b %-d, %Y :: %H:%M"}}
</div>
<div class="clearfix"></div>
</header>

<main>
{% if layout.render_post %}
{{content}}
{% else %}
{{post.excerpt}}
{% endif %}
</main>

{% include tag-link.html %}
{% if layout.post_listing %}
</li>
</ul>
{% endif %}
</article>

+ 0
- 16
_includes/head.html View File

@@ -1,16 +0,0 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="{{page.keywords}}">
<meta name="description" content="Personal page of Gergely Polonkai">
<title>Gergely Polonkai{% if page.title %}: {{page.title}}{% endif %}</title>

<link rel="icon" type="image/x-icon" href="{% link favicon.ico %}">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic" rel="stylesheet" type="text/css">
<link rel="alternate" type="application/rss+xml" title="Gergely Polonkai's Blog - RSS Feed" href="{{site.url}}/blog/atom.xml">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="{% link css/style.sass %}">
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/1.6.3/css/jquery.terminal.min.css" rel="stylesheet"/>

<script type="text/javascript" src="//code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/1.6.3/js/jquery.terminal.min.js"></script>

+ 0
- 35
_includes/header.html View File

@@ -1,35 +0,0 @@
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#gp-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% link index.html %}"><img src="{% link images/profile.svg %}" alt="Gergely Polonkai" style="background-color: white; height: 45px; margin-top: -13px;"></a>
{% if page.url != '/' %}
<a class="navbar-brand" href="{% link index.html %}">Gergely Polonkai</a>
{% endif %}
</div>
<div class="collapse navbar-collapse" id="gp-navbar">
<ul class="nav navbar-nav">
<li><a href="{% link blog/index.html %}">Blog</a></li>
<li><a href="{% link resume.html %}">Resume</a></li>
<li><a href="{% link stories/index.html %}">Stories</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://about.me/gergely.polonkai">about.me</a></li>
<li><a href="{% link disclaimer.md %}">Disclaimer</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-pencil"></span> Contact me <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
{% for contact in site.data.contacts %}
<li><a href="{{contact.link}}" target="_blank"><i class="fa fa-{{ contact.icon }}"></i> <img src="{% link images/contact/index.html %}{{ contact.image }}" alt="" /> {{contact.text}}</a></li>
{% endfor %}
<li><a href="{% link blog/atom.xml %}"><img src="{% link images/contact/index.html %}feed.png" alt="" /> RSS Feed</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>

+ 0
- 17
_includes/pagination.html View File

@@ -1,17 +0,0 @@
<nav>
<ul class="pagination">
<li{% if paginator.previous_page == null %} class="disabled"{% endif %}>
<a href="{{ paginator.previous_page_path | replace: '//', '/'}}" aria-label="Previous page">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% for page in (1..paginator.total_pages) %}
<li{% if paginator.page == page %} class="active"{% endif %}><a href="{% if page == 1 %}{% link blog/index.html %}{% else %}{{ site.paginate_path | replace: '//', '/' | replace: ':num', page }}{% endif %}">{{page}}</a></li>
{% endfor %}
<li{% if paginator.next_page == null %} class="disabled"{% endif %}>
<a href="{{paginator.next_page_path | replace: '//', '/'}}" aria-label="Next page">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
</ul>
</nav>

+ 0
- 9
_includes/post-list.html View File

@@ -1,9 +0,0 @@
<div class="container-fluid">
{% for post in posts limit: post_limit %}
{% capture counter %}{% cycle 'odd', 'even' %}{% endcapture %}
{% include blog-post.html %}
{% if counter == 'even' %}
<div class="clearfix"></div>
{% endif %}
{% endfor %}
</div>

+ 0
- 4
_includes/read_time.html View File

@@ -1,4 +0,0 @@
<span class="reading time" title="Estimated reading time">
{% assign words = content | number_of_words %}
{% if words < 360 %}1 minute{% else %}{{ words | divided_by:180 }} minutes{% endif %} read
</span>

+ 0
- 11
_includes/tag-link.html View File

@@ -1,11 +0,0 @@
{% capture tagsize %}{{post.tags | size}}{% endcapture %}
{% if tagsize != '0' %}
<footer>
<p class="article-tags">
{% for tag in post.tags %}
<a href="{% link blog/tag/index.html %}{{ tag }}" class="tag-label">{{tag}}</a>
{% endfor %}
</p>
<br class="clearfix">
</footer>
{% endif %}

+ 0
- 115
_layouts/default.html View File

@@ -1,115 +0,0 @@
<!DOCTYPE html>
<html>
<head>
{% include head.html %}
</head>
<body>
{% include header.html %}
<div class="container" id="main-container">

{{content}}

{% if page.name != 'about.html' %}
<div class="well well-sm small">
<div class="pull-left" id="about-well-image">
<a href="{% link about.html %}">
<img src="{% link images/profile.svg %}" alt="">
</a>
</div>
{% include about.html %}
<div class="clearfix"></div>
</div>
{% endif %}
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#tagcloud-button').click(function() {
$('#tag-cloud').toggle('slow');
});
});

jQuery.extend_if_has = function(desc, source, array) {
for (var i=array.length;i--;) {
if (typeof source[array[i]] != 'undefined') {
desc[array[i]] = source[array[i]];
}
}
return desc;
};

(function($) {
$.fn.tilda = function(eval, options) {
if ($('body').data('tilda')) {
return $('body').data('tilda').terminal;
}
this.addClass('tilda');
options = options || {};
eval = eval || function(command, term) {
term.echo("you don't set eval for tilda");
};
var settings = {
prompt: 'guest@gergely.polonkai.eu> ',
name: 'tilda',
height: 400,
enabled: false,
greetings: 'Welcome to my Terminal. Type `help\' to list the available commands.\n\nPowered by http://terminal.jcubic.pl',
keypress: function(e) {
if (e.which == 96) {
return false;
}
}
};
if (options) {
$.extend(settings, options);
}
this.append('<div class="td"></div>');
var self = this;
self.terminal = this.find('.td').terminal(eval, settings);
var focus = false;
$(document.documentElement).keypress(function(e) {
console.log(e);
if (e.which == 96) {
self.slideToggle('fast');
self.terminal.focus(focus = !focus);
self.terminal.attr({
scrollTop: self.terminal.attr("scrollHeight")
});
}
});
$('body').data('tilda', this);
this.hide();
return self;
};
})(jQuery);

String.prototype.strip = function(char) {
return this.replace(new RegExp("^\\s*"), '')
.replace(new RegExp("\\s*$"), '');
}

jQuery(document).ready(function($) {
$('#tilda').tilda(function(command, terminal) {
command = command.strip();

switch (command) {
case 'help':
terminal.echo('about - Go to the about page');
terminal.echo(' ');
terminal.echo('More commands will follow soon!');

break;
case 'about':
location = '{% link about.html %}';

break;
default:
terminal.echo(command + ': command not found');

break;
}
});
});
</script>
<div id="tilda"></div>
</body>
</html>

+ 0
- 15
_layouts/page.html View File

@@ -1,15 +0,0 @@
---
layout: default
---
<div class="post">

<header class="post-header">
<h2>{{page.title}}</h2>
<div class="clearfix"></div>
</header>

<article class="post-content">
{{content}}
</article>

</div>

+ 0
- 16
_layouts/post.html View File

@@ -1,16 +0,0 @@
---
layout: default
render_post: true
---
{% assign post = page %}
{% include blog-post.html %}
<nav>
<ul class="pager">
{% if page.previous %}
<li class="previous"><a href="{{ page.previous.url }}">&larr; {{page.previous.title}}</a></li>
{% endif %}
{% if page.next %}
<li class="next"><a href="{{ page.next.url }}">{{page.next.title}} &rarr;</a></li>
{% endif %}
</ul>
</nav>

+ 0
- 15
_layouts/posts-by-tag.html View File

@@ -1,15 +0,0 @@
---
layout: default
post_listing: true
---
<h3 class="tag">{{ page.tag }}</h3>
{{content}}

<h4>Articles under this tag</h4>

{% if site.tags[page.tag] %}
{% assign posts = site.tags[page.tag] %}
{% include post-list.html %}
{% else %}
No posts with this tag.
{% endif %}

+ 0
- 8
_layouts/story.html View File

@@ -1,8 +0,0 @@
---
layout: default
---
<h3>
{{ page.title }}<br>
<small>{% include read_time.html %}</small>
</h3>
{{ content }}

+ 0
- 43
_make_tags.sh View File

@@ -1,43 +0,0 @@
#! /bin/sh
#
# Find all tags in all posts under _posts, and generate a file for
# each under blog/tag. Also, if a tag page does not contain the tag:
# or layout: keywords, the script will include them in the front
# matter.

layout="posts-by-tag"

for tag in `grep -h ^tags: _posts/* | sed -re 's/^tags: +\[//' -e 's/\]$//' -e 's/, /\n/g' | sort | uniq`
do
tag_file="blog/tag/${tag}.md"
echo -n "[$tag] "

if [ ! -f $tag_file ]
then
echo "creating ($tag_file)"

cat <<EOF > $tag_file
---
layout: $layout
tag: $tag
---
EOF
else
updated=0
if ! egrep "^tag: +${tag}$" $tag_file 2>&1 > /dev/null; then
echo "adding tag"
sed -i "0,/---/! s/---/tag: $tag\\n---/" $tag_file
updated=1
fi

if ! egrep "^layout: +" $tag_file 2>&1 > /dev/null; then
echo "adding layout"
sed -i "0,/---/! s/---/layout: $layout\\n---/" $tag_file
updated=1
fi

if [ $updated = 0 ]; then
echo ""
fi
fi
done

+ 0
- 29
_posts/2011-05-12-ethical-hacking-2011.markdown View File

@@ -1,29 +0,0 @@
---
layout: post
title: "Ethical Hacking 2012"
date: 2011-05-12 20:54:42
tags: [conference]
permalink: /blog/2011/5/12/ethical-hacking-2011
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

Today I went to the Ethical Hacking conference with my boss. It was my first
appearance at such conferences, but I hope there will be more. Although we
just started to redesign our IT security infrastructure with a 90% clear goal,
it was nice to hear that everything is vulnerable. I was thinking if we should
sell all our IT equipments, fire all our colleagues (you know, to prevent
social engineering), and move to the South Americas to herd llamas or sheep,
so the only danger would be some lurking pumas or jaguars. Or I simply leave
my old background image on my desktop, from the well-known game, which says:
Trust is a weakness.

Anyways, the conference was really nice. We heard about the weaknesses of
Android, Oracle, and even FireWire. They showed some demos about everything,
exploited some free and commercial software with no problem at all. We have
seen how much power the virtualisation admin has (although I think it can be
prevented, but I’m not sure yet). However, in the end, we could see that the
Cloud is secure (or at least it can be, in a few months or so), so I’m not
totally pessimistic. See you next time at Hacktivity!

+ 0
- 88
_posts/2011-05-12-gentoo-hardened-desktop-with-gnome-3-round-one.markdown View File

@@ -1,88 +0,0 @@
---
layout: post
title: "Gentoo hardened desktop with GNOME 3 – Round one"
date: 2011-05-12 20:32:41
tags: [gentoo, gnome3, selinux]
permalink: /blog/2011/5/12/gentoo-hardened-desktop-with-gnome-3-round-one
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

After having some hard times with Ubuntu (upgrading from 10.10 to 11.04), I
decided to switch back to my old friend, Gentoo. As I’m currently learning
about Linux hardening, I decided to use the new SELinux profile, which
supports the v2 reference policy.

Installation was pretty easy, using the [Gentoo x86
Handbook](http://www.gentoo.org/doc/hu/handbook/handbook-x86.xml). This profile
automatically turns on the `USE=selinux` flag (so does the old SELinux
profile), but deprecated `FEATURE=loadpolicy` (which is turned on by the
profile, so portage will complain about it until you disable it in
`/etc/make.conf`).

For the kernel, I chose `hardened-sources-2.6.37-r7`. This seems to be recent
enough for my security testing needs. I turned on both SELinux, PaX and
grsecurity. So far, I have no problem with it, but I don’t have X installed
yet, which will screw up things for sure.

After having those hard times with Ubuntu mentioned before, I decided not to
install Grub2 yet, as it renders things unusable (eg. my Windows 7
installation, which I sometimes need at the office). So I installed Grub 0.97
(this is the only version marked as stable, as I remember), touched
`/.autorelabel`, and reboot.

My first mistake was using an UUID as the root device on the kernel parameter
list (I don’t want to list all the small mistakes like forgetting to include to
correct SATA driver from my kernel and such). Maybe I was lame, but after
including `/dev/sda5` instead of the UUID thing, it worked like…

Well, charm would not be the good word. For example, I forgot to install the
lvm2 package, so nothing was mounted except my root partition. After I
installed it with the install CD, I assumed everything will be all right, but
I was wrong.

udev and LVM is a critical point in a hardened environment. udev itself
doesn’t want to work without the `CONFIG_DEVFS_TEMPFS=y` kernel option, so I
also had to change that. It seemed that it can be done without the install CD,
as it compiled the kernel with no problems. However, when it reached the point
when it compresses the kernel with gzip, it stopped with a `Permission denied`
message (although it was running with root privileges).

The most beautiful thing in the hardened environment with Mandatory Access
Control enabled) is that root is not a real power user any more by default.
You can get this kind of messages many times. There are many tools to debug
these, I will talk about these later.

So, my gzip needed a fix. After digging a bit on the Internet, I found that
the guilty thing is text relocation, which can be corrected if gzip is
compiled with PIC enabled. Thus, I turned on `USE=pic` flag globally, and
tried to remerge gzip. Of course it failed, as it had to use gzip to unpack
the gzip sources. So it did when I tried to install the PaX tools and gradm to
turn these checks off. The install CD came to the rescue again, with which I
successfully recompiled gzip, and with this new gzip, I compressed my new
kernel, with which udev started successfully. So far, so good, let’s try to
reboot!

Damn, LVM is still not working. So I decided to finally consult the Gentoo
hardened guide. It says that the LVM startup scripts under `/lib/rcscripts/…`
must be modified, so LVM will put its lock files under `/etc/lvm/lock` instead
of `/dev/.lvm`. After this step and a reboot, LVM worked fine (finally).

The next thing was the file system labelling. SELinux should automatically
relabel the entire file system at boot time whenever it finds the
`/.autorelabel` file. Well, in my case it didn’t happen. After checking the
[Gentoo Hardening](http://wiki.gentoo.org/wiki/Hardened_Gentoo) docs, I realised that the `rlpkg` program does exactly the same
(as far as I know, it is designed specifically for Gentoo). So I ran `rlpkg`,
and was kind of shocked. It says it will relabel ext2, ext3, xfs and JFS
partitions. Oh great, no ext4 support? Well, consulting the forums and adding
some extra lines to `/etc/portage/package.keywords` solved the problem (`rlpkg`
and some dependencies had to have the `~x86` keyword set). Thus, `rlpkg`
relabelled my file systems (I checked some directories with `ls -lZ`, it seemed
good for me).

Now it seems that everything is working fine, except the tons of audit
messages. Tomorrow I will check them with `audit2why` or `audit2allow` to see if
it is related with my SELinux lameness, or with a bug in the policy included
with Gentoo.

+ 0
- 35
_posts/2011-05-13-zabbix-performance-tip.markdown View File

@@ -1,35 +0,0 @@
---
layout: post
title: "Zabbix performance tip"
date: 2011-05-13 19:03:31
tags: [zabbix, monitoring]
permalink: /blog/2011/5/13/zabbix-performance-tip
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

Recently I have switched from [MRTG](http://oss.oetiker.ch/mrtg/) + [Cacti](http://www.cacti.net/) + [Nagios](http://www.nagios.org/) + [Gnokii](http://www.gnokii.org/) to [Zabbix](http://www.zabbix.com/), and I
must say I’m more than satisfied with it. It can do anything the former tools
did, and much more. First of all, it can do the same monitoring as Nagios did,
but it does much more fine. It can check several parameters within one
request, so network traffic is kept down. Also, its web front-end can generate
any kinds of graphs from the collected data, which took Cacti away. Also, it
can do SNMP queries (v1-v3), so querying my switches’ port states and traffic
made easy, taking MRTG out of the picture (I know Cacti can do it either, it
had historical reasons we had both tools installed). And the best part: it can
send SMS messages via a GSM modem natively, while Nagios had to use Gnokii.
The trade-off is, I had to install Zabbix agent on all my monitored machines,
but I think it worths the price. I even have had to install NRPE to monitor
some parameters, which can be a pain on Windows hosts, while Zabbix natively
supports Windows, Linux and Mac OS/X.

So I only had to create a MySQL database (which I already had for NOD32
central management), and install Zabbix server. Everything went fine, until I
reached about 1300 monitored parameters. MySQL seemed to be a bit slow on disk
writes, so my Zabbix “queue” filled up in no time. After reading some forums,
I decided to switch to PostgreSQL instead. Now it works like charm, even with
the default Debian settings. However, I will have to add several more
parameters, and my boss wants as many graphs as you can imagine, so I’m more
than sure that I will have to fine tune my database later.

+ 0
- 29
_posts/2011-05-18-gentoo-hardened-desktop-with-gnome-3-round-two.markdown View File

@@ -1,29 +0,0 @@
---
layout: post
title: "Gentoo hardened desktop with GNOME 3 – Round two"
date: 2011-05-18 10:28:14
tags: [gentoo, gnome3, selinux]
permalink: /blog/2011/5/18/gentoo-hardened-desktop-with-gnome-3-round-two
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

After several hours of `package.keywords`/`package.use` editing and package
compiling, I managed to install GNOME 3 on my notebook. Well, I mean, the
GNOME 3 packages. Unfortunately the fglrx driver didn’t seem to recognise my
ATI Mobility M56P card, and the open source driver didn’t want to give me GLX
support. When I finally found some clues on what should I do, I had to use my
notebook for work, so I installed Fedora 14 on it. Then I realised that GNOME
3 is already included in Rawhide (Fedora 15), so I quickly downloaded and
installed that instead. Now I have to keep this machine in a working state for
a few days, so I will learn SELinux stuff in its native environment.

When I installed Fedora 14, the first AVC message popped up after about ten
minutes. That was a good thing, as I wanted to see `setroubleshoot` in action.
However, in Fedora 15, the AVC bubbles didn’t show up even after a day. I
raised my left eyebrow and said that’s impossible, SELinux must be disabled.
And it’s not! It’s even in enforcing mode! And it works just fine. I like it,
and I hope I will be able to get the same results with Gentoo if I can get
back to testing…

+ 0
- 41
_posts/2011-05-27-citrix-xenserver-vs-debian-5-0-upgrade-to-6-0.markdown View File

@@ -1,41 +0,0 @@
---
layout: post
title: "Citrix XenServer 5.5 vs. Debian 5.0 upgrade to 6.0"
date: 2011-05-27 17:33:41
tags: [citrix-xenserver, debian]
permalink: /blog/2011/5/27/citrix-xenserver-vs-debian-5-0-upgrade-to-6-0
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

Few weeks ago I’ve upgraded two of our Debian based application servers from
5.0 to 6.0. Everything went fine, as the upgraded packages worked well with
the 4.2 JBoss instances. For the new kernel we needed a reboot, but as the
network had to be rebuilt, I postponed this reboot until the network changes.
With the network, everything went fine again, we successfully migrated our
mail servers behind a firewall. Also the Xen server (5.5.0, upgrade to 5.6
still has to wait for a week or so) revolted well with some storage disks
added. But the application servers remained silent…

After checking the console, I realised that they don’t have an active console.
And when I tried to manually start them, XenServer refused with a message
regarding pygrub.

To understand the problem, I had to understand how XenServer boots Debian. It
reads the grub.conf on the first partition’s root or `/boot` directory, and
starts the first option, without asking (correct me, if I’m mistaken
somewhere). However, this pygrub thing can not parse the new, grub2 config.
This is kinda frustrating.

For the first step, I quickly installed a new Debian 5.0 system from my
template. Then I attached the disks of the faulty virtual machine, and mounted
all its partitions. This way I could reach my faulty 6.0 system with a chroot
shell, from which I could install the `grub-legacy` package instead of grub,
install the necessary kernel and XenServer tools (which were missing from both
machines somehow), then halt the rescue system, and start up the original
instance.

Next week I will do an upgrade on the XenServer to 5.6.1. I hope no such
problems will occur.

+ 0
- 25
_posts/2011-05-27-oracle-database-incompatible-with-oracle-linux.markdown View File

@@ -1,25 +0,0 @@
---
layout: post
title: "Oracle Database “incompatible” with Oracle Linux?"
date: 2011-05-27 17:53:31
tags: [linux, oracle]
permalink: /blog/2011/5/27/oracle-database-incompatible-with-oracle-linux
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

Today I gave a shot to install [Oracle
Linux](http://www.oracle.com/us/technologies/linux/overview/index.html). I thought I could easily install
an Oracle DBA on it. Well, I was naive.

As only the 5.2 version is supported by XenServer 5.5, I downloaded that
version of Oracle Linux. Installing it was surprisingly fast and easy, it
asked almost nothing, and booted without any problems.

After this came the DBA, 10.2, which bloated an error message in my face
saying that this is an unsupported version of Linux. Bah.

Is it only me, or is it really strange that Oracle doesn’t support their own
distro?

+ 0
- 22
_posts/2011-06-10-proxy-only-non-existing-files-with-mod-proxy-and-mod-rewrite.markdown View File

@@ -1,22 +0,0 @@
---
layout: post
title: "Proxy only non-existing files with mod_proxy and mod_rewrite"
date: 2011-06-10 14:20:43
tags: [apache]
permalink: /blog/2011/6/10/proxy-only-non-existing-files-with-mod-proxy-and-mod-rewrite
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

Today I got an interesting task. I had to upload some pdf documents to a site.
The domain is ours, but we don’t have access to the application server that is
hosting the page yet. Until we get it in our hands, I did a trick.

I enabled `mod_rewrite`, `mod_proxy` and `mod_proxy_http`, then added the following
lines to my apache config:

{% gist 47680bfa44eb29708f20 redirect-non-existing.conf %}

I’m not totally sure it’s actually secure, but it works for now.

+ 0
- 30
_posts/2011-09-18-inverse-of-sort.markdown View File

@@ -1,30 +0,0 @@
---
layout: post
title: "Inverse of `sort`"
date: 2011-09-18 14:57:31
tags: [linux, command-line]
permalink: /blog/2011/9/18/inverse-of-sort
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

I’m using \*NIX systems for about 14 years now, but it can still show me new
things. Today I had to generate a bunch of random names. I’ve create a small
perl script which generates permutations of some usual Hungarian first and
last names, occasionally prefixing it with a ‘Dr.’ title or using double first
names. For some reasons I forgot to include uniqueness check in the script.
When I ran it in the command line, I realized the mistake, so I appended
`| sort | uniq` to the command line. So I had around 200 unique names, but in
alphabetical order, which was awful for my final goal. Thus, I tried shell
commands like rand to create a random order, and when many of my tries failed,
the idea popped in my mind (not being a native English speaker): “I don’t have
to create «random order», but «shuffle the list». So I started typing `shu`,
pressed Tab in the Bash shell, and voilà! `shuf` is the winner, it does just
exactly what I need:

**NAME**
shuf - generate random permutations

Thank you, Linux Core Utils! :)

+ 0
- 16
_posts/2011-12-11-why-you-should-always-test-your-software-with-production-data.markdown View File

@@ -1,16 +0,0 @@
---
layout: post
title: "Why you should always test your software with production data"
date: 2011-12-11 12:14:51
tags: [development, testing, ranting]
permalink: /blog/2011/12/11/why-you-should-always-test-your-software-with-production-data
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

I’m writing a software for my company in PHP, using the Symfony 2 framework.
I’ve finished all the work, created some sample data, it loaded perfectly. Now
I put the whole thing into production and tried to upload the production data
into it. Guess what… it didn’t load.

+ 0
- 29
_posts/2012-03-20-php-5-4-released.markdown View File

@@ -1,29 +0,0 @@
---
layout: post
title: "PHP 5.4 released"
date: 2012-03-20 13:31:12
tags: [php]
permalink: /blog/2012/3/20/php-5-4-released
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

After a long time of waiting, PHP announced 5.4 release on 1 March (also,
today they announced that they finally migrate to Git, which is sweet from my
point of view, but it doesn’t really matter).

About a year ago we became very agressive towards a developer who created our
internal e-learning system. Their database was very insecure, and they didn’t
really follow industry standards in many ways. Thus, we forced them to move
from Windows + Apache 2.0 + PHP 5.2 + MySQL 4.0 to Debian Linux 6.0 + Apache
2.2 + PHP 5.3 + MySQL 5.1. It was fun (well, from our point of view), as their
coders… well… they are not so good. The code that ran “smoothly” on the
old system failed at many points on the new one. So they code and code, and
write more code. And they still didn’t finish. And now 5.4 is here. Okay, I
know it will take some time to get into the Debian repositories, but it’s
here. And they removed `register_globals`, which will kill that funny code again
at so many points that they will soon get to rewrite the whole code to make it
work. And I just sit here in my so-much-comfortable chair, and laugh. Am I
evil?

+ 0
- 34
_posts/2012-03-27-fast-world-fast-updates.markdown View File

@@ -1,34 +0,0 @@
---
layout: post
title: "Fast world, fast updates"
date: 2012-03-27 06:18:43
tags: [linux]
permalink: /blog/2012/3/27/fast-world-fast-updates
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

We live in a fast world, that’s for sure. When I first heard about Ubuntu
Linux and their goals, I was happy: they gave a Debian to everyone, but in
different clothes. It had fresh software in it, and even they gave support of
a kind. It was easy to install and use, even if one had no Linux experience
before. So people liked it. I’ve even installed it on some of my servers
because of the new package versions that came more often. Thus I got an up to
date system. However, it had a price. After a while, security updates came
more and more often, and when I had a new critical update every two or three
days, I’ve decided to move back to Debian. Fortunately I did this at the time
of a new release, so I didn’t really loose any features.

After a few years passed, even Debian is heading this very same way. But as I
see, the cause is not the same. It seems that upstream software is hitting
these bugs, and even the Debian guys don’t have the time to check for them. At
the time of a GNOME version bump (yes, GNOME 3 is a really big one for the
UN\*X-like OSes), when hundreds of packages need to be checked, security bugs
show off more often. On the other hand however, Debian is releasing a new
security update every day (I had one on each of the last three days). This, of
course, is good from one point of view as we get a system that is more secure,
but most administrators don’t have maintenance windows this often. I can think
of some alternatives like Fedora, but do I really have to change? Dear fellow
developers, please code more carefully instead!

+ 0
- 28
_posts/2012-06-14-wordpress-madness.markdown View File

@@ -1,28 +0,0 @@
---
layout: post
title: "Wordpress madness"
date: 2012-06-14 06:40:12
tags: [wordpress, ranting]
permalink: /blog/2012/6/14/wordpress-madness
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

I’m a bit fed up that I had to install [MySQL](http://www.mysql.com/) on my
server to have [Wordpress](http://wordpress.org/) working, so I’ve Googled a
bit to find a solution for my pain. I found
[this](http://codex.wordpress.org/Using_Alternative_Databases). I don’t know when
this post was written, but I think it’s a bit out of date. I mean come on, PDO
is the part of PHP for ages now, and they say adding a DBAL to the dependencies
would be a project as large as (or larger than) WP itself. Well,
yes, but PHP is already a dependency, isn’t it? Remove it guys, it’s too
large!

Okay, to be serious… Having a heavily MySQL dependent codebase is a bad
thing in my opinion, and changing it is no easy task. But once it is done, it
would be a child’s play to keep it up to date, and to port WP to other
database backends. And it would be more than enough to call it 4.0, and
raising version numbers fast is a must nowadays (right, Firefox and Linux
Kernel guys?)

+ 0
- 28
_posts/2012-06-18-ssh-login-failed-on-red-hat-enterprise-linux-6-2.markdown View File

@@ -1,28 +0,0 @@
---
layout: post
title: "SSH login FAILed on Red Had Enterprise Linux 6.2"
date: 2012-06-18 18:28:45
tags: [linux, selinux, ssh, red-hat]
permalink: /blog/2012/6/18/ssh-login-failed-on-red-hat-enterprise-linux-6-2
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

Now this was a mistake I should not have done…

About a month ago I have moved my AWS EC2 machine from Amazon Linux to RHEL
6.2. This was good. I have moved all my files and stuff, recreated my own
user, everything was just fine. Then I copied my
[gitosis](https://github.com/tv42/gitosis) account (user `git` and its home
directory). Then I tried to log in. It failed. I was blaming OpenSSH for a week
or so, changed the config file in several ways, tried to change the permissions
on `~git/.ssh/*`, but still nothing. Permission were denied, I was unable to
push any of my development changes. Now after a long time of trying, I
coincidently `tail -f`-ed `/var/log/audit/audit.log` (wanted to open `auth.log`
instead) and that was my first good point. It told me that `sshd` was unable to
read `~git/.ssh/authorized_keys`, which gave me the idea to run `restorecon` on
`/home/git`. It solved the problem.

All hail SELinux and RBAC!

+ 0
- 35
_posts/2012-06-22-upgrades-requiring-a-reboot-on-linux-at-last.markdown View File

@@ -1,35 +0,0 @@
---
layout: post
title: "Upgrades requiring a reboot on Linux? At last!"
date: 2012-06-22 20:04:51
tags: [linux]
permalink: /blog/2012/6/22/upgrades-requiring-a-reboot-on-linux-at-last
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

I’ve recently received an article on Google+ about Fedora’s new idea: package
upgrades that require a reboot. The article said that Linux guys have lost
their primary adoo: “Haha! I don’t have to reboot my system to install system
upgrades!” My answer was always this: “Well, actually you should…”

I think this can be a great idea if distros implement it well. PackageKit was
a good first step on this road. That software could easily solve such an
issue. However, it is sooo easy to do it wrong. The kernel, of course, can not
be upgraded online (or could it be? I have some theories on this subject,
wonder if it can be implemented…), but other packages are much different.
From the users’ point of view the best would be if the packages would be
upgraded in the background seemlessly. E.g. PackageKit should check if the
given executable is running. If not, it should upgrade it, while notifying the
user like “Hey dude, don’t start Anjuta now, I’m upgrading it!”, or simply
denying to start it. Libraries are a bit different, as PackageKit should check
if any running executables are using the library. Meanwhile, PK should also
keep a notification somewhere telling the users that some packages could be
upgraded, but without stopping this-and-that, it can not be done.

I know these things are easier said than done. But I think (a) users should
tell such ideas to the developers and (b) developers (mostly large companies,
like Microsoft or Apple) should listen to them, and at least think of these
ideas. Some users are not as stupid as they think…

+ 0
- 80
_posts/2012-09-05-some-thoughts-about-that-dead-linux-desktop.markdown View File

@@ -1,80 +0,0 @@
---
layout: post
title: "Some thoughts about that dead Linux Desktop"
date: 2012-09-05 09:01:31
tags: [linux]
permalink: /blog/2012/9/5/some-thoughts-about-that-dead-linux-desktop
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

There were some arguments in the near past on [What Killed the Linux
Desktop](http://tirania.org/blog/archive/2012/Aug-29.html). After reading many
replies, like [Linus
Torvalds’](http://www.zdnet.com/linus-torvalds-on-the-linux-desktops-popularity-problems-7000003641/),
I have my own thoughts, too.

I know my place in the world, especially in the online community. I’m a Linux
user for about 15 years and a Linux administrator for 10 years now, beginning
with WindowMaker and something that I remember as GNOME without a version
number. I have committed some minor code chunks and translations in some minor
projects, so I’m not really into it from the “write” side (well, until now,
since I have began to write this blog, and much more, but don’t give a penny
for my words until you see it).

I’m using Linux since 2.2 and GNOME since 1.whatever. It’s nice that a program
compiled years ago still runs on today’s Linux kernel, especially if you see
old DOS/Windows software failing to start on a new Windows 7 machine. I
understand Linus’ point that breaking external APIs is bad, and I think it can
work well on the kernel’s level. But the desktop level is much different. As
the Linux Desktop has such competitors (like OS/X and Windows’ Aero and Metro),
they have to give something new to the users almost every year to keep up with
them. Eye candies are a must (yes, of course my techy fellows, they are
worthless, but users *need* it), and they can not be created without extending
APIs. And the old API… well, it fades away fast. I don’t really understand
however, why they have to totally disappear, like
[GTK_DIALOG_NO_SEPARATOR](http://developer.gnome.org/gtk/stable/GtkDialog.html#GtkDialogFlags)
in Gtk3. It could be replaced with a 0 value (e.g: it won’t do anything). This
way my old Gtk2 program could compile with Gtk3 nicely. Also, there could be a
small software that goes through your source code and warn you about such
deprecated (and no-doer but still working) things. Porting applications between
Gtk (and thus, GNOME) versions became a real pain, which makes less enthusiast
programmers stop developing for Linux. Since I’m a GNOME guy for years, I can
tell nothing about Qt and KDE, but for the GNOME guys, this is a bad thing. As
of alternatives, there is Java. No, wait… it turned out recently that [it has
several security
bugs](http://www.theregister.co.uk/2012/08/31/critical_flaw_found_in_patched_java).
Also it’s not that multiplatform as they say (I can’t find the article on
that at the moment, but I have proof). Also, the JVMs out there eat up so much
resources, which makes it a bit hard and expensive to use.

Also, I see another problem: those blasted package managers. RPM, DPKG,
Portage, whatever. What the hell? Why are there so many? Why do developers
reinvent the wheel? The nave is too small or there are to few spokes? Come on…
we live in an open source world! Contribute to the one and only package manager
(which one is that I don’t actually care)! I’m sure the two (three, many)
bunches of develoeprs could make a deal. Thus, it could become better and
“outsider” companies would be happier to distribute their software for Linux
platforms.

And now that we get to the big companies. I don’t really understand them.
nVidia and ATI made their own closed source drivers for Linux. Some other
hardware vendors also write Linux drivers, and as the kernel API doesn’t really
change, they will work for a long time. But what about desktop
application vendors? Well, they try to stick to a desktop environment or two,
and if they change too frequently, they stop developing for Linux, like Skype
did (OK, maybe Skype has other reasons, but you see my point). But why? The
main part for Linux programs is the Linux kernel and the basic userland like
libc/stdlib++. If you write graphical software, it will have to use X-Windows.
Yes, it’s much different in many ways, mostly because they have a… well… pretty
ugly design by default. But still, it’s the same on every Linux distributions,
as it became somewhat an industry standard, as it was already on the market
back in the old UN\*X days. The protocol itself changed just like the Linux
kernel: almost no change at all, just some new features.

So what kills the Linux desktop in my opinion is these constant wars inside,
and the lack of support from the outside. Open Source is good, but until these
(mostly the first) problems are not resolved, Linux Desktop can do nothing on
the market. It’s a downward spiral hard to escape.

+ 0
- 76
_posts/2012-09-07-how-to-start-becoming-a-web-developer.markdown View File

@@ -1,76 +0,0 @@
---
layout: post
title: "How to start becoming a web developer"
date: 2012-09-07 18:12:12
tags: [development, technology]
permalink: /blog/2012/9/7/how-to-start-becoming-a-web-developer
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---

A friend of mine asked me today how to become a web developer. It took me a
while, but I made up a checklist. It’s short, but it’s enough for the first
steps.

#### First of all, learn English

Well, if you read this, maybe this was a bad first point…

#### Choose a language and stick to it!

For the UN\*X/Linux line, there is PHP. It’s free, easy to learn, and has many
free tools and documentations available. It can be used in a functional or an
object-oriented way.

C# is another good way to start, but for the Windows line. It’s fully object-
oriented, and the web is full of tutorials, how-tos and other resources.

#### Learn the basics of the system you are working on

To become a good developer, learn at least the basics of the system you are
working on. Basic commands can always come in handy. Debugging (yes, you will
do tons of bugs for sure) can become much easier if you know the huge set of
tools provided by your OS. You should also try to develop in the chosen
environment. Chose PHP? Get a Linux desktop! ASP.NET? Get a Windows.
Everything will be much easier!

#### Learn the basics of the web server you are using

PHP can run on [Apache](http://httpd.apache.org/) (as a module), or any
CGI-capable webserver, like [lighttpd](http://www.lighttpd.net/) or
[nginx](http://nginx.org/) (well, it can also run on IIS, but trust me: you
don’t want that). ASP.NET is designed for IIS, and although some scripts can
be run under a mono-capable server, it should still stay there.

Whichever you choose, learn the basics! How to start and stop the service,
basic configuration methods, modules/extensions, and so on. It’s more than sure
that you will face some issues while developing, so it can never hurt.

#### Keep your versions under control

Version control is critical nowadays. It gives you a basic backup solution,
can come in handy with debugging, and if you ever want to work in a team, you
will badly need it.

Subversion is a bit out of date now, and it’s kind of hard to set up.

Git is no easy. You will have to learn a lot of stuff, but basicly it’s just
another version control system. Just choose if you want to stick to
merge-then-commit or rebase-then-commit, get a client, and get on the run.

Microsoft’s Team Foundation is another good way if you are working in a team.
It provides several other features besides version controlling, and is well
integrated into Visual Studio, which is highly recommended for Windows based
development.

#### Choose an environment to work in