Update for latest GitHub Pages gem

This commit is contained in:
Gergely Polonkai 2017-08-31 11:55:54 +02:00
parent fd2243bda6
commit c6910318b5
20 changed files with 27 additions and 27 deletions

View File

@ -9,7 +9,7 @@ name: Gergely Polonkai
paginate: 10 paginate: 10
paginate_path: "/blog/page/:num" paginate_path: "/blog/page/:num"
exclude: ['README.md', 'Gemfile', 'Gemfile.lock', 'CNAME', ".hyde.el"] exclude: ['README.md', 'Gemfile', 'Gemfile.lock', 'CNAME', ".hyde.el"]
gems: plugins:
- jekyll-gist - jekyll-gist
- jekyll-paginate - jekyll-paginate

View File

@ -5,7 +5,7 @@
<span aria-hidden="true">&laquo;</span> <span aria-hidden="true">&laquo;</span>
</a> </a>
</li> </li>
{% for page in (1...paginator.total_pages) %} {% for page in (1..paginator.total_pages) %}
<li{% if paginator.page == page %} class="active"{% endif %}><a href="{% if page == 1 %}{{'/blog' | prepend: site.baseurl}}{% else %}{{site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page}}{% endif %}">{{page}}</a></li> <li{% if paginator.page == page %} class="active"{% endif %}><a href="{% if page == 1 %}{{'/blog' | prepend: site.baseurl}}{% else %}{{site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page}}{% endif %}">{{page}}</a></li>
{% endfor %} {% endfor %}
<li{% if paginator.next_page == null %} class="disabled"{% endif %}> <li{% if paginator.next_page == null %} class="disabled"{% endif %}>

View File

@ -17,6 +17,6 @@ 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 I enabled `mod_rewrite`, `mod_proxy` and `mod_proxy_http`, then added the following
lines to my apache config: lines to my apache config:
{% gist gergelypolonkai/47680bfa44eb29708f20 %} {% gist 47680bfa44eb29708f20 redirect-non-existing.conf %}
Im not totally sure its actually secure, but it works for now. Im not totally sure its actually secure, but it works for now.

View File

@ -24,7 +24,7 @@ own role hierarchy service that implements `RoleHierarchyInterface`.
So far so good, first tests. It soon turned out that if `User::getRoles()` So far so good, first tests. It soon turned out that if `User::getRoles()`
returns a `DoctrineCollection` as it does by default, then the standard returns a `DoctrineCollection` as it does by default, then the standard
{% gist gergelypolonkai/883ace4f35e440f6fe0f WhatEver.php %} {% gist 883ace4f35e440f6fe0f WhatEver.php %}
doesnt work. I know, it should not be hard coded, as my roles and permission doesnt work. I know, it should not be hard coded, as my roles and permission
tables are dynamic, I have just tested. So I fixed my `User` entity so tables are dynamic, I have just tested. So I fixed my `User` entity so
@ -35,12 +35,12 @@ return the original collection, but I think it will never be used.
After that, I had to implement some more features so I put this task away. After that, I had to implement some more features so I put this task away.
Then, I tried to create my first ACL. Then, I tried to create my first ACL.
{% gist gergelypolonkai/883ace4f35e440f6fe0f WhatEver2.php %} {% gist 883ace4f35e440f6fe0f WhatEver2.php %}
I was about to check if the user who is logged in has an `OWNER` permission on I was about to check if the user who is logged in has an `OWNER` permission on
the `User` class. the `User` class.
{% gist gergelypolonkai/883ace4f35e440f6fe0f WhatEver3.php %} {% gist 883ace4f35e440f6fe0f WhatEver3.php %}
The ACL was defined based on a role, so everyone who had the `ROLE_ADMIN` role The ACL was defined based on a role, so everyone who had the `ROLE_ADMIN` role
should gain access to the user listing page. But they didnt. It took several should gain access to the user listing page. But they didnt. It took several

View File

@ -17,4 +17,4 @@ the same name.
To change this, you will have to modify the `config.yml` file like this: To change this, you will have to modify the `config.yml` file like this:
{% gist gergelypolonkai/c695670ecca2809f7c93 %} {% gist c695670ecca2809f7c93 %}

View File

@ -13,10 +13,10 @@ author:
Few days ago I have struggled with a problem using Symfony2 configuration. I Few days ago I have struggled with a problem using Symfony2 configuration. I
wanted to add the following kind of configuration to `config.yml`: wanted to add the following kind of configuration to `config.yml`:
{% gist gergelypolonkai/30440e25f7a447730064 config.yml %} {% gist 30440e25f7a447730064 config.yml %}
The problem was that the stuff under `transitions` is dynamic, so those The problem was that the stuff under `transitions` is dynamic, so those
`hc_cba` and `cba_hc` tags can be pretty much anything. After hitting many `hc_cba` and `cba_hc` tags can be pretty much anything. After hitting many
errors, I came to the solution: errors, I came to the solution:
{% gist gergelypolonkai/30440e25f7a447730064 DynarrayConfiguration.php %} {% gist 30440e25f7a447730064 DynarrayConfiguration.php %}

View File

@ -20,13 +20,13 @@ feature](https://developer.gnome.org/gobject/unstable/gtype-non-instantiable.htm
obvious. Making the long story short, I have checked with the `GIO` sources for obvious. Making the long story short, I have checked with the `GIO` sources for
an example, and using that, I have created this small, working chunk: an example, and using that, I have created this small, working chunk:
{% gist gergelypolonkai/47794b6fb94484f8160b client-state.h %} {% gist 47794b6fb94484f8160b client-state.h %}
{% gist gergelypolonkai/47794b6fb94484f8160b client-state.c %} {% gist 47794b6fb94484f8160b client-state.c %}
Still, it can be made more perfect by using the Still, it can be made more perfect by using the
[glib-mkenums](http://developer.gnome.org/gobject/stable/glib-mkenums.html) [glib-mkenums](http://developer.gnome.org/gobject/stable/glib-mkenums.html)
tool. I will read through the GLib Makefiles tomorrow for some hints on tool. I will read through the GLib Makefiles tomorrow for some hints on
this. this.
Edit: you can find the glib-mkenums solution [here]({% post_url 2014-08-16-registering-an-enum-type-in-glib-glib-mkenums-magic %}). Edit: you can find the glib-mkenums solution [here]({% post_url 2014-08-16-registering-an-enum-type-in-glib-glib-mkenums-magic %}).

View File

@ -14,4 +14,4 @@ Just insert it in your database, feed them two Google coordinates, and you get
the distance in kilometres. If you happen to need it in miles, change the the distance in kilometres. If you happen to need it in miles, change the
constant `12756.200` in the `RETURN` row to `7922.6` instead. constant `12756.200` in the `RETURN` row to `7922.6` instead.
{% gist gergelypolonkai/bdad1cf2d410853bef35 %} {% gist bdad1cf2d410853bef35 %}

View File

@ -20,7 +20,7 @@ does the work for me. Its only requirements are git (of course), and the
`column` command, which is pretty obviously present on every POSIX `column` command, which is pretty obviously present on every POSIX
compliant systems (even OSX). compliant systems (even OSX).
{% gist gergelypolonkai/8af6a3e86b57dd4c250e %} {% gist 8af6a3e86b57dd4c250e %}
I just put it in my path, and `git branches-with-remotes` does the work! I just put it in my path, and `git branches-with-remotes` does the work!

View File

@ -20,7 +20,7 @@ In my other project,
method. The following two rules in `Makefile.am` create `gswe-enumtypes.h` method. The following two rules in `Makefile.am` create `gswe-enumtypes.h`
and `gswe-enumtypes.c`. and `gswe-enumtypes.c`.
{% gist gergelypolonkai/1e2fdedb136de3ca67f0 Makefile %} {% gist 1e2fdedb136de3ca67f0 Makefile %}
`$(GLIB_MKENUMS)` is set in `configure` with `$(GLIB_MKENUMS)` is set in `configure` with
`AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])`. `AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])`.
@ -31,6 +31,6 @@ files, one for the header and one for the code. `$(gswe_enum_headers)`
contains a list of all the header files that have enum types defined contains a list of all the header files that have enum types defined
throughout the project. throughout the project.
{% gist gergelypolonkai/1e2fdedb136de3ca67f0 gswe-enumtypes.h %} {% gist 1e2fdedb136de3ca67f0 gswe-enumtypes.h %}
{% gist gergelypolonkai/1e2fdedb136de3ca67f0 gswe-enumtypes.c %} {% gist 1e2fdedb136de3ca67f0 gswe-enumtypes.c %}

View File

@ -16,7 +16,7 @@ displayed in small size, so this amount of precision was irrelevant, and
these numbers took almost half of my SVG images size. So I created an these numbers took almost half of my SVG images size. So I created an
Elisp defun to round these numbers to 2 decimals: Elisp defun to round these numbers to 2 decimals:
{% gist gergelypolonkai/9c721ceda6d3079b4f05 %} {% gist 9c721ceda6d3079b4f05 %}
This finds the first digit of the number under point (the cursor), and This finds the first digit of the number under point (the cursor), and
reduces its digits to the given amount (or the number given with `C-u`). It reduces its digits to the given amount (or the number given with `C-u`). It

View File

@ -43,4 +43,4 @@ his local repository with the same technique).
[This StackOverflow answer](http://stackoverflow.com/a/17153598/1305139) [This StackOverflow answer](http://stackoverflow.com/a/17153598/1305139)
suggests the very same, but with some aliases: suggests the very same, but with some aliases:
{% gist gergelypolonkai/a98f4aab84659d60364e %} {% gist a98f4aab84659d60364e %}

View File

@ -29,4 +29,4 @@ could not start specifically with the `top` side. I decided to go with
the top right corner for the first parameter, while trying to keep a the top right corner for the first parameter, while trying to keep a
sane repeating pattern. Here is the result: sane repeating pattern. Here is the result:
{% gist gergelypolonkai/313b227434ecc5d85d7b border-radius.sass %} {% gist 313b227434ecc5d85d7b border-radius.sass %}

View File

@ -24,7 +24,7 @@ using a middleware, which may introduce performance issues
sometimes<sup>[citation needed]</sup>. So I decided to go with decorators, and sometimes<sup>[citation needed]</sup>. So I decided to go with decorators, and
at the end, I came up with this: at the end, I came up with this:
{% gist gergelypolonkai/498a32297f39b4960ad7 helper.py %} {% gist 498a32297f39b4960ad7 helper.py %}
Now I can decorate my views, either class or function based, with Now I can decorate my views, either class or function based, with
`@convert_params(User, (Article, 'aid'), (Paragraph, None, 'pid'), `@convert_params(User, (Article, 'aid'), (Paragraph, None, 'pid'),

View File

@ -44,7 +44,7 @@ line and an actual function header for `i_foo_bar` with the same
parameters. Thats a cumbersome job for more than 40 function parameters. Thats a cumbersome job for more than 40 function
headers. But emacs comes to the rescue! headers. But emacs comes to the rescue!
{% gist gergelypolonkai/bfd36be8b515edced3d2 implement-gobject-vfunc.el %} {% gist bfd36be8b515edced3d2 implement-gobject-vfunc.el %}
Now all I have to do is to copy the whole vtable entry into Now all I have to do is to copy the whole vtable entry into
`matrix_http_api_matrix_api_init()`, execute `M-x `matrix_http_api_matrix_api_init()`, execute `M-x

View File

@ -16,7 +16,7 @@ Bozhidar Batsov on opening the current file as root. I barely use
I almost never use root as the target user. So I decided to fix it for my I almost never use root as the target user. So I decided to fix it for my
needs. needs.
{% gist gergelypolonkai/192c83aa0556d5cdaf4018f57b75a84b %} {% gist 192c83aa0556d5cdaf4018f57b75a84b %}
If the user is not specified, the default is still root. Also, if the If the user is not specified, the default is still root. Also, if the
current buffer is not visiting a file, I prompt for a filename. As Im not current buffer is not visiting a file, I prompt for a filename. As Im not

View File

@ -21,7 +21,7 @@ retrieving them for your own eyes. But it cannot retrieve account data
programatically. Taking a look into its source code, I came up with this programatically. Taking a look into its source code, I came up with this
solution: solution:
{% gist gergelypolonkai/8bad70502ac563864080f754fce726c3 idm.el %} {% gist 8bad70502ac563864080f754fce726c3 idm.el %}
I currently need only the account ID (ie. the username) and the password, I currently need only the account ID (ie. the username) and the password,
but its pretty easy to add a macro to get the `memo` or `update-time` but its pretty easy to add a macro to get the `memo` or `update-time`

View File

@ -31,7 +31,7 @@ Since I use Emacs for pretty much everything coding-related (and many more,
but thats the topic of a different post), I wrote a small function to do it but thats the topic of a different post), I wrote a small function to do it
for me. for me.
{% gist gergelypolonkai/7b062a00d3b8a2555024521273cecfee python-docstring.el %} {% gist 7b062a00d3b8a2555024521273cecfee python-docstring.el %}
There are still a lot of things to improve: There are still a lot of things to improve:

View File

@ -14,7 +14,7 @@ a string). I went Googling a bit, and found an
excellend [Flask snippet](http://flask.pocoo.org/snippets/5/). Problem is, excellend [Flask snippet](http://flask.pocoo.org/snippets/5/). Problem is,
it is designed for Python 2, so I came up with a Python 3 version. it is designed for Python 2, so I came up with a Python 3 version.
{% gist gergelypolonkai/1866fd363f75f4da5f86103952e387f6 slugify.py %} {% gist 1866fd363f75f4da5f86103952e387f6 slugify.py %}
As I dont really like the transliteration done in the first example As I dont really like the transliteration done in the first example
(e.g. converting ü to ue), I went with the second example. (e.g. converting ü to ue), I went with the second example.

View File

@ -38,7 +38,7 @@ will be invoked for every string it finds.
Before getting into the details, lets me present you the code I made: Before getting into the details, lets me present you the code I made:
{% gist gergelypolonkai/1a16a47e5a1971ca33e58bdfd88c5059 string-checker.py %} {% gist 1a16a47e5a1971ca33e58bdfd88c5059 string-checker.py %}
The class initialization does two things: creates an empty `in_call` list The class initialization does two things: creates an empty `in_call` list
(this will hold our primitive backtrace), and saves the filename, if (this will hold our primitive backtrace), and saves the filename, if