Skip to content

Instantly share code, notes, and snippets.

View piharpi's full-sized avatar

Harpi piharpi

View GitHub Profile
@piharpi
piharpi / group_posts_by_year_jekyll.html
Created November 24, 2019 04:43
Liquid Template language to group jekyll blog posts by year.
{% for post in site.posts %}
{% capture current_year %}
{{post.date | date: "%Y"}}
{% endcapture %}
{% if current_year != previous_year %}
{% assign previous_year = current_year %}
<h4 class="post-header">
<span role="img" aria-label="icon-book" aria-hidden="true">🎉</span>
{{ current_year }}
</h4>

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

@piharpi
piharpi / .block
Created March 16, 2020 05:27 — forked from tvalentius/.block
HDI Indonesia Choropleth Map
border: no
license: MIT